• Antelope Release 5.5 Mac OS X 10.8.5 2015-04-21

 

NAME

usgs2db,emsc2db - utility to retrieve earthquake feeds in GeoJSON format from USGS or EMSC.

SYNOPSIS

usgs2db [-v] [-a author]
      [-k keydbname] [-u feed-url] dbname
emsc2db [-v] [-a author]
      [-k keydbname] [-u feed-url] dbname

SUPPORT


Contributed code: NO BRTT support.
THIS PIECE OF SOFTWARE WAS CONTRIBUTED BY THE ANTELOPE USER COMMUNITY. BRTT DISCLAIMS ALL OWNERSHIP, LIABILITY, AND SUPPORT FOR THIS PIECE OF SOFTWARE.

FOR HELP WITH THIS PIECE OF SOFTWARE, PLEASE CONTACT THE CONTRIBUTING AUTHOR.

DESCRIPTION

usgs2db and emsc2db read feeds in GeoJSON format and stores the event information in a database. The programs keeps track of event ids in a separate table and updates the output database if new information is available.

OPTIONS

EXAMPLE

To retrieve all event data for the last month into database usgs:
usgs2db -k db/usgs_ids -v -u http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson usgs
To update event information every 10 minutes, add the following to your rtexec.pf
# update database USGS every 10 minutes, all events above magnitude 2.5
USGS   UTC   0,10,20,30,40,50   *  *  *  *  usgs2db -k db/usgs_ids db/usgs

ENVIRONMENT

The program uses the Python module urllib2 to retrieve data from a webpage. This module provides proxy support via environment variables like e.g.: http_proxy = http://myhost:myport. If you need more control over proxy settings, feel free to contact the author, Nikolaus.Horn@zamg.ac.at.

SEE ALSO


pydoc liburl2, antelope_python(3y)

BUGS AND CAVEATS

The error handling is very basic. I implemented my personal understanding of the data offered. There might be wiser ways to use the save the information in a database. The feeds are subject to the feed life cycle policy as explained on the website of the usgs. See there for more information if a feed stops working. This module uses the python modules urllib2 and json with all their bugs. And of course I added many more problems...

AUTHOR

Nikolaus Horn (nikolaus.horn@zamg.ac.at)
Antelope User Group Contributed Software
Printer icon