Terrain layers
Slope and aspect from USGS 3DEP — the whole chain from DEM cells to raster PMTiles.
Slope angle and aspect are computed, not downloaded. The source is USGS
3DEP — the national elevation program — published as one GeoTIFF per 1°
cell. openhunt-pipeline terrain runs the whole chain: cell download →
mosaic → gdaldem → reproject → color ramp → PMTiles.
for k in slope aspect; do
./target/release/openhunt-pipeline terrain --kind $k \
--bbox="-109.06,36.99,-102.04,41.00" \
--out data/out/terrain/$k-co.pmtiles
doneThe bbox is the state's extent; cells the ocean swallows (California's coast) are skipped automatically.
Resolution: 30 m on purpose
3DEP publishes 1/3 arc-second (~10 m) and 1 arc-second (~30 m) products. OpenHunt publishes slope and aspect from 30 m:
| Product | Per 1° cell | Colorado (40 cells) |
|---|---|---|
| 10 m | ~425 MB | ~17 GB |
| 30 m | ~52 MB | ~2 GB |
At the zooms these layers render (z6–12), 30 m is ample — and an order of magnitude cheaper to process and store. Moving to 10 m is a flag, not a code change.
Slope is computed before reprojection
Slope runs on the geographic DEM with a degrees-to-metres scale, then the result is warped to Web Mercator. Deriving slope after the warp would bake in Mercator's latitude stretch and progressively overstate steepness toward the north — wrong in a way that still looks plausible on a map.
The DEM the clients use
Hillshade, 3D terrain, and elevation profiles sample terrarium-encoded DEM tiles. For mobile offline packs there's a helper that builds a state DEM pack (z11 deliberately — terrarium PNGs barely compress, and z12 costs ~4× for detail hillshade can't show).