GeoNet / fdsn

FDSN Web Services
MIT License
17 stars 15 forks source link

fdsn search with radius doesn't return earthquakes East of 180 degrees of longitude #212

Closed segburg closed 2 years ago

segburg commented 3 years ago

The fdsn event search doesn't allow for a region defined with a radius to cross the 180 longitude. For example a search centred around -37.0,179.4 and a radius of 1.5 only returns earthquakes West of 180 degrees of longitude:

wget --output-document='cat_phase_geonet_2021-03-30.xml' 'http://service.geonet.org.nz/fdsnws/event/1/query?format=xml&starttime=2021-03-30&latitude=-37.0&longitude=179.4&maxradius=1.5&includearrivals=false'

filefolder commented 3 years ago

came here to report a similar (the same?) problem... nothing west of 180 showing up and including minlon/maxlon with rectangle searches seem to produce jarbled server responses.

from obspy import UTCDatetime
from obspy.clients.fdsn import Client 
geonet = Client('GEONET')

t = UTCDateTime(2021,3,10)

#try to grab something reasonable 
cat = geonet.get_events(starttime=t,endtime=t+10*86400,minmagnitude=3,minlat=-50,maxlat=-45,minlon=-190,maxlon=-180)

FDSNBadRequestException: Bad request. If you think your request was valid please contact the developers. HTTP Status code: 400 Detailed response of server:

JJLQ(J-,M-.RK,)MIUQ503R543@</

(strange response! same thing if I use minlongitude maxlongitude spelled out)

#or try radius search
cat = geonet.get_events(starttime=t,endtime=t+10*86400,minmagnitude=3,latitude=-41,longitude=-179,maxradius=10)

returns events, but none west of -180 lon which is hard to believe. similar results when lon = +179

junghao commented 2 years ago

The fix has deployed.

curl "https://service.geonet.org.nz/fdsnws/event/1/query?format=text&starttime=2021-03-30&endtime=2021-03-31&latitude=-37.0&longitude=179.4&maxradius=1.5&includearrivals=false"
#EventID | Time | Latitude | Longitude | Depth/km | Author | Catalog | Contributor | ContributorID | MagType | Magnitude | MagAuthor | EventLocationName
2021p237873|2021-03-30T00:18:55|-37.314|-179.692|12.0|GNS|GNS|GNS|2021p237873|M|3.4|GNS|170 km east of Te Araroa
2021p237919|2021-03-30T00:43:37|-37.314|-179.732|12.0|GNS|GNS|GNS|2021p237919|M|3.1|GNS|170 km east of Te Araroa
2021p237939|2021-03-30T00:54:00|-37.300|-179.804|12.0|GNS|GNS|GNS|2021p237939|MLv|2.9|GNS|165 km east of Te Araroa
2021p237948|2021-03-30T00:59:20|-37.596|179.769|12.0|GNS|GNS|GNS|2021p237948|MLv|2.9|GNS|120 km east of Te Araroa
2021p237963|2021-03-30T01:07:01|-37.141|178.836|12.0|GNS|GNS|GNS|2021p237963|M|2.8|GNS|65 km north-east of Te Araroa
2021p238356|2021-03-30T04:36:34|-37.337|179.885|12.0|GNS|GNS|GNS|2021p238356|M|3.9|GNS|135 km east of Te Araroa
2021p238379|2021-03-30T04:48:56|-37.484|179.879|12.0|GNS|GNS|GNS|2021p238379|M|2.9|GNS|130 km east of Te Araroa
2021p238398|2021-03-30T04:58:54|-37.481|-179.997|12.0|GNS|GNS|GNS|2021p238398|MLv|2.7|GNS|145 km east of Te Araroa
2021p238558|2021-03-30T06:23:53|-37.517|179.796|12.0|GNS|GNS|GNS|2021p238558|MLv|2.5|GNS|125 km east of Te Araroa
2021p238685|2021-03-30T07:31:35|-37.300|-179.874|48.2|GNS|GNS|GNS|2021p238685|M|3.1|GNS|155 km east of Te Araroa
2021p239019|2021-03-30T10:29:40|-37.567|179.385|12.0|GNS|GNS|GNS|2021p239019|MLv|2.5|GNS|85 km east of Te Araroa
2021p239060|2021-03-30T10:51:28|-37.553|179.637|12.0|GNS|GNS|GNS|2021p239060|MLv|2.5|GNS|110 km east of Te Araroa
2021p239079|2021-03-30T11:01:49|-37.533|179.872|12.0|GNS|GNS|GNS|2021p239079|MLv|2.7|GNS|130 km east of Te Araroa
2021p239516|2021-03-30T14:54:24|-37.555|179.787|12.0|GNS|GNS|GNS|2021p239516|MLv|3.3|GNS|125 km east of Te Araroa
2021p239535|2021-03-30T15:04:09|-37.366|179.855|12.0|GNS|GNS|GNS|2021p239535|MLv|2.6|GNS|130 km east of Te Araroa
2021p239596|2021-03-30T15:37:01|-37.693|179.814|12.0|GNS|GNS|GNS|2021p239596|MLv|2.3|GNS|125 km east of Te Araroa
2021p239627|2021-03-30T15:53:46|-37.680|179.793|12.0|GNS|GNS|GNS|2021p239627|M|2.3|GNS|125 km east of Te Araroa
2021p239711|2021-03-30T16:38:34|-37.466|-179.992|12.0|GNS|GNS|GNS|2021p239711|M|2.5|GNS|145 km east of Te Araroa
2021p239850|2021-03-30T17:52:07|-37.331|-179.777|12.0|GNS|GNS|GNS|2021p239850|MLv|2.9|GNS|165 km east of Te Araroa
2021p239877|2021-03-30T18:06:32|-37.314|179.756|12.0|GNS|GNS|GNS|2021p239877|MLv|3.1|GNS|125 km east of Te Araroa
2021p239893|2021-03-30T18:15:09|-37.211|179.746|12.0|GNS|GNS|GNS|2021p239893|MLv|2.8|GNS|130 km east of Te Araroa
2021p240096|2021-03-30T20:03:40|-37.230|179.672|12.0|GNS|GNS|GNS|2021p240096|M|2.6|GNS|120 km east of Te Araroa
2021p240135|2021-03-30T20:24:13|-37.308|-179.779|12.0|GNS|GNS|GNS|2021p240135|MLv|3.1|GNS|165 km east of Te Araroa
2021p240152|2021-03-30T20:33:11|-37.171|179.077|50.5|GNS|GNS|GNS|2021p240152|M|3.4|GNS|80 km north-east of Te Araroa
2021p238968|2021-03-30T10:02:13|-37.615|179.758|33.0|GNS|GNS|GNS|2021p238968|MLv|3.5|GNS|120 km east of Te Araroa
2021p240316|2021-03-30T22:00:06|-37.596|179.665|12.0|GNS|GNS|GNS|2021p240316|MLv|2.7|GNS|110 km east of Te Araroa
2021p240485|2021-03-30T23:30:31|-37.622|179.809|12.0|GNS|GNS|GNS|2021p240485|MLv|2.7|GNS|125 km east of Te Araroa
2021p238119|2021-03-30T02:30:20|-37.549|-180.000|33.0|GNS|GNS|GNS|2021p238119|MLv|3.7|GNS|140 km east of Te Araroa