建筑屋顶光伏潜能智能评估
简介
基于卫星遥感和3D建模技术,自动评估建筑屋顶光伏安装潜力,输出装机容量、发电收益及经济可行性排名,助力清洁能源投资决策。
原始描述
Inventory building rooftop solar potential: available area, slope/aspect, shading, and PV capacity/energy yield/economic viability. Outputs building-level candidate rankings for solar deployment.
通过你的 Agent 添加
安装目录:geoskill-rooftop-solar-inventory/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
Rooftop Solar Inventory 是一款面向建筑屋顶光伏开发的综合评估工具,通过整合多源地理空间数据,实现从屋顶几何提取到经济可行性分析的全流程自动化。用户可通过命令行接口输入建筑轮廓、数字表面模型(DSM)或点云数据,或直接指定地理边界框触发自动数据下载。系统默认集成 Microsoft Planetary Computer 的全球建筑足迹数据和 NASA POWER 的太阳辐射数据集,无需 API 密钥即可快速启动分析。
核心工作流程包括:屋顶平面分割与坡度/朝向计算、阴影遮挡分析、可用面积扣减(含安全退界和障碍物剔除)、光伏系统容量配置、年发电量估算及净现值(NPV)、平准化度电成本(LCOE)等经济指标计算。最终输出包含分级排序的候选建筑列表、质量评级报告及可视化 GIS 图层,支持直接用于可行性研究和投资筛选。
显著优点
数据获取零门槛:内置 Microsoft Planetary Computer 和 NASA POWER 自动下载能力,覆盖全球建筑足迹与太阳辐射数据,省去数据采购和预处理环节。 多源数据兼容:支持 GeoJSON/Shapefile 建筑轮廓、GeoTIFF 格式的 DSM 以及 LAS/LAZ 点云,适应不同数据可用性场景。 工程级算法:采用基于 numpy 梯度的坡度/坡向计算、光线追踪阴影模拟、连通域聚类分割等成熟算法,确保几何分析可靠性。 经济模型完整:集成性能比(PR)、方位角修正、阴影损失等关键参数,支持25-30年全生命周期财务分析。 质量分级体系:四级置信度编码(high/medium/low/invalid)帮助用户快速识别数据可靠区域,避免误用低质量结果。
潜在缺点与局限性
数据依赖性制约:缺乏 DSM 时系统强制假设平屋顶,导致复杂屋顶形态识别失败,质量等级自动降级为 "low"。 阴影简化处理:当前采用单一时点或粗粒度多时点阴影模拟,未实现逐小时动态遮蔽分析,可能低估周边建筑或植被的遮挡影响。 工程边界缺失:不涉及结构荷载评估、屋顶产权/租赁状态核查、电网接入条件调查等关键开发约束,输出结果仅为初步筛选依据。 成本估算通用性:默认电价和系统成本参数基于行业均值,未考虑地区差异、组件价格波动及补贴政策变化,经济结果仅供趋势参考。 中文本地化有限:核心文档和输出字段以英文为主,国内用户需自行适配电价单位(CNY/kWh)和政策术语。
适合的目标群体
本技能主要面向以下用户场景: 清洁能源开发商:用于大规模建筑资产组合的光伏潜力初筛,快速识别高优先级项目标的; 城市能源规划部门:支持区域分布式光伏资源普查和装机潜力测算; 房地产/物业资产管理:评估自有屋顶资产的能源开发价值和ESG报告数据支撑; 科研与咨询机构:生成标准化、可复现的屋顶太阳能数据集用于学术研究或政策分析; 金融机构尽调团队:作为绿色资产估值的辅助数据来源,提供技术层面的产能和收益基准。
使用风险
计算资源需求:阴影光线追踪和屋顶分割对内存和CPU占用较高,大规模区域(>1000栋建筑)建议分块处理或配置高性能计算环境。 依赖项管理:依赖 GDAL、rasterio、shapely 等空间计算库,Windows 环境安装易出现编译问题,推荐 Linux/Mac 或 Docker 部署。 坐标系一致性:输入数据需统一至投影坐标系(建议 UTM 或本地 CGCS2000 分带),混用 WGS84 与投影坐标将导致面积和坡度计算误差。 时效性风险:自动下载的 MS Buildings 和 NASA POWER 数据存在更新周期,老旧建筑或短期气候异常可能未被及时反映。 决策边界风险:工具明确标注输出为 "auxiliary analysis only",直接用于工程发包或融资决策需补充专业勘察和合规审查。
技能正文
name: rooftop-solar-inventory
description: >
Inventory building rooftop solar potential: available area, slope/aspect,
shading, and PV capacity/energy yield/economic viability.
Outputs building-level candidate rankings for solar deployment.
Rooftop Solar Inventory
Assesses 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.
Trigger
Use when the user wants to:
- Calculate solar PV capacity for a portfolio of buildings
- Identify high-potential rooftops without shading issues
- Rank buildings by solar economic viability
- Generate rooftop solar candidate lists for feasibility studies
- Estimate annual energy yield and financial returns for rooftop PV
CLI Usage
# 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
数据下载
# 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 (
ms-buildingscollection on MPC) — 建筑足迹,替换--buildings - NASA POWER GHI (
ALLSKY_SFC_SW_DWN) — 日均太阳辐照度,写入nasa_power_ghi.csv,并自动计算 annual GHI 替换默认值
下载元数据(data_source, fetched_at, collection, nasa_power_path)会写入 output-manifest.json。
Parameters
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
Output
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
Quality Codes
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
Roof Type Codes
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°)
Key Algorithms
Roof Plane Extraction
| 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 |
Quality Codes
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
Roof Type Codes
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°)
Key Algorithms
Roof Plane Extraction
| 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°) |
Key Algorithms
Roof Plane Extraction
Without DSM: assumes flat roof (single plane = building footprint), marked low confidence. With DSM: segments roof using slope/aspect clustering on connected components.
Slope and Aspect
Computed from DSM using numpy gradient method:
- slope = arctan(sqrt(gx^2 + gy^2))
- aspect = atan2(-gx, gy) mapped to 0-360°
Shading
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.
Usable Area
Subtracts edge setback (negative buffer), obstacles, and filters by minimum contiguous area. Handles MultiPolygon by taking largest component.
Solar Potential
- Capacity: n_panels = usable_area / (panel_area * (1 + spacing_ratio))
- Energy: E = capacity * GHI * PR * orientation_factor * (1 - shading)
- Economics: NPV, LCOE, payback period over system lifetime
Building Ranking
Composite score (0-1) based on:
- Installed capacity (40%)
- Economic NPV (30%)
- Specific yield (30%)
Exit Codes
Code
Meaning
0
Success
2
Argument error
3
Dependency missing
6
Data validation failure
7
Processing failure
Limitations
- Without DSM, all roofs assumed flat (low confidence)
- Shading computation is simplified (single sun position or coarse multi-pass)
- Structural suitability, roof loading, and ownership not assessed
- Economic results are indicative; actual costs vary by project
- Results are auxiliary analysis only; engineering decisions require manual review
References
- PVWatts Calculator (NREL)
- IEC 61724-1: Photovoltaic system performance monitoring
- China PV Industry Association (CPIA) annual reports
数据下载
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Argument error |
| 3 | Dependency missing |
| 6 | Data validation failure |
| 7 | Processing failure |
- Without DSM, all roofs assumed flat (low confidence)
- Shading computation is simplified (single sun position or coarse multi-pass)
- Structural suitability, roof loading, and ownership not assessed
- Economic results are indicative; actual costs vary by project
- Results are auxiliary analysis only; engineering decisions require manual review
References
- PVWatts Calculator (NREL)
- IEC 61724-1: Photovoltaic system performance monitoring
- China PV Industry Association (CPIA) annual reports
数据下载
本 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 时,走原文件路径 (向后兼容)。
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。