Synopsis

fdsnevent [-vV] [--help] [--includeallmagnitudes] [--includeallorigins] [--includearrivals] [--printurl] [--raw] [--schema] [--validate] [-b=<startTime>] [--baseurl=<baseURL>] [--box=w/e/s/n] [-c=<catalog>] [-C=<contributor>] [--donut=lat/lon/min/max] [-e=<endTime>] [--eventid=<eventid>] [--host=<host>] [--lat=<latitude>] [--limit=<limit>] [--lon=<longitude>] [--maxdepth=<maxDepth>] [--maxlat=<maxLatitude>] [--maxlon=<maxLongitude>] [--maxmag=<maxMagnitude>] [--maxradius=<maxRadius>] [--mindepth=<minDepth>] [--minlat=<minLatitude>] [--minlon=<minLongitude>] [--minmag=<minMagnitude>] [--minradius=<minRadius>] [--nodata=<nodata>] [-o=<outputFile>] [--offset=<offset>] [--orderby=<orderBy>] [--port=<port>] [-t=<magnitudeType>] [--updatedafter=<updatedAfter>] [-m=<magnitudeRange> [<magnitudeRange>]]…​

Description

example client to query a remote FDSN Event web service

Times are ISO8601 formatted strings, like yyyy-MM-ddTHH:mm:ss, and may be shortened to include only the significant fields. The remaining fields will be filled in as either zero or max value depending on the use. For example 2006-11-19 or 2006-11-19T06:34:21. The special strings now and yesterday may also be used.

Options

-b, --start, --starttime=<startTime>

Limit to events on or after the specified start time.

--baseurl=<baseURL>

Base URL for queries, ie everything before the '/<service>/<version>/<query>?'

--box=w/e/s/n

constraining box as west/east/south/north

-c, --catalog=<catalog>

Limit to events from a specified catalog

-C, --contributor=<contributor>

Limit to events contributed by a specified contributor.

--donut=lat/lon/min/max

constraining donut as lat/lon/minRadius/maxRadius

-e, --end, --endtime=<endTime>

Limit to events on or before the specified end time.

--eventid=<eventid>

Select a specific event by ID; event identifiers are data center specific.

--help

display a help message

--host=<host>

host to connect to, defaults to earthquake.usgs.gov

--includeallmagnitudes

Specify if all magnitudes for the event should be included, default is data center dependent but is suggested to be the preferred magnitude only.

--includeallorigins

Specify if all origins for the event should be included, default is data center dependent but is suggested to be the preferred origin only.

--includearrivals

Specify if phase arrivals should be included.

--lat, --latitude=<latitude>

Specify the latitude to be used for a radius search.

--limit=<limit>

Limit the results to the specified number of events.

--lon, --longitude=<longitude>

Specify the longitude to the used for a radius search.

-m, --magnitude=<magnitudeRange> [<magnitudeRange>]

The range of acceptable magnitudes, max may be omitted.

--maxdepth=<maxDepth>

Limit to events with depth less than the specified maximum.

--maxlat, --maxlatitude=<maxLatitude>

Limit to events with a latitude smaller than the specified maximum.

--maxlon, --maxlongitude=<maxLongitude>

Limit to events with a longitude smaller than the specified maximum.

--maxmag, --maxmagnitude=<maxMagnitude>

Limit to events with a magnitude smaller than the specified maximum.

--maxradius=<maxRadius>

Limit to events within the specified maximum number of degrees from the geographic point defined by the latitude and longitude parameters.

--mindepth=<minDepth>

Limit to events with depth more than the specified minimum.

--minlat, --minlatitude=<minLatitude>

Limit to events with a latitude larger than the specified minimum.

--minlon, --minlongitude=<minLongitude>

Limit to events with a longitude larger than the specified minimum.

--minmag, --minmagnitude=<minMagnitude>

Limit to events with a magnitude larger than the specified minimum.

--minradius=<minRadius>

Limit to events within the specified minimum number of degrees from the geographic point defined by the latitude and longitude parameters.

--nodata=<nodata>

nodata http return code

-o, --output=<outputFile>

File for outputing result

--offset=<offset>

Return results starting at the event count specified, starting at 1.

--orderby=<orderBy>

Order the result by time or magnitude with the following possibilities: time: order by origin descending time time-asc : order by origin ascending time magnitude: order by descending magnitude magnitude-asc : order by ascending magnitude

--port=<port>

port to connect to, defaults to 80

--printurl

Construct and print URL and exit

--raw

Output the raw data to stdout

--schema

prints schema

-t, --magtype, --magnitudetype=<magnitudeType>

Specify a magnitude type to use for testing the minimum and maximum limits.

--updatedafter=<updatedAfter>

Limit to events updated after the specified time.

-v, --verbose

Verbose

-V, --version

Print version and exit

--validate

Validate XML against schema

Examples

Ask for magnitude 2 or larger events within 3 degrees of 32/-81 in December 2020 or January 2021.

> fdsnevent -b 2020-12 -e 2021-01 --donut 32/-81/0/3 -m 2
34.031166/-80.3835  2.05 md 2021-01-18T10:52:50.750Z
33.68667/-82.55883  2.38 md 2020-12-27T05:17:10.310Z
34.01483/-81.02033  2.37 md 2020-12-12T01:37:34.710Z

Only print the URL that would be accessed without connecting to the remote server.

> fdsnevent -b 2020-12 -e 2021-01 --donut 32/-81/0/3 -m 2 --printurl
http://earthquake.usgs.gov:80/fdsnws/event/1/query?endtime=2021-01-31T23:59:59.999Z&latitude=32.0&longitude=-81.0&maxradius=3.0&minmagnitude=2.0&minradius=0.0&starttime=2020-12-01T00:00:00.000Z

Output the raw quakeml to a file.

> fdsnevent -b 2020-12 -e 2021-01 --donut 32/-81/0/3 -m 2 --raw -o events.quakeml