Skip to content

Add TNM elevation hierarchy bundle - #210

Open
camante wants to merge 1 commit into
mainfrom
feat/glob-tnm-hierarchy
Open

Add TNM elevation hierarchy bundle#210
camante wants to merge 1 commit into
mainfrom
feat/glob-tnm-hierarchy

Conversation

@camante

@camante camante commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Add an optional glob-tnm bundle for building DEMs from selected USGS The National Map elevation products.

Prerequisites:

How it works

glob-tnm processes the selected TNM products in their normal precedence order. Fetchez supplies each source and its authoritative coverage footprint; Globato excludes lower-resolution products wherever a higher-resolution source has coverage. This fills gaps between source footprints without using lower-resolution data to fill NoData holes inside a higher-resolution source.

For overlapping 1 m projects, newer project coverage takes precedence when project year is available. Same-year projects are not artificially ranked.

Users can request any subset of the supported TNM products, for example:

globato build ... glob-tnm:products=1m/1_9as/1_3as

The bundle keeps TNM tier/project identity in Globato's existing metadata and provenance path. Coastline or land/water policy is intentionally outside glob-tnm and can be applied with the existing Globato mask hooks when needed.

What changed

  • Add the glob-tnm bundle with TNM products in canonical precedence order.
  • Add a manifest-stage tnm-coverage hook for source-footprint fallback and 1 m project chronology.
  • Add a stream-stage tnm-coverage-filter hook that limits each stream to its accepted contribution area.
  • Preserve TNM tier/project identity through the existing Globato metadata/provenance machinery.
  • Raise the Fetchez and Transformez dependency floors required by this functionality.

glob-tnm is opt-in. Existing Globato bundles and workflows are unchanged.

Validation

  • Repository tests: PASS
  • Pre-commit: PASS
  • Maine hierarchy: verified source-footprint fallback with zero final precedence failures.
  • 1 m chronology: verified a real positive-area older/newer project overlap and confirmed that the older project contributes no accepted cells where newer coverage supersedes it.
  • Alaska hierarchy: verified the Alaska/TNM fallback chain with zero final precedence failures.
  • Alaska 2 arc-second: independently verified the standalone 2 arc-second product path.
  • Newport no-regression: the established multisource workflow matched the base output for the selected comparison products.

All four TNM diagnostics use the same Globato candidate and the same fixed Fetchez and Transformez companion revisions.

Reproducible TNM commands

OUTPUT_BASE="$HOME/continuous-dems/devel/dem-devel-data/outputs"
SHARED_CACHE="$HOME/continuous-dems/devel/dem-devel-data/cache"

# Maine: S1M -> 1/9 arc-second -> 1 arc-second fallback
globato build \
  -R -67.025/-66.93/44.9/44.94 \
  -X 6:5 \
  -P epsg:4269+5703 \
  -E 0.1111111s \
  -O glob_tnm_hierarchy_maine_canada \
  -D "$OUTPUT_BASE/tnm-hierarchy-maine" \
  --shared-cache "$SHARED_CACHE" \
  --fail-fast \
  glob-tnm:products=s1m/1_9as/1_as

# San Diego: overlapping 1 m project chronology
globato build \
  -R -117.49587906076326/-117.47987906076327/33.49528726108119/33.51128726108119 \
  -X 6:5 \
  -P epsg:4269+5703 \
  -E 0.1111111s \
  -O glob_tnm_chronology_overlap \
  -D "$OUTPUT_BASE/tnm-chronology-overlap" \
  --shared-cache "$SHARED_CACHE" \
  --fail-fast \
  glob-tnm:products=1m

# Alaska: 5 m and lower-resolution fallback chain
globato build \
  -R -133.8392427767966/-133.8192427767966/57.95197101393399/57.97197101393399 \
  -X 6:5 \
  -P epsg:4269+5703 \
  -E 0.1111111s \
  -O glob_tnm_hierarchy_alaska \
  -D "$OUTPUT_BASE/tnm-hierarchy-alaska" \
  --shared-cache "$SHARED_CACHE" \
  --fail-fast \
  glob-tnm:products=5m/1_9as/1_3as/1_as/2_as

# Alaska: standalone 2 arc-second path
globato build \
  -R -134.1/-133.6/57.95/58.3 \
  -X 6:5 \
  -P epsg:4269+5703 \
  -E 3s \
  -O glob_tnm_alaska_2as_standalone \
  -D "$OUTPUT_BASE/tnm-alaska-2as" \
  --shared-cache "$SHARED_CACHE" \
  --fail-fast \
  glob-tnm:products=2_as

Out of scope

This PR does not put coastline policy into TNM, replace existing Globato bundles, or change established workflows unless glob-tnm is explicitly requested.

Supporting evidence

The attached evidence bundle contains the exact reviewed candidate patch, revision identities, repository validation, TNM hierarchy and chronology diagnostics, Newport no-regression comparison, reproducible commands, and supporting artifacts generated by dem-devel.

evidence_bundle.zip


Checklist

  • PR title is descriptive
  • PR body contains links to related and resolved issues (e.g. closes #1)
  • If needed, CHANGELOG.md updated
  • If needed, docs and/or README.md updated
  • If needed, unit tests added
  • All checks passing
  • At least one approval

@camante
camante requested a review from matth-love September 8, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant