echo6-docs/vault/docs/software/geo-tools.md
Matt Johnson 44f0257376 docs: migrate Authentik (SSO keystone) to edge2 CT 105
- Authentik -> edge2 CT 105 (Postgres pg_dump/restore; SECRET_KEY carried verbatim; zero-downtime until ~2s cutover)
- Multi-block Caddy cutover: auth.echo6.co + notes.echo6.co outpost/forward_auth -> 100.64.0.36:9000
- runbook: add reboot tailscale-before-docker gotcha; clarify dnsmasq must NOT be repointed (points at Caddy host)
- source left stopped + intact on Contabo as cold rollback

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 05:49:07 +00:00

2 KiB

Geo Processing Tools — Cortex

Overview

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
gdalinfo GDAL 3.8.4 gdal-bin (apt) Raster metadata inspection
gdal_translate GDAL 3.8.4 gdal-bin (apt) Raster format conversion
gdalbuildvrt GDAL 3.8.4 gdal-bin (apt) Virtual raster mosaics
ogr2ogr GDAL 3.8.4 gdal-bin (apt) Vector format conversion
tippecanoe v2.49.0 tippecanoe (apt) GeoJSON → vector tiles (MBTiles/PMTiles)
pmtiles v1.30.2 go-pmtiles (binary) PMTiles inspection, conversion, tile extraction

Installed: 2026-04-22

Ephemeral Scratch Convention

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".

Data Tier Architecture

Tier Host Role Example
Archive pi-nas (192.168.1.245) Source of truth, recovery /export/data/nav/hillshade-na.pmtiles
Compute cortex (192.168.1.150) Batch processing, scratch /home/zvx/scratch/nav-processing/
Operational VM 1130 (192.168.1.130) Serving tiles via nginx /mnt/nav/tiles/