EIDA / routing

Server side application to provide the Routing Service used in EIDA
GNU General Public License v3.0
6 stars 4 forks source link

Geolocation within HTTP POST #52

Closed damb closed 5 years ago

damb commented 6 years ago

Hi Javier, while requesting information from eidaws-routing using the HTTP POST format, it seems that the current implementation does not accept any geolocation information:

$ cat routing.post
format=post
minlatitude=-70.8
maxlatitude=-70.
AW * * * 2017-01-01 2018-01-01
$ wget -O - --post-file routing.post "http://geofon.gfz-potsdam.de/fdsnws/station/1/query"
--2018-05-14 15:39:56--  http://geofon.gfz-potsdam.de/fdsnws/station/1/query
Resolving geofon.gfz-potsdam.de (geofon.gfz-potsdam.de)... 139.17.3.177
Connecting to geofon.gfz-potsdam.de (geofon.gfz-potsdam.de)|139.17.3.177|:80... connected.
HTTP request sent, awaiting response... 400 Bad Request
2018-05-14 15:39:56 ERROR 400: Bad Request.

However using a GET request gives a valid result:

$ wget -O - "http://geofon.gfz-potsdam.de/eidaws/routing/1/query?format=post&net=AW&start=2017-01-01&end=2018-01-01&minlatitude=-70.8&maxlatitude=-70"
--2018-05-14 15:50:13--  http://geofon.gfz-potsdam.de/eidaws/routing/1/query?format=post&net=AW&start=2017-01-01&end=2018-01-01&minlatitude=-70.8&maxlatitude=-70
Resolving geofon.gfz-potsdam.de (geofon.gfz-potsdam.de)... 139.17.3.177
Connecting to geofon.gfz-potsdam.de (geofon.gfz-potsdam.de)|139.17.3.177|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 107 [text/plain]
Saving to: ‘STDOUT’

-                     0%[                    ]       0  --.-KB/s               http://geofon.gfz-potsdam.de/fdsnws/dataselect/1/query
AW VNA1 * * 2017-01-01T00:00:00 2018-01-01T00:00:00
-                   100%[===================>]     107  --.-KB/s    in 0s      

2018-05-14 15:50:13 (6.46 MB/s) - written to stdout [107/107]

The eidaws-routing documentation does not say anything about geolocation parameters using HTTP POST (i.e. the corresponding format).

cheers, Daniel

javiquinte commented 6 years ago

Thanks @damb for pointing this out. I'll take a look at it and eventually fix it.

krischer commented 5 years ago

We would use this in ObsPy as soon as its ready. See #56 for what we currently do.

javiquinte commented 5 years ago

Fixed in commit 3016b1764c45e870dc38594b0770b9a465f22ebf