Conversation
|
Thanks for the great contributions! You have built some seriously powerful remote spatial parsing techniques here. I'm thinking it might be best though to break up this PR a bit into some separate atomic updates. For some context, one of the things we're trying to do with the fetchez framework is enforce a "Lightweight Core, Heavy Extensions" modular architecture. The core fetchez framework and its modules/hooks should try to remain as generic and agnostic as possible; ideally (for modules) just scanning an API and returning fetchable endpoints, while domain-specific routing, heavy processing, and bespoke spatial intersections are handled by the Hook system or as a collection of modules and hooks in standalone extensions (like Globato) when necessary. So, to get these features integrated without tightly coupling the core registry to USGS datasets and having processing code in the modules directory, I would suggest we break this up and create some cool new hooks, etc.:
How do you feel about possibly making these changes? The best next step would be to extract the core.py updates into their own PR. We can then port the tnm_*.py helpers into generic hooks that the tnm module (and any other module that wants to try) can use instead and think about ways to inject the registry/pipeline changes into the tnm module itself or as separate hooks. I think this would better follow the modular nature of fetchez while still getting the workflow you've provided here. Would love to help with any of these suggestions, as these are some great features you've made. |
|
So, to follow my advise here, I removed the |
|
For example, the 'dedupe' in the tnm module was mainly to remove duplicated NED tiles since they just publish new ones alongside older ones; and now we can use the $ fetchez run --global-hook list-only -R -124.5/-124.0/41.5/44.0 tnm --datasets 1_as --hook spatial_cull:sort_by="date"
Executing dynamic pipeline...
[ INFO ] spatial_cull: [spatial_cull] Culled 20 redundant entries based on 'date'.
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n43w124/USGS_1_n43w124_20260818.tif
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n42w124/USGS_1_n42w124_20260601.tif
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n42w125/USGS_1_n42w125_20260601.tif
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n43w125/USGS_1_n43w125_20260601.tif
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n44w124/USGS_1_n44w124_20250804.tif
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n45w124/USGS_1_n45w124_20250804.tif
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n44w125/USGS_1_n44w125_20241001.tif
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n45w125/USGS_1_n45w125_20130911.tif |
|
thanks for the great feedback Matt! As you saw, I just did the HTTP PR. This is what I'm thinking about doing next... let me know if you have any thoughts!
|
Summary
Add explicit USGS The National Map (TNM) elevation-product support for downstream DEM workflows.
The change adds TNM product discovery, authoritative source footprints, WESM project metadata for 1 m data, and the metadata needed for downstream resolution hierarchy and chronology decisions.
Existing TNM behavior remains available; the new provider behavior is opt-in.
What changed
This PR intentionally stops at source discovery and metadata. Resolution precedence, project superseding, coastline policy, and final DEM stacking remain responsibilities of downstream consumers such as Globato.
Validation
Repository tests and pre-commit checks pass.
Targeted tests cover:
An existing Globato TNM workflow was also run as a no-regression check against the exact Fetchez candidate. The candidate matched the base output for that established workflow.
<RUN_OUTPUT>and<RUN_CACHE>are isolated per validation run.Reproducibility
origin/main@2af18b88fb1c89c02763d4d069602e405cfd62d2867d7b778b15b5e80bd1f91a1bfc45804f378706The complete validation evidence, exact candidate patch, and resolved runtime commands are preserved in the associated dem-devel evidence bundle.
Supporting evidence
The attached
evidence_bundle.zipcontains the exact candidate patch, revision identities,validation reports, resolved scientific commands, and supporting artifacts generated by
dem-devel for this reviewed candidate. It is provided for deeper review or reproduction;
the validation relevant to this PR is summarized above.
evidence_bundle.zip
Checklist
closes #1)CHANGELOG.mdupdatedREADME.mdupdatedpre-commit.ci autofixif pre-commit is failing)🔍 Docs preview: https://fetchez--385.org.readthedocs.build/en/385/