GeoNet / fdsn

FDSN Web Services
MIT License
17 stars 15 forks source link

filtering stations by channel only works at level=channel #123

Closed gclitheroe closed 6 years ago

gclitheroe commented 6 years ago

I don't know if this is a bug or a feature. The Gempa / SC3 service shows the same behaviour as our implementation. Filtering by channel only seems to have an affect when the output level is a channel e.g.,

curl "https://beta-service.geonet.org.nz/fdsnws/station/1/query?starttime=2017-11-05T00:00:00&channel=BTT&level=channel&format=text" 

returns different results compared to

curl "https://beta-service.geonet.org.nz/fdsnws/station/1/query?starttime=2017-11-05T00:00:00&channel=BTT&format=text" 
nbalfour commented 6 years ago

I believe this is to do with the lack of channel information that is returned at levels higher than channel (so net or sta). At levels of station (default) only the number of channels is returned, not what the channels are.

So it's a bit a bug that is based on the assumption that filter level people use (channel=, loc=) is related to the level of information that are interested in (level=).

For example: If you filter for a channel or location, you must be interested in the channel or location information.

I assumption obviously doesn't work well for cases when you want to filter data for the network maps.

gclitheroe commented 6 years ago

So I guess this is a feature. I'll close this - it was just confusing, not a show stopper.

junghao commented 6 years ago

Unfortunately, I think this is a bug.

And from this url (better use browser to see xml result)

http://beta-service.geonet.org.nz/fdsnws/station/1/query?channel=BTT

If you search for "ABAZ" from the result then you'll get a match - which supposed to represent : "there're children (channels) under it but collapsed."

However, if you do

http://beta-service.geonet.org.nz/fdsnws/station/1/query?channel=BTT&level=channel

you can't find "ABAZ" from the result xml.

And if you do

http://beta-service.geonet.org.nz/fdsnws/station/1/query?station=ABAZ&level=channel

you can't find "BTT" from the result.

This doesn't make sense.

ozym commented 6 years ago

@junghao keep in mind that not all stations have all channels.

BTT is a tsunami gauge stream, while ABAZ is seismic site (this should have EHZ etc.)