[scautoloc] Add DepthLookup plugin system (dlslab2 + refactor)#121
Draft
comoglu wants to merge 5 commits into
Draft
[scautoloc] Add DepthLookup plugin system (dlslab2 + refactor)#121comoglu wants to merge 5 commits into
comoglu wants to merge 5 commits into
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @gempa-lukas on file. Please follow https://github.com/GEOFON/CLA/blob/master/README.md to get yourself added. |
0791a64 to
7582839
Compare
…ntation Adds the dlslab2 plugin providing DepthLookup::"Slab2" — a region-aware default and maximum depth lookup backed by USGS Slab2.0 contour polygons. - Slab2DepthLookup: loads BNA depth-footprint contours from dlslab2.directory (default @datadir@/dlslab2/slabs); 30 zones, 20 km intervals (0–680 km) - Uses a local GeoFeatureSet (not the global singleton) to avoid polluting the GUI display layer - Ships 531 pre-generated BNA files under plugins/depthlookup/slab2/share/slabs/ - tools/generate_slab_bna.py reproduces the BNA dataset from USGS .grd grids - tools/defaultdepthsetter.py: standalone Python mirror for testing depth logic Data source: Hayes et al. (2018), Slab2.0 (doi:10.5066/F7PV6JNV)
Replaces the embedded depth-lookup logic with the new DepthLookupFactory from seiscomp/common. Adds autoloc.depthLookup config key (default: "Constant") to select the backend at runtime without recompiling. - autoloc.depthLookup = Constant — legacy behaviour, no config change needed - autoloc.depthLookup = Polygon — named GeoFeatureSet regions - autoloc.depthLookup = Slab2 — USGS Slab2.0 contours (requires dlslab2)
7582839 to
71c843a
Compare
…/maxDepth Update all call sites to fetch(lat,lon) / fetchMaxDepth(lat,lon). Remove defaultDepth and maxDepth from autoloc Config struct and all associated config reads (locator.defaultDepth, autoloc.maxDepth, autoloc.regionDepth.regions). Backend is now mandatory — unknown type or init failure causes SEISCOMP_ERROR + abort, no silent fallback. Add depths.constant/polygon groups to scautoloc.xml; add dlslab2.fallback to dlslab2.xml.
3 tasks
When an origin falls outside all Slab2.0 zones, the backend now consults an optional ordered list of polygon regions (from SeisComP's global GeoFeatureSet) before returning the constant fallback. Config: dlslab2.polygon.regions = australia_craton, african_craton Each polygon must carry a defaultDepth attribute (km) and may carry a maxDepth attribute (km). Useful for stable cratons, rifts, and other non-subduction areas where a region-specific default depth is known.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the single global
locator.defaultDepthwith a pluggableDepthLookupinterface. Each backend owns all depth knowledge includingits fallback value; callers pass no fallback.
Three backends:
"Constant"(default) — fixed depth fromdepths.constant.value"Polygon"— per-region depths from BNA/GeoJSON features; configures viadepths.polygon.regions+depths.polygon.fallback"Slab2"— USGS Slab2.0 depth-footprint contours (requiresdlslab2plugin); configures viadlslab2.directory+dlslab2.fallbackAPI:
Breaking changes in scautoloc configuration:
locator.defaultDepthremoved → usedepths.constant.valueautoloc.maxDepthremoved → now owned by each backendautoloc.regionDepth.regionsremoved → usedepths.polygon.regionsautoloc.depthLookupis now mandatory; unknown type = startup failureDepends on: SeisComP/common#199 (DepthLookup interface)
Test plan
scautolocanddlslab2— clean compile, no errorsConstantbackend withdepths.constant.value = 15Polygonbackend with a BNA region carryingdefaultDepthattributeSlab2backend with generated BNA files fromgenerate_slab_bna.pyautoloc.depthLookuptype