Coding

geoskill-urban-ventilation-corridor

Try it

Derive aerodynamic roughness and ventilation potential from building morphology and extract least-resistance ventilation corridors.

What it does

Derive aerodynamic roughness and ventilation potential from building morphology and extract least-resistance ventilation corridors.

The skill document

城市通风廊道分析 | Urban Ventilation Corridor Analysis

Derives aerodynamic roughness and ventilation potential from building morphology and extracts least-resistance ventilation corridors, supporting urban ventilation planning and thermal environment mitigation.

Core algorithm: roughness follows the simplified Macdonald empirical formula z0 = 0.1×building height×plan area density; ventilation potential VP = exp(−k×z0), monotonically decreasing with roughness; an 8-neighborhood Dijkstra on the resistance raster (1−VP+ε) finds the least-resistance path from the upwind edge to the downwind edge as the ventilation corridor. Corridor geometry is built with shapely and output as GeoJSON.

Dependencies / 依赖

pip install 'numpy' 'rasterio' 'shapely'

Usage / 使用方法

Basic Usage

python geoskill-urban-ventilation-corridor.py --bbox 116.0 39.0 117.0 40.0 [other parameters]

Examples

Example 1 (Synthetic Data (Offline))

python geoskill-urban-ventilation-corridor.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out

Example 2 (Usage 2)

python geoskill-urban-ventilation-corridor.py --input height.tif --footprints fp.tif --output-dir ./out

Example 3 (Usage 3)

python geoskill-urban-ventilation-corridor.py --bbox 121.0 31.0 122.0 32.0 --decay-k 0.8 --output-dir ./out --quiet

Example 4 (Usage 4)

python geoskill-urban-ventilation-corridor.py --input height.tif --roughness-coeff 0.15 --output-dir ./out

Example 5 (Usage 5)

python geoskill-urban-ventilation-corridor.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out --quiet

Output / 输出

FileFormatDescription
ventilation.tifGeoTIFFTwo bands: band1=roughness z0, band2=ventilation potential VP
corridor.geojsonGeoJSONLeast-resistance ventilation corridor (LineString, built with shapely)
ventilation_stats.jsonJSONMean roughness, mean ventilation potential, corridor cost/vertex count
output-manifest.jsonJSONRun manifest

Data Source / 数据源 / Source

Local building height + plan area density GeoTIFFs; --synthetic mode generates an urban scene containing a low-rise ventilation green belt.

Privacy / 隐私声明 / Privacy

  • Runs offline by default; --synthetic mode requires no network at all.
  • All processing is done locally; user data is never uploaded.

License / License

MIT



name: geoskill-urban-ventilation-corridor description: 'Derive aerodynamic roughness and ventilation potential from building morphology and extract least-resistance ventilation corridors.'

城市通风廊道分析 | Urban Ventilation Corridor Analysis

从建筑形态推导空气动力学粗糙度与通风潜力,并提取最小阻力通风廊道,服务于城市通风规划与热环境缓解。

核心算法:粗糙度采用 Macdonald 经验式简化 z0 = 0.1×建筑高度×平面面积密度;通风潜力 VP = exp(−k×z0),随粗糙度单调递减;在阻力栅格(1−VP+ε)上用 8 邻域 Dijkstra 求上风缘到下风缘的最小阻力路径作为通风廊道。廊道几何用 shapely 构建并输出 GeoJSON。

依赖

pip install 'numpy' 'rasterio' 'shapely'

使用方法

基本用法

python geoskill-urban-ventilation-corridor.py --bbox 116.0 39.0 117.0 40.0 [其他参数]

示例

示例 1(合成数据(离线))

python geoskill-urban-ventilation-corridor.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out

示例 2(用法 2)

python geoskill-urban-ventilation-corridor.py --input height.tif --footprints fp.tif --output-dir ./out

示例 3(用法 3)

python geoskill-urban-ventilation-corridor.py --bbox 121.0 31.0 122.0 32.0 --decay-k 0.8 --output-dir ./out --quiet

示例 4(用法 4)

python geoskill-urban-ventilation-corridor.py --input height.tif --roughness-coeff 0.15 --output-dir ./out

示例 5(用法 5)

python geoskill-urban-ventilation-corridor.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out --quiet

输出

文件格式说明
ventilation.tifGeoTIFF双波段:band1=粗糙度 z0,band2=通风潜力 VP
corridor.geojsonGeoJSON最小阻力通风廊道(LineString,shapely 构建)
ventilation_stats.jsonJSON平均粗糙度、平均通风潜力、廊道代价/顶点数
output-manifest.jsonJSON运行清单

数据源 / Source

本地建筑高度 + 平面面积密度 GeoTIFF;--synthetic 模式生成含低矮通风绿带的城区场景。

隐私声明 / Privacy

  • 默认离线运行,--synthetic 模式完全无网络。
  • 所有处理在本地完成,不上传用户数据。

License

MIT

Related skills

Analyze urban heat island intensity and ventilation index from land surface temperature, NDVI, impervious surface and building morphology.

1 installs

Delineate urban growth boundaries from historical expansion rate and direction plus terrain, cropland and ecological constraints.

1 installs

高斯烟羽模型模拟点源污染物浓度场,Pasquill-Gifford A-F 稳定度参数化 σy/σz,叠加 DEM 地形修正。Simulates pollutant concentration fields with a Gaussian plume model plus terrain correction. 输出浓度场 GeoTIFF + 参数 JSON。

由栖息地适宜性构建阻力面,Dijkstra 最小成本路径识别生态廊道,并计算 PC 景观连通性指数。Designs ecological corridors with least-cost paths and connectivity indices. 输出阻力面与廊道 GeoTIFF + 参数 JSON。