GeoNet / fdsn

FDSN Web Services
MIT License
17 stars 15 forks source link

Invalid QuakeML event type reported by text format for event service #242

Closed gempa-stephan closed 9 months ago

gempa-stephan commented 10 months ago

The event type unknown, e.g., reported by

https://service.geonet.org.nz/fdsnws/event/1/query?format=text&starttime=2023-11-11T13:09:22

is not supported by QuakeML. The FDSNWS spec reads:

Event type classification string as of QuakeML 1.2 EventType enumeration

I suggest to leave the field empty if the type is not known.

elidana commented 9 months ago

thanks a lot for notifying about this @gempa-stephan !

we have based our event type definition following the FDSN specs (https://www.fdsn.org/webservices/fdsnws-event-1.2.pdf, Table 1, page 3) that, for eventtype, states:

image

would you please be able to point us to the QuakeML 1.2 enumeration? We were referring to this document https://quake.ethz.ch/quakeml/QuakeML2.0/BasicEventDescriptionTypes where (to the best of my understanding) the unknown type is not enumerated?

salichon commented 9 months ago

@elidana an enumeration list for the events can be accessed there i reckon

gempa-stephan commented 9 months ago

@elidana I see. The referenced table describes the request parameters for the event service. While implementing the SeisComP and QuakeLink FDSNWS event service I was under the impression that the unknown value was introduced to be able to filter, e.g., for events of type earthquake and for events without type information at the same time: eventtype=earthquake,unknown.

For the typed output formats like QuakeML and JSON one may simply omit optional parameters like the magnitude, depth or the event type. In case of CSV it seemed to me logical to use an empty string in this case to

Anyhow, I do understand your reasoning for using unknown now and will close this issue.

Cheers, Stephan

elidana commented 9 months ago

thanks a lot @gempa-stephan we had lots of internal discussions at the time (the eventtype option has been enabled only recently on our GeoNet FDSN service), and then decided to follow the specs suggestions. But please keep those suggestions coming if you stumble upon further issues, it is really useful for us!