Install
openclaw skills install @ruiduobao/geoskill-building-footprint-heightopenclaw skills install @ruiduobao/geoskill-building-footprint-heightExtract 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.
Use when the user wants to:
# 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
| Parameter | Default | Description |
|---|---|---|
--dsm | None | Path to DSM GeoTIFF |
--dtm | None | Path to DTM GeoTIFF |
--footprints | None | Path to building footprints GeoJSON/Shapefile |
--point-cloud | None | Path to LiDAR point cloud (LAS/CSV) |
--height-method | dsm_minus_dtm | Height estimation method |
--floor-height | 3.0 | Assumed floor height in meters |
--output-dir | ./bfh-output | Output directory |
--standard-config | None | Path to building height standards JSON |
--bbox | None | W,S,E,N in WGS-84 (auto-downloads Copernicus GLO-30 DEM) |
--date-range | None | START,END ISO-8601 (optional for time-invariant DEM) |
--aoi-file | None | GeoJSON polygon; its bbox is used for the query |
--cache-dir | None | Override the data-fetcher cache directory |
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.
| Method | Priority | Requirements | Quality |
|---|---|---|---|
dsm_minus_dtm | 1 (recommended) | DSM + DTM rasters | Code 1 (best) |
point_cloud_quantile | 2 | LiDAR point cloud | Code 2 |
shadow_based | 3 | Shadow length + solar angle | Code 3 |
| File | Description |
|---|---|
buildings_3d.geojson | Building footprints with height/volume/floors |
height.tif (.npy + meta) | Building height raster |
building_stats.csv | Per-building statistics |
quality_flags.geojson | Buildings with quality issues |
report.html | Human-readable HTML report |
request.json | Analysis request metadata |
dataset-manifest.json | Dataset inventory |
output-manifest.json | Output file inventory |
qa.json | Quality assurance checks |
| Code | Label | Meaning |
|---|---|---|
| 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 |
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.
Height = quantile(points_z, 0.95) - quantile(points_z, 0.05)
Requires ≥10 points per building. Ground reference is 5th percentile.
floors = round(height / floor_height)
Floor height is an assumption (default 3.0m residential). Min/max range accounts for ±0.5m uncertainty.
V = footprint_area × height × roof_factor
Roof factors: flat=1.0, pitched=0.85, complex=0.9
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Argument error |
| 3 | Dependency missing |
| 6 | Data validation failure |
| 7 | Processing failure |