Skip to content

Switch NASA SRTM source to new LP DAAC cloud URL#27

Open
scottstanie wants to merge 2 commits intomasterfrom
fix-nasa-source
Open

Switch NASA SRTM source to new LP DAAC cloud URL#27
scottstanie wants to merge 2 commits intomasterfrom
fix-nasa-source

Conversation

@scottstanie
Copy link
Copy Markdown
Owner

@scottstanie scottstanie commented Mar 13, 2026

Summary

  • The old e4ftl01.cr.usgs.gov/MEASURES endpoint is down (empty/unavailable)
  • Migrates NASA SRTM and water mask downloads to the new LP DAAC cloud location at data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected
  • The new URL structure nests the tile filename as both a subdirectory and the file itself (e.g. .../SRTMGL1.003/N41W112.SRTMGL1.hgt/N41W112.SRTMGL1.hgt.zip)
  • Same EDL authentication still works
  • Also fixes the default output format for NASA sources: the CLI now forces ENVI format so the default output is elevation.dem instead of elevation.tif, which caused gdal.Open to fail during EGM-to-WGS84 conversion (raw binary file with .tif extension wasn't a real GeoTIFF)

Closes #26
Fixes #14

Test plan

  • All existing unit tests and doctests pass with updated URLs
  • Verify end-to-end download of a NASA SRTM tile with EDL credentials
  • Verify sardem --data-source NASA --bbox ... produces elevation.dem by default

🤖 Generated with Claude Code

scottstanie and others added 2 commits March 13, 2026 09:31
The old e4ftl01.cr.usgs.gov/MEASURES endpoint is down. Migrate to the
new data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected location,
which uses a different URL structure where the tile filename appears
as both a subdirectory and the file (e.g. .../SRTMGL1.003/N41W112.SRTMGL1.hgt/N41W112.SRTMGL1.hgt.zip).

Closes #26

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When using --data-source NASA without explicit -o, the CLI defaulted to
elevation.tif (GTiff format). But the NASA code path writes raw binary +
.rsc sidecar, so GDAL couldn't open the file during EGM-to-WGS84
conversion (it expected a real GeoTIFF).

Fix: force output_format to ENVI for NASA sources in the CLI, which
makes the default output name elevation.dem. Also assert ENVI format
in dem.main() as a safety net.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

NASA, NASA_WATER fail to download Error in conversion for output format GTiff using SRTM

1 participant