Skip to content

Commit

Permalink
update event type as per #16135
Browse files Browse the repository at this point in the history
  • Loading branch information
bpeng committed Aug 5, 2024
1 parent 5215dac commit 8dda57f
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 9 deletions.
80 changes: 72 additions & 8 deletions cmd/fdsn-ws/fdsn_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion cmd/fdsn-ws/fdsn_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8dda57f

Please sign in to comment.