← ClaudeAtlas

raster-and-terrainlisted

Working correctly with rasters and elevation models in GDAL, rasterio and ArcGIS, covering resampling choices, nodata, Cloud-Optimized GeoTIFF (overviews, tiling, gdal_translate -of COG), DEM slope, aspect and hillshade with the right z-factor, zonal statistics pitfalls (cell alignment, all-touched) and mosaicking tiles. Use it when asked to "make a hillshade", "calculate slope", "resample", "reproject a raster", "convert to COG", "mosaic DEM tiles", "zonal statistics by parcel", or when slope values look absurd or a raster has holes or edge stripes.
wiatrek-kevin-s/columbus · ★ 2 · AI & Automation · score 68
Install: claude install-skill wiatrek-kevin-s/columbus
# Raster and terrain A raster is a grid of numbers with a CRS, a cell size, an origin and a nodata value. Most raster mistakes are silent: the output looks like a picture of the right thing but the numbers are wrong. Check the four properties first, every time. ```bash gdalinfo -stats dem.tif # CRS, origin, pixel size, data type, nodata, min/max ``` ## General practice (with or without Columbus) ### 1. Know what the cells mean - **Continuous**: elevation, temperature, reflectance, distance. Values can be averaged. - **Categorical**: land cover, soil class, zoning codes. Values are labels. Averaging `41` (deciduous forest) and `82` (crops) gives nonsense. - Data type: `Byte` (0 to 255), `Int16`, `UInt16`, `Float32`. Compute indices and derivatives in `Float32`, or integer division and overflow wreck them. - Vertical units and datum for elevation: metres or feet; NAVD88 (orthometric) or ellipsoid heights. In the US the two differ by tens of metres. Never mix them in one mosaic or difference. ### 2. Resampling | Data | Upsampling or same size | Downsampling (coarser cells) | | --- | --- | --- | | Categorical (land cover, classes, IDs) | `near` (nearest neighbour) | `mode` (majority) | | Continuous (elevation, temperature) | `bilinear` or `cubic` | `average` | | Counts, totals (population per cell) | avoid, or redistribute | `sum` (GDAL 3.1+) | | Imagery for display | `cubic` or `lanczos` | `average` | - `cubic` and `lanczos` can overshoot: negative rainf