GeoNet / fdsn

FDSN Web Services
MIT License
17 stars 15 forks source link

FDSN beta event service not wrapping around 180 longitude #77

Closed nbalfour closed 7 years ago

nbalfour commented 7 years ago

Here is an issue raised in GeoNet/help. See https://github.com/GeoNet/help/issues/40 Hi all, just started playing with the beta fdsn service and ran into unexpected returned values when querying entries around 180 longitude. The url: http://beta-service.geonet.org.nz/fdsnws/event/1/query?minlatitude=-49.0&minlongitude=175.0&endtime=2016-09-05T00%3A00%3A00.000000&maxlatitude=-35.0&starttime=2016-09-04T00%3A00%3A00.000000&minmagnitude=4.0&maxlongitude=180.0 returns a nice xml file, and changing maxlongitude to larger values raises an error (as expected), but, changing to this url: http://beta-service.geonet.org.nz/fdsnws/event/1/query?minlatitude=-49.0&minlongitude=175.0&endtime=2016-09-05T00%3A00%3A00.000000&maxlatitude=-35.0&starttime=2016-09-04T00%3A00%3A00.000000&minmagnitude=4.0&maxlongitude=-175.0 returns no data. Other services (e.g. IRIS) wrap the selection rectangle around the globe here, e.g. the following url returns a valid xml: http://service.iris.edu/fdsnws/event/1/query?minlatitude=-49.0&minlongitude=175.0&endtime=2016-09-05T00%3A00%3A00.000000&maxlatitude=-35.0&starttime=2016-09-04T00%3A00%3A00.000000&minmagnitude=4.0&maxlongitude=-175.0

This is likely an edge case, but probably worth a fix to work like other FDSN webservices @nbalfour ?

nbalfour commented 7 years ago

Can we please provide wrapping around 180 degree longitude for the rectangular search option in the event service, which uses the parameters minlatitude, maxlatitude, minlongtitude, maxlongtitude?

gclitheroe commented 7 years ago

I think this should be resolved. Please can you check it out and resolve this if it is?

nbalfour commented 7 years ago

Seems to work fine. Thank you