From 8dda57fdb021be436eca8f96efffcfabf8565a9f Mon Sep 17 00:00:00 2001 From: bpeng Date: Mon, 29 Jul 2024 15:13:38 +1200 Subject: [PATCH] update event type as per #16135 --- cmd/fdsn-ws/fdsn_event.go | 80 ++++++++++++++++++++++++++++++---- cmd/fdsn-ws/fdsn_event_test.go | 2 +- 2 files changed, 73 insertions(+), 9 deletions(-) diff --git a/cmd/fdsn-ws/fdsn_event.go b/cmd/fdsn-ws/fdsn_event.go index f13f4153..68a8e9de 100644 --- a/cmd/fdsn-ws/fdsn_event.go +++ b/cmd/fdsn-ws/fdsn_event.go @@ -78,14 +78,78 @@ var eventNotSupported = map[string]bool{ "includearrivals": true, } -// copied from p.17 of FDSN-WS-Specifications-1.2.pdf -const EVENT_TYPES = `not existing, not reported, earthquake, anthropogenic event, collapse, -cavity collapse, mine collapse, building collapse, explosion, accidental explosion, chemical explosion, -controlled explosion, experimental explosion, industrial explosion, mining explosion, quarry blast, -road cut, blasting levee, nuclear explosion, induced or triggered event, rock burst, reservoir loading, -fluid injection, fluid extraction, crash, plane crash, train crash, boat crash, other event, -atmospheric event, sonic boom, sonic blast, acoustic noise, thunder, avalanche, snow avalanche, -debris avalanche, hydroacoustic event, ice quake, slide, landslide, rockslide, meteorite, volcanic eruption` +// from https://github.com/SeisComP/common/blob/master/libs/xml/0.13/sc3ml_0.13.xsd +// https://github.com/SeisComP/common/blob/master/libs/xml/0.13/sc3ml_0.13__quakeml_1.2.xsl +const EVENT_TYPES = ` +not existing, +not locatable, +outside of network interest, +earthquake, +induced earthquake, +quarry blast, +explosion, +chemical explosion, +nuclear explosion, +landslide, +rockslide, +snow avalanche, +debris avalanche, +mine collapse, +building collapse, +volcanic eruption, +meteor impact, +plane crash, +sonic boom, +duplicate, +other, +not reported, +anthropogenic event, +collapse, +avity collapse, +accidental explosion, +controlled explosion, +experimental explosion, +industrial explosion, +mining explosion, +road cut, +blasting levee, +induced or triggered event, +rock burst, +reservoir loading, +fluid injection, +fluid extraction, +crash, +train crash, +boat crash, +atmospheric event, +sonic blast, +acoustic noise, +thunder, +avalanche, +hydroacoustic event, +ice quake, +slide, +meteorite, +calving, +rost quake, +tremor pulse, +submarine landslide, +rocket launch, +rocket, +rocket impact, +artillery strike, +bomb detonation, +moving aircraft, +atmospheric meteor explosion, +volcano-tectonic, +volcanic long-period, +volcanic very-long-period, +volcanic hybrid, +volcanic rockfall, +volcanic tremor, +pyroclastic flow, +lahar, +other event` const UNKNOWN_TYPE = "unknown" diff --git a/cmd/fdsn-ws/fdsn_event_test.go b/cmd/fdsn-ws/fdsn_event_test.go index b602e10d..8fb13100 100644 --- a/cmd/fdsn-ws/fdsn_event_test.go +++ b/cmd/fdsn-ws/fdsn_event_test.go @@ -430,7 +430,7 @@ func TestEventTypes(t *testing.T) { {"e*", false, []interface{}{"earthquake", "explosion", "experimental explosion"}}, {"z*", true, nil}, // no such match, expected value doesn't matter {"experimental explosion", false, []interface{}{"experimental explosion"}}, - {"e*,a*", false, []interface{}{"earthquake", "anthropogenic event", "explosion", "accidental explosion", "experimental explosion", "atmospheric event", "acoustic noise", "avalanche"}}, + {"e*,a*", false, []interface{}{"earthquake", "explosion", "anthropogenic event", "accidental explosion", "experimental explosion", "atmospheric event", "acoustic noise", "avalanche", "artillery strike", "atmospheric meteor explosion"}}, {"unknown", false, []interface{}{""}}, // specify "unknown" means query for empty value } for _, c := range queryCases {