Install
openclaw skills install @ruiduobao/geoskill-rooftop-solar-inventoryInventory building rooftop solar potential: available area, slope/aspect, shading, and PV capacity/energy yield/economic viability. Outputs building-level candidate rankings for solar deployment.
openclaw skills install @ruiduobao/geoskill-rooftop-solar-inventoryAssesses building-level rooftop solar potential by extracting roof planes, computing slope/aspect and shading, deducting setbacks and obstacles, and estimating installed capacity, annual energy yield, and economics.
Use when the user wants to:
# Basic analysis with synthetic demo data
python scripts/rooftop_solar_inventory.py --output-dir ./rsi-output
# With custom setback and panel type
python scripts/rooftop_solar_inventory.py \
--setback 1.5 \
--panel-type hjt_700w \
--output-dir ./rsi-output
# With custom economic parameters
python scripts/rooftop_solar_inventory.py \
--electricity-price 0.65 \
--annual-ghi 1600 \
--system-lifetime 30 \
--output-dir ./rsi-output
# With building footprints file
python scripts/rooftop_solar_inventory.py \
--buildings ./data/buildings.geojson \
--dsm ./data/dsm.tif \
--output-dir ./rsi-output
本 skill 可自动从 Microsoft Planetary Computer + NASA POWER 下载数据 (无需 API key):
# 自动下载 MS Buildings 建筑足迹 + NASA POWER GHI 太阳辐射
python scripts/rooftop_solar_inventory.py \
--bbox 116.38,39.90,116.42,39.94 \
--date-range 2024-06-01,2024-06-30 \
--output-dir ./rsi-auto
下载的内容:
ms-buildings collection on MPC) — 建筑足迹,替换 --buildingsALLSKY_SFC_SW_DWN) — 日均太阳辐照度,写入 nasa_power_ghi.csv,并自动计算 annual GHI 替换默认值下载元数据(data_source, fetched_at, collection, nasa_power_path)会写入 output-manifest.json。
| Parameter | Default | Description |
|---|---|---|
--buildings | None | Building footprints (GeoJSON/Shapefile) |
--dsm | None | Digital Surface Model GeoTIFF |
--point-cloud | None | Point cloud file (LAS/LAZ) |
--setback | 1.0 | Edge setback in meters |
--panel-type | mono_perc_540w | Panel type: mono_perc_540w, mono_perc_600w, hjt_700w |
--min-contiguous-area | 10.0 | Minimum contiguous area in m2 |
--annual-ghi | 1400 | Annual Global Horizontal Irradiance in kWh/m2 |
--performance-ratio | 0.82 | System performance ratio |
--electricity-price | 0.55 | Electricity price in CNY/kWh |
--discount-rate | 0.06 | Discount rate for NPV calculation |
--system-lifetime | 25 | System lifetime in years |
--output-dir | ./rsi-output | Output directory |
| File | Description |
|---|---|
roof_planes.geojson | Roof plane polygons with slope, aspect, area |
solar_candidates.geojson | Candidate buildings with solar potential |
building_potential.csv | Ranked building-level results table |
shading.tif | Shading mask (requires DSM input) |
request.json | Analysis request metadata |
dataset-manifest.json | Dataset inventory |
output-manifest.json | Output file inventory and statistics |
qa.json | Quality assurance checks |
run.log | Execution log |
| Code | Name | Description |
|---|---|---|
| 1 | high | DSM-based segmentation, reliable geometry |
| 2 | medium | Mixed data sources, acceptable confidence |
| 3 | low | No DSM, assumed flat roof |
| 4 | invalid | Processing error or invalid geometry |
| Code | Name | Description |
|---|---|---|
| 0 | flat | Slope < 5° |
| 1 | single_slope | Single inclined plane |
| 2 | gable | Two-slope gable roof |
| 3 | complex | Multi-plane or steep (>45°) |
Without DSM: assumes flat roof (single plane = building footprint), marked low confidence. With DSM: segments roof using slope/aspect clustering on connected components.
Computed from DSM using numpy gradient method:
Ray-casting from each pixel toward sun position. A pixel is shaded if terrain blocks the sun at the given azimuth/altitude. Supports multi-pass annual shading.
Subtracts edge setback (negative buffer), obstacles, and filters by minimum contiguous area. Handles MultiPolygon by taking largest component.
Composite score (0-1) based on:
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Argument error |
| 3 | Dependency missing |
| 6 | Data validation failure |
| 7 | Processing failure |
本 skill 可自动从 Microsoft Planetary Computer 下载数据 (无需 API key):
python rooftop_solar_inventory.py --bbox 116,39,117,40 --date-range 2024-06-01,2024-06-30 --output-dir <tmp>
--bbox W,S,E,N: WGS-84 边界框 (西, 南, 东, 北)--date-range START,END: 日期范围 (YYYY-MM-DD,YYYY-MM-DD)--aoi-file <path.geojson>: 替代 --bbox 的 GeoJSON 多边形--cache-dir <path>: 缓存目录 (默认 ~/.geoskill_cache)当用户只给 --bbox + --date-range (没有 --buildings) 时,skill 自动下载数据。
当用户给 --buildings 时,走原文件路径 (向后兼容)。