[webservices] event query with catalog/contributor

Philip Crotwell crotwell at seis.sc.edu
Thu Mar 14 15:07:12 PDT 2013


Fair enough. In fact the only reason I am asking about it is because of the
dynamic nature of the PDE "catalog" or "catalogs" and the fact that the W
dissappears once the M comes out. In some sense asking for "only the PDE-W"
is kind of weird in that the result you get back today might dissappear
tomorrow, and yet the notion of wanting locations that are of "from teh
NEIC and at least PDE-W quality" (whatever that means) seems natural as a
seismologist. Not sure if you want to go there, but I wonder if
contributor=PDE_W should really mean "PDE-W or better" in the sense that
the Monthly is the replacement for the W and so asking or the W should
include M if the time range overlaps both. And PDE-Q would mean PDE-Q and
PDE-W and PDE-M. Just an idea.

It is really too bad that web service query params and/or quakeml can't
cleanly deal with the notion of a dynamic catalog that becomes "better" in
stages over time. The old static notion of a fixed catalog doesn't really
match and similarly the exact match catalog/contributor query params seems
to slightly miss as well.

Not really sure I have an answer, and simply sending two queries seems a
reasonable work around.

Understand your point about 400 vs 404. You have to draw the line
somewhere. I guess catalog/contributor seem to both be short enough and
static enough of a list. Maybe rule of thumb should be if you list the
possible options in the documentation, then check and 400, otherwise 404.
Not a big deal.

Philip



On Thu, Mar 14, 2013 at 5:24 PM, Chad Trabant <chad at iris.washington.edu>wrote:

>
> Hi Philip,
>
> No, there is no way to select via a list of contributors.  This is also
> not part of the specification for the FDSN version of the service, and it's
> not an extension we plan on offering unless a more people ask for it (a
> comma-separated list would also mean comma's are disallowed in a
> contributor string, not really a big deal but a consequence to consider).
>  Honestly, the use case is pretty narrow and something like your suggestion
> of making two separate queries is probably more appropriate.
>
> As for returning a 400 or 404, we will think on that a bit.  I think I
> understand your logic (the list of contributors is know and it could be
> checked), but I could extend that argument to networks, stations,
> locations, channels and perhaps more.  Should we return a 400 when a
> network is requested that we have no data for?  Or do we return "no data"
> (404 in the case of this service).
>
> Chad
>
>
> On Mar 14, 2013, at 12:05 PM, Philip Crotwell <crotwell at seis.sc.edu>
> wrote:
>
> Is there a way in the event service to query for events that are in the
> NEIC PDE-W or NEIC PDE-M but not get events that only occur in the NEIC
> PDE-Q or NEIC ALERT? In other words, I want to process using the weekly or
> the monthly, but I don't want to use the Q or the ALERT.
>
> Some time ago I was told that you cannot specify more than one
> contributor, which seems to be the case as this query returns no data. So,
> my guess is that I need to do this as 2 separate queries and merge the
> results locally if both return data?
>
>
> http://www.iris.edu/ws/event/query?starttime=2010-10-27T06:30:00&endtime=2011-10-01T06:30:00&minmag=7&contributor=NEIC+PDE-M,NEIC+PDE-W&orderby=time&output=xml
>
> Also, if you are not going to accept multiple contributors or catalogs, it
> might be good to cause an 400 error on this query instead of a 404. You do
> checking on some other fields like orderby and output, so might as well
> check catalog and contributor.
>
> In other words this query gives a 404 but probably should give a 400.
>
>
> http://www.iris.edu/ws/event/query?starttime=2010-10-27T06:30:00&endtime=2011-10-01T06:30:00&minmag=7&contributor=BLAH&orderby=time&output=xml
>
> Similar for this one.
>
>
> http://www.iris.edu/ws/event/query?starttime=2010-10-27T06:30:00&endtime=2011-10-01T06:30:00&minmag=7&catalog=BLAH&orderby=time&output=xml
>
> thanks,
> Philip
>  _______________________________________________
> webservices mailing list
> webservices at iris.washington.edu
> http://www.iris.washington.edu/mailman/listinfo/webservices
>
>
>
> _______________________________________________
> webservices mailing list
> webservices at iris.washington.edu
> http://www.iris.washington.edu/mailman/listinfo/webservices
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.iris.washington.edu/pipermail/webservices/attachments/20130314/721ac68b/attachment-0001.htm>


More information about the webservices mailing list