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 thebase_statof the terrain under it, without touchingheight. 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
baseleft as NaN.Requires the optional
heightextra:rasterioandrasterstats.