数据分析

Geoskill: Building Footprint Height

试用

Extract building footprints and estimate height, floor count proxy, and volume from DSM/DTM/LiDAR data. Produces 2.5D urban models for 3D city modeling, population downscaling, and risk exposure analysis.

它能做什么

Extract building footprints and estimate height, floor count proxy, and volume from DSM/DTM/LiDAR data. Produces 2.5D urban models for 3D city modeling, population downscaling, and risk exposure analysis.

技能文档

Building Footprint Height

Extract building heights from elevation data (DSM, DTM, LiDAR point cloud) and building footprints. Estimates height, floor count proxy, volume, and quality codes for each building.

Trigger

Use when the user wants to:

  • Estimate building heights from DSM/DTM raster data
  • Compute building volumes and floor count proxies
  • Generate 2.5D urban models for 3D city visualization
  • Assess building data quality and flag anomalies
  • Prepare building data for population downscaling or risk exposure

CLI Usage

# Synthetic demo mode (no input files needed)
python scripts/building_footprint_height.py --output-dir ./bfh-output

# With custom floor height assumption
python scripts/building_footprint_height.py --floor-height 3.6 --output-dir ./bfh-output

# With point cloud method
python scripts/building_footprint_height.py --height-method point_cloud_quantile --output-dir ./bfh-output

# With custom standards
python scripts/building_footprint_height.py --standard-config ./my-standards.json --output-dir ./bfh-output

Parameters

ParameterDefaultDescription
--dsmNonePath to DSM GeoTIFF
--dtmNonePath to DTM GeoTIFF
--footprintsNonePath to building footprints GeoJSON/Shapefile
--point-cloudNonePath to LiDAR point cloud (LAS/CSV)
--height-methoddsm_minus_dtmHeight estimation method
--floor-height3.0Assumed floor height in meters
--output-dir./bfh-outputOutput directory
--standard-configNonePath to building height standards JSON
--bboxNoneW,S,E,N in WGS-84 (auto-downloads Copernicus GLO-30 DEM)
--date-rangeNoneSTART,END ISO-8601 (optional for time-invariant DEM)
--aoi-fileNoneGeoJSON polygon; its bbox is used for the query
--cache-dirNoneOverride the data-fetcher cache directory

数据下载 (Data Download)

This skill can auto-download the elevation input from the Microsoft Planetary Computer STAC catalog. No API key is required.

# Download one Copernicus GLO-30 DEM tile over central Beijing and run the
# pipeline using it as a stand-in DSM (the script falls back to a
# percentile-DTM approximation when no DTM is supplied).
python scripts/building_footprint_height.py \
  --bbox 116.0,39.5,116.8,40.0 \
  --output-dir ./bfh-output

The downloaded asset is cached under ~/.geoskill_cache/ so a second run with the same --bbox reuses the file. The download route also accepts --aoi-file my_polygon.geojson instead of --bbox.

Height Methods

MethodPriorityRequirementsQuality
dsm_minus_dtm1 (recommended)DSM + DTM rastersCode 1 (best)
point_cloud_quantile2LiDAR point cloudCode 2
shadow_based3Shadow length + solar angleCode 3

Output

FileDescription
buildings_3d.geojsonBuilding footprints with height/volume/floors
height.tif (.npy + meta)Building height raster
building_stats.csvPer-building statistics
quality_flags.geojsonBuildings with quality issues
report.htmlHuman-readable HTML report
request.jsonAnalysis request metadata
dataset-manifest.jsonDataset inventory
output-manifest.jsonOutput file inventory
qa.jsonQuality assurance checks

Quality Codes

CodeLabelMeaning
1高度可靠DSM-DTM, coverage >80%
2高度较可靠Point cloud quantile, >50 points
3高度估算Shadow-based or coarse DEM
4高度可疑Coverage <50% or anomaly detected
5高度缺失No valid data

Key Algorithms

DSM-DTM Height

Height = quantile(DSM_footprint, 0.95) - median(DTM_footprint)

Uses robust quantile to exclude outliers (antennas, trees). Edge buffer (default 0.5m) excludes mixed-boundary pixels.

Point Cloud Quantile

Height = quantile(points_z, 0.95) - quantile(points_z, 0.05)

Requires ≥10 points per building. Ground reference is 5th percentile.

Floor Count Proxy

floors = round(height / floor_height)

Floor height is an assumption (default 3.0m residential). Min/max range accounts for ±0.5m uncertainty.

Volume

V = footprint_area × height × roof_factor

Roof factors: flat=1.0, pitched=0.85, complex=0.9

Exit Codes

CodeMeaning
0Success
2Argument error
3Dependency missing
6Data validation failure
7Processing failure

Limitations

  • Synthetic demo mode only; file-based mode requires GeoTIFF/GeoJSON input
  • Floor count is a proxy — actual floors may differ
  • Shadow method requires manual shadow length measurement
  • Does not produce true 3D mesh models (2.5D only)
  • Coarse DEM (e.g., SRTM) should NOT be used for individual building heights
  • Tree mixing may inflate height estimates in vegetated areas

References

  • OSM Building Heights dataset
  • Microsoft Building Footprints
  • AHN (Actueel Hoogtebestand Nederland) DSM/DTM
  • USGS 3DEP LiDAR point clouds

相关技能

Estimate building footprint density and floor area ratio (FAR) from building footprints and heights using kernel density estimation.

Estimate population density from building volume, residential ratio, night-light correction and land-cover weights with total conservation.

1 次安装

Object-level building change detection between two epochs. Identifies new, demolished, expanded, reduced, split, and merged buildings from footprint vectors. Use when comparing two building datasets, auditing construction changes, or generating building change reports.

1 次安装

Detect and quantify urban expansion from multi-temporal built-up rasters. Use when the user wants to analyze changes, compare multi-temporal rasters, compute indices, or generate assessment reports.

1 次安装

Read LAS/LAZ/COPC point clouds, compute statistics, classification QA, DEM/DSM/CHM rasters, cross-sections, density maps, and quality reports. Use when analyzing LiDAR point cloud data, generating terrain models, checking point cloud quality, or producing canopy height models.

1 次安装