Install
openclaw skills install @ruiduobao/geoskill-spatial-etl-pipeline配置驱动的提取-转换-加载流水线,含分步日志与质量报告。Config-driven extract-transform-load pipeline with per-step logging and a quality report.
openclaw skills install @ruiduobao/geoskill-spatial-etl-pipelineConfig-driven spatial ETL (Extract-Transform-Load) pipeline:
filter_bbox (window filter), filter_attribute (attribute comparison filter supporting 6 comparison operators such as >/</==), reproject (reprojection), add_field (derived columns: area / perimeter / centroid / sequence number), rename (field renaming), buffer (buffering).Each step records structured logs (step name, duration, input/output feature counts, status), and a quality report (feature gain/loss, retention rate, null-value ratio, invalid geometry count, CRS) is aggregated at the end. Any pipeline can be customized by supplying a JSON config via --config. --synthetic mode generates random polygons and runs the default pipeline.
pip install numpy rasterio geopandas shapely fiona pyproj
python geoskill-spatial-etl-pipeline.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-spatial-etl-pipeline.py --bbox 116.0 39.0 117.0 40.0 --synthetic --features 60 --output-dir ./etl
python geoskill-spatial-etl-pipeline.py --config pipeline.json --output-dir ./custom
Example configuration pipeline.json:
{
"source": {"type": "file", "path": "raw.geojson"},
"steps": [
{"op": "filter_attribute", "field": "value", "cmp": ">", "value": 10},
{"op": "reproject", "to_crs": "EPSG:3857"},
{"op": "buffer", "distance": 100}
],
"load": {"format": "gpkg", "path": "out.gpkg"}
}
python geoskill-spatial-etl-pipeline.py --input parcels.shp --output-dir ./area
python geoskill-spatial-etl-pipeline.py --bbox 121.0 31.0 122.0 32.0 --synthetic --features 200 --output-dir ./etl2 --quiet
python geoskill-spatial-etl-pipeline.py --bbox 116.39 39.90 116.40 39.91 --synthetic --features 30 --output-dir ./tiny
| File | Format | Description |
|---|---|---|
etl_output.geojson | GeoJSON | Load step output (default config) |
etl_report.json | JSON | Quality report + per-step logs + config |
output-manifest.json | JSON | Run manifest |
--input: local vector file--config: JSON config (can point to any source)--synthetic: generates random polygons locally--synthetic mode requires no network at all.MIT
配置驱动的空间 ETL(Extract-Transform-Load)流水线:
filter_bbox(窗口过滤)、
filter_attribute(属性比较过滤,支持 >/</== 等 6 种比较符)、
reproject(重投影)、add_field(面积/周长/质心/序号派生列)、
rename(字段重命名)、buffer(缓冲)。每个步骤记录结构化日志(步骤名、耗时、输入/输出要素数、状态),结束后
汇总质量报告(要素增减、保留率、空值比例、无效几何数、CRS)。用
--config 提供 JSON 配置即可自定义任意流水线。--synthetic 模式生成
随机多边形跑默认流水线。
pip install numpy rasterio geopandas shapely fiona pyproj
python geoskill-spatial-etl-pipeline.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-spatial-etl-pipeline.py --bbox 116.0 39.0 117.0 40.0 --synthetic --features 60 --output-dir ./etl
python geoskill-spatial-etl-pipeline.py --config pipeline.json --output-dir ./custom
配置示例 pipeline.json:
{
"source": {"type": "file", "path": "raw.geojson"},
"steps": [
{"op": "filter_attribute", "field": "value", "cmp": ">", "value": 10},
{"op": "reproject", "to_crs": "EPSG:3857"},
{"op": "buffer", "distance": 100}
],
"load": {"format": "gpkg", "path": "out.gpkg"}
}
python geoskill-spatial-etl-pipeline.py --input parcels.shp --output-dir ./area
python geoskill-spatial-etl-pipeline.py --bbox 121.0 31.0 122.0 32.0 --synthetic --features 200 --output-dir ./etl2 --quiet
python geoskill-spatial-etl-pipeline.py --bbox 116.39 39.90 116.40 39.91 --synthetic --features 30 --output-dir ./tiny
| 文件 | 格式 | 说明 |
|---|---|---|
etl_output.geojson | GeoJSON | Load 步骤产物(默认配置) |
etl_report.json | JSON | 质量报告 + 逐步日志 + 配置 |
output-manifest.json | JSON | 运行清单 |
--input:本地矢量文件--config:JSON 配置(可指向任意源)--synthetic:本地生成随机多边形--synthetic 模式完全无网络。MIT