DEM processing, vector tile generation, and PMTiles manipulation tools installed on cortex for compute-tier geospatial batch jobs. Cortex is compute-only — no persistent operational data lives here. Data flows: pi-nas (archive) → cortex (compute) → pi-nas + VM 1130 (outputs).
## Installed Tools
| Tool | Version | Package | Purpose |
|------|---------|---------|---------|
| gdal_contour | GDAL 3.8.4 | gdal-bin (apt) | Generate contour lines from DEM rasters |
All temporary/staging data goes in `/home/zvx/scratch/`. This directory is cleaned after batch jobs complete. Never treat scratch as persistent storage.
Typical layout:
```
/home/zvx/scratch/
└── nav-processing/ # Current: staged DEM for contour generation
└── hillshade-na.pmtiles # 93 GB terrarium DEM (from pi-nas archive)
```
## Terrarium DEM Decode
The Mapzen Terrarium format encodes elevation in RGB PNG tiles:
```
elevation_meters = (R * 256 + G + B/256) - 32768
```
To use with GDAL: decode RGB → Float32 elevation array → write as GeoTIFF via VRT with `subClass="VRTRawRasterBand"`.