Ancillary input reproduction
The pinned online recipes download a single 3D-GloBFP grid and archive, four open CHMv2 COG and date sidecar pairs, and two Copernicus DSM tiles. The downloader verifies all 12 file hashes and can resume partial downloads. The dates, licenses and spatial coverage are documented in the manifests. Download paths and expected SHA‑256 digests · Inventory manifest
Run from the repository root with the pinned Python environment. Build the raw OSM feature cache first because both optional geometry preparations use its municipal boundary.
sh scripts/fetch_building_inputs.sh
.venv/bin/python scripts/extract_osm.py
.venv/bin/python scripts/fetch_ancillary_inputs.py
.venv/bin/python scripts/prepare_globfp.py
.venv/bin/python scripts/build_inventory.py --globfp data/processed/inventory/globfp.parquet
.venv/bin/python scripts/prepare_canopy.py
.venv/bin/python scripts/prepare_terrain.py \
--dem data/raw/copernicus-dem/Copernicus_DSM_COG_10_N44_00_E025_00_DEM.tif \
--dem data/raw/copernicus-dem/Copernicus_DSM_COG_10_N44_00_E026_00_DEM.tif
The GloBFP preparation intersects the raw WGS84 polygons with the municipality plus a projected 1 km buffer. It preserves the original geometry and height with a deterministic ID combining the tile, original FID, geometry digest and height. The CHMv2 preparation makes a 3 m Stereo 70 mosaic over the municipal envelope plus 2 km, with maximum resampling and the original internal validity masks. Zero canopy height remains valid. Imagery dates come from the source patch metadata. The DSM processor uses the buffered model geometry and the CHMv2 mosaic to reject raised returns, then fills and smooths the remaining surface for terrain sensitivity.
To replay the last three preparation stages into a separate write target with the same verified inputs, run the commands below. The replay reproduced the GloBFP and terrain files byte-for-byte. The canopy raster reproduced all 73,782,492 values and validity bits, its georeferencing and its imagery metadata. The canopy TIFF encoding has a different SHA‑256 digest. The lists of computed digests and checked sizes are saved with the final results. Ancillary replay checks · Cold-cache download smoke test
replay_dir=$(mktemp -d)
.venv/bin/python scripts/prepare_globfp.py --output "$replay_dir/globfp.parquet"
.venv/bin/python scripts/prepare_canopy.py --output "$replay_dir/canopy_height_3m.tif"
.venv/bin/python scripts/prepare_terrain.py \
--dem data/raw/copernicus-dem/Copernicus_DSM_COG_10_N44_00_E025_00_DEM.tif \
--dem data/raw/copernicus-dem/Copernicus_DSM_COG_10_N44_00_E026_00_DEM.tif \
--canopy "$replay_dir/canopy_height_3m.tif" --output "$replay_dir/terrain_sensitivity_30m.tif"
.venv/bin/python scripts/check_ancillary_replay.py "$replay_dir"