cityImage.buildings_base_from_dtm#

cityImage.buildings_base_from_dtm(buildings_gdf, dtm_path, base_stat='mean', all_touched=False, min_valid_elev=-50.0)[source]#

Assign per-building ground elevation (base) from a bare-earth DTM.

The DTM-only counterpart of buildings_height_from_dem_dtm(): it gives every footprint the base_stat of the terrain under it, without touching height. Use it when a city has building heights from another source (detailed layer, OSM tags) but the terrain relief should still feed the 3D sight lines.

Non-destructive: buildings outside the raster extent keep their row, with base left as NaN.

Requires the optional height extra: rasterio and rasterstats.