Install
openclaw skills install @ruiduobao/geoskill-lidar-ground-classificationopenclaw skills install @ruiduobao/geoskill-lidar-ground-classificationSeparates a LiDAR point cloud (N×3 xyz) into ground points (ASPRS class 2) and non-ground points (class 1), then interpolates a bare-earth Digital Terrain Model (DTM). Two filtering methods are implemented:
Per-point classification rule: a point is classified as ground when the difference between its elevation and the gridded ground surface is ≤ z_tolerance. Synthetic mode generates a simulated point cloud of smooth terrain + buildings (rectangular boxes) + trees (Gaussian crowns), enabling offline validation of classification accuracy. Suited to DEM/DTM production, terrain analysis, and point-cloud preprocessing pipelines.
pip install numpy rasterio scipy
python geoskill-lidar-ground-classification.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-lidar-ground-classification.py \
--bbox 116.0 39.0 117.0 40.0 \
--synthetic --method pmf --cell-size 1.0 \
--output-dir ./pmf
python geoskill-lidar-ground-classification.py \
--bbox 121.0 31.0 122.0 32.0 \
--synthetic --method slope --z-tolerance 0.8 \
--output-dir ./slope
python geoskill-lidar-ground-classification.py \
--input tile_001.npy --method pmf --cell-size 2.0 \
--output-dir ./real_pmf
python geoskill-lidar-ground-classification.py \
--input tile_001.csv --cell-size 5.0 --quiet \
--output-dir ./coarse
| File | Format | Description |
|---|---|---|
classified_points.npy | NumPy (N×4) | xyz + class code (2=ground, 1=non-ground) |
dtm.tif | GeoTIFF (float32) | DTM interpolated from ground points, EPSG:4326 |
density.tif | GeoTIFF (float32) | Point density map (points per grid cell) |
stats.json | JSON | Ground point ratio, accuracy statistics (synthetic mode includes comparison against ground truth) |
output-manifest.json | JSON | Run manifest (input/output/QA/software versions) |
MIT
把 LiDAR 点云(N×3 xyz)分离为地面点(ASPRS class 2)与非地面点 (class 1),并内插生成裸地数字地形模型 DTM。实现两种滤波方法:
逐点分类规则:点高程与格网地面面之差 ≤ z_tolerance → 地面点。合成 模式生成平滑地形 + 建筑(长方体)+ 树木(高斯冠)的模拟点云,可离线 验证分类精度。适用于 DEM/DTM 生产、地形分析、点云预处理流水线。
pip install numpy rasterio scipy
python geoskill-lidar-ground-classification.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-lidar-ground-classification.py \
--bbox 116.0 39.0 117.0 40.0 \
--synthetic --method pmf --cell-size 1.0 \
--output-dir ./pmf
python geoskill-lidar-ground-classification.py \
--bbox 121.0 31.0 122.0 32.0 \
--synthetic --method slope --z-tolerance 0.8 \
--output-dir ./slope
python geoskill-lidar-ground-classification.py \
--input tile_001.npy --method pmf --cell-size 2.0 \
--output-dir ./real_pmf
python geoskill-lidar-ground-classification.py \
--input tile_001.csv --cell-size 5.0 --quiet \
--output-dir ./coarse
| 文件 | 格式 | 说明 |
|---|---|---|
classified_points.npy | NumPy (N×4) | xyz + 分类码(2=地面,1=非地面) |
dtm.tif | GeoTIFF (float32) | 地面点插值 DTM,EPSG:4326 |
density.tif | GeoTIFF (float32) | 点密度图(点/格网) |
stats.json | JSON | 地面点比例、精度统计(合成模式含真值对比) |
output-manifest.json | JSON | 运行清单(输入/输出/QA/软件版本) |
MIT