Install
openclaw skills install @ruiduobao/geoskill-hillshade-visualizationMulti-directional hillshade with vertical exaggeration and color overlay using the Horn algorithm
openclaw skills install @ruiduobao/geoskill-hillshade-visualizationComputes hillshade using the Horn (1981) algorithm, with support for multi-directional weighted compositing (highlighting terrain textures of different orientations), vertical exaggeration via the zfactor, and terrain color overlay.
Multi-directional compositing computes the hillshade for each azimuth angle separately and then combines them with the given weights (automatically normalized).
Horn 3×3 differencing yields dz/dx, dz/dy → slope/aspect → sin(alt)cos(slope)+cos(alt)sin(slope)cos(az-aspect); the multi-directional output is the normalized weighted sum of the per-azimuth hillshades.
pip install numpy rasterio scipy matplotlib geopandas shapely pillow
python geoskill-hillshade-visualization.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-hillshade-visualization.py --input dem.tif --azimuths 315 270 --weights 0.7 0.3
python geoskill-hillshade-visualization.py --input dem.tif --altitude 30 --zfactor 2
python geoskill-hillshade-visualization.py --input dem.tif --cmap gray
python geoskill-hillshade-visualization.py --bbox 116 39 117 40 --synthetic --zfactor 3
| File | Format | Description |
|---|---|---|
color_shaded.png | PNG | Color-overlaid hillshade (primary output) |
hillshade.tif | GeoTIFF | Hillshade raster [0,1] (verifiable output) |
hillshade_meta.json | JSON | Azimuths/weights/statistics |
Each run also produces output-manifest.json (run manifest).
Local GeoTIFF / vector files; --synthetic mode generates physically consistent simulated data, fully offline.
--synthetic mode requires no network at all.MIT
用 Horn (1981) 算法计算山体阴影,支持多方向加权合成(突出不同走向的地形纹理)、垂直夸张 zfactor 与地形色彩叠加。
多方向合成对每个方位角分别求 hillshade 再按权重(自动归一化)加权。
Horn 3×3 差分求 dz/dx,dz/dy → slope/aspect → sin(alt)cos(slope)+cos(alt)sin(slope)cos(az-aspect);多方向为各方位角 hillshade 的归一化加权和。
pip install numpy rasterio scipy matplotlib geopandas shapely pillow
python geoskill-hillshade-visualization.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-hillshade-visualization.py --input dem.tif --azimuths 315 270 --weights 0.7 0.3
python geoskill-hillshade-visualization.py --input dem.tif --altitude 30 --zfactor 2
python geoskill-hillshade-visualization.py --input dem.tif --cmap gray
python geoskill-hillshade-visualization.py --bbox 116 39 117 40 --synthetic --zfactor 3
| 文件 | 格式 | 说明 |
|---|---|---|
color_shaded.png | PNG | 色彩叠加山体阴影(主产物) |
hillshade.tif | GeoTIFF | 山体阴影栅格 [0,1](可验证产物) |
hillshade_meta.json | JSON | 方位/权重/统计 |
每次运行还会产出 output-manifest.json(运行清单)。
本地 GeoTIFF / 矢量文件;--synthetic 模式生成物理一致的模拟数据,完全离线。
--synthetic 模式完全无网络。MIT