Vineyard terrain
Cold air drains downhill and pools in the low ground, so where a block sits matters as much as what’s planted on it. This pipeline reads a LiDAR elevation tile and maps slope, aspect, and where the cold air goes.

How the terrain analysis reads a hillside
- A public LidarBC tile at 1 m resolution: 245 m of relief, shaded from the northwest.
- Slope from the elevation gradient. The steep valley walls show brightest.
- Aspect: south-facing ground, in white, takes the sun. North-facing ground stays dark and cold.
- On a calm night cold air drains downhill like water and collects in the low ground.
Pipeline
A FastAPI backend reads a LidarBC 1 m DEM with rasterio. Slope and aspect come from the elevation gradient in NumPy and SciPy. Hydrology runs through WhiteboxTools: breach the depressions first, so 1 m LiDAR speckle can’t dam the drainage, then accumulate flow.
Map
Each layer lands on a browser map as an overlay with its own opacity control.
Tests
A pytest suite covers every stage on its own, plus an end-to-end integration run.
This tile
Everything in the explainer is the pipeline’s real output on one public tile, chosen for its relief: 245 m from the valley floor to the ridge.