Add 3DEP_1M data source for native 1-meter DEMs#25
Open
scottstanie wants to merge 4 commits intomasterfrom
Open
Add 3DEP_1M data source for native 1-meter DEMs#25scottstanie wants to merge 4 commits intomasterfrom
scottstanie wants to merge 4 commits intomasterfrom
Conversation
The existing 3DEP source uses the ImageServer which resamples to ~30m. 3DEP_1M queries the TNM Access API for 1m tiles and fetches them as COGs from S3 via /vsicurl/. Uses a two-step GDAL warp: first reproject from source UTM to EPSG:4326, then convert NAVD88 to WGS84 ellipsoidal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The dateline bbox splitting used shapely to split polygons at 180 degrees, but this is unnecessary for axis-aligned bounding boxes — simple arithmetic suffices. This also fixes CI failures where shapely was not installed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
--data-source 3DEP_1Mfor accessing native 1-meter resolution lidar DEMs from the USGS 3DEP program/vsicurl/Why a separate source from
3DEP?The existing
3DEPsource uses the ImageServerexportImageendpoint, which dynamically resamples all 3DEP data at the requested resolution (hardcoded to ~30m viaDEFAULT_RES). While the ImageServer can serve 1m data at fine pixel sizes, it has practical limitations:The
3DEP_1Mapproach:Key fix during review
The original implementation set
srcSRS = "EPSG:4269+5703"(NAD83 geographic + NAVD88), but 1m tiles are in NAD83/UTM (meters). This would cause GDAL to misinterpret UTM meter coordinates as geographic degrees. Fixed with a two-step warp:Test plan
sardem --bbox -118.4 33.7 -118.3 33.8 --data-source 3DEP_1M -o test_3dep_1m.tif🤖 Generated with Claude Code