GithubHelp home page GithubHelp logo

ingv / exist-fdsn-station Goto Github PK

View Code? Open in Web Editor NEW
2.0 5.0 0.0 1.45 MB

FDSN station service and database with eXist-db

License: GNU Affero General Public License v3.0

Dockerfile 0.19% HTML 1.10% XQuery 35.55% XSLT 4.86% CSS 0.53% Python 57.77%
fdsn station webservice exist-db

exist-fdsn-station's Introduction

This project implements a seismic stations xml database compliant with the FDSN Station xml format fdsn-station and the corresponding FDSN webservice fdsnws-station .

Install From the project directory invoke ant to build the package file fdsn-station-0.1.xar into the build directory. Install the package into your eXist-db using the package manager.

eXist-db can be installed simply as a docker:

sudo docker pull existdb/existdb:release
sudo docker run -it -d -p 8080:8080 -p 8443:8443 --name exist existdb/existdb:latest

Alternatively fdsn-station and eXist-db can be built and deployed in one shot:

sudo docker build --rm . -t exist-fdsn-station
sudo docker run --name exist-fdsn-station -it exist-fdsn-station

You can also use the provided compose.yaml

mkdir data
docker compose up -d

Your database content is on data directory.

Use the API to add stations.

Here is an example using curl, passing through the nginx proxy server:

curl -X PUT "http://127.0.01:80/fdsnws/station/1/query?" -H  "accept: application/xml"  -H "Content-Type: application/octet-stream" -H "filename: INGV_ABSI.xml"  --data-binary @Station/INGV_ABSI.xml -o output.xml -i -v -fdsn:password

and another example using curl but directly to the eXist-db host:

curl -X PUT "http://172.17.0.2:8080/exist/apps/fdsn-station/fdsnws/station/1/query?" -H  "accept: application/xml"  -H "Content-Type: application/octet-stream" -H "Expect:" -H "filename: INGV_ABSI.xml"  --data-binary @Station/INGV_ABSI.xml -o output.xml -i -v -fdsn:password

Adjust IP addresses if needed.

Query the webservice version as for the FDSN Station standard, assuming 172.17.0.2:8080 the docker network:port exposed:

wget "http://172.17.0.2:8080/exist/apps/fdsn-station/fdsnws/station/1/version -O version.text" 

Try this examples with the stations provided, or adapt to your stations set.

wget "http://172.17.0.2:8080/exist/apps/fdsn-station/fdsnws/station/1/query?level=station&format=text&lat=42.1&lon=12.5&maxradius=2.5&minradius=0.001&includerestricted=false" -O some-stations-norestricted.txt 

Web interface GUI interface is accessible: http://127.0.0.1/exist/apps/dashboard/index.html

Security: default admin password is empty, fdsn default password is fdsn. Change it using eXist-db ide.

Need more help?

User Manual is coming.

DOI

exist-fdsn-station's People

Contributors

ilpint avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.