记忆

Geoskill: Geospatial Data Quality Audit

试用

Unified geospatial data quality audit for GIS data packages. Checks raster, vector, table, NetCDF, and directory structure. Outputs JSON/HTML reports, issue layers, checksums, and machine-readable exit codes. Use when the user wants to validate data packages, check delivery quality, find CRS/nodata/ geometry issues, or generate QA reports.

它能做什么

Unified geospatial data quality audit for GIS data packages. Checks raster, vector, table, NetCDF, and directory structure. Outputs JSON/HTML reports, issue layers, checksums, and machine-readable exit codes. Use when the user wants to validate data packages, check delivery quality, find CRS/nodata/ geometry issues, or generate QA reports.

技能文档

Prerequisites / 先准备 X 文件

⚠️ 必读 — 本 skill 不属于即用型,需要先准备特定文件才能跑。

本 skill 不下载数据,只审计你给的 本地数据目录

👉 完整教程见仓库根目录 PREREQUISITES.md 2.3 节。

先准备 X 文件:随便指一个 GIS 数据目录就能跑。

快速试跑命令:

python geospatial_data_quality_audit.py /path/to/your/data --html --issues-geojson

Geospatial Data Quality Audit

⚠️ 本 skill 不下载数据。它只审计本地 input_dir 下的文件。 --bbox / --aoi-file 接口仅为上下文记录 (写到 output-manifest.json),不会触发任何下载。

Unified QA tool for GIS data packages. Recursively discovers geospatial files, runs per-file and cross-file checks, and produces structured reports.

Trigger

Use when the user wants to:

  • Check/validate a directory of spatial data
  • Find CRS, nodata, geometry, encoding issues
  • Generate QA reports (JSON/HTML) for data delivery
  • Verify cross-file consistency (CRS, extent, resolution)
  • Produce checksums or issue layers

Boundaries

  • Read-only by default (--fix-safe not implemented in this version)
  • Does not modify source data
  • Does not download external data
  • Compliance/certification conclusions require human review

CLI Usage

# Basic audit
python scripts/geospatial_data_quality_audit.py /path/to/data

# With HTML report and issues GeoJSON
python scripts/geospatial_data_quality_audit.py /path/to/data --html --issues-geojson

# Custom rules
python scripts/geospatial_data_quality_audit.py /path/to/data --rules rules.json

# Fail on warnings too
python scripts/geospatial_data_quality_audit.py /path/to/data --fail-on warning

# Non-recursive with checksums
python scripts/geospatial_data_quality_audit.py /path/to/data --no-recursive --checksums

Arguments

ArgumentDescription
input_dirDirectory to audit (required)
--output-dir, -oOutput directory (default: /qa-output)
--rulesCustom rules JSON file
--no-recursiveDon't recurse into subdirectories
--htmlGenerate HTML report
--issues-geojsonGenerate spatial issues GeoJSON
--checksumsGenerate MD5 checksums file
--fail-onFail on error (default) or warning
--sample-sizeMax files to check (0=all)

Output

FileDescription
qa-report.jsonFull JSON report with all findings
qa-report.htmlHuman-readable HTML report (with --html)
qa.jsonSummary: score, error/warning counts
spatial_issues.geojsonPoint layer of spatial issues (with --issues-geojson)
checksums.txtMD5 checksums (with --checksums)
output-manifest.jsonMachine-readable manifest

Exit Codes

CodeMeaning
0All checks pass (or only warnings)
2Argument error
3Dependency missing
6Data validation failure (errors found)
7Processing failure

QA Score

score = max(0, 100 - errors * 10 - warnings * 2)

Supported Formats

  • Raster: GeoTIFF, IMG, ASC, GRD
  • Vector: Shapefile, GeoJSON, KML, GML, GPKG, GPX
  • Table: CSV, TSV, Parquet, Excel
  • NetCDF: NC, NC4, HDF, HDF5
  • LAS: LAS, LAZ (basic checks)
  • Document: DOCX, PDF, MD (basic checks)

Rule Engine

Built-in rules cover file readability, CRS presence, nodata, geometry validity, encoding, companion files, and cross-file consistency. Custom rules via JSON config extend with size limits, required CRS, and forbidden extensions.

See references/rules.md for full rule catalog.

Workflow

  1. Recursively discover geospatial files (skip hidden/cache dirs)
  2. Detect file type from extension + content sniff
  3. Run per-file checks (type-specific)
  4. Run cross-file consistency checks
  5. Apply rule engine (built-in + custom)
  6. Generate reports and exit with appropriate code

Dependencies

  • Pure Python stdlib for basic checks
  • rasterio (optional) for deep raster checks
  • fiona (optional) for deep vector checks
  • netCDF4 (optional) for deep NetCDF checks
  • Missing optional deps produce warnings, not errors

相关技能

检查矢量几何有效性、拓扑错误、属性完整性与 CRS 一致性,输出分级质量报告。Validate geometry validity, topology, attribute completeness and CRS consistency for vector data and emit a graded quality report.

1 次安装

解析 ISO 19115 / FGDC 格式 XML 元数据,验证必填项、受控词表与一致性规则,输出完整性评分与问题清单。Parse ISO 19115 / FGDC XML metadata, validate required fields and controlled vocabularies, and report a completeness score.

1 次安装

Automated quality inspection for UAV/drone survey deliverables including aerial images, orthomosaics, DSM/DEM, control points, and aerial triangulation reports. Generates coverage, clarity, seam, and accuracy QA.

1 次安装

Inspect, validate, summarize, and troubleshoot GeoJSON files and payloads, including FeatureCollection checks, geometry counting, bbox generation, coordinate...

18 次安装

对矢量数据做变更检测、版本快照与差异比较,支持 commit / diff / log 操作。Change detection, version snapshots and diff comparison for vector data with commit / diff / log operations.

Render reports (HTML/DOCX/PDF) from other skills' output-manifest.json. Auxiliary tool only — does not analyze data, does not download anything. Workflow: run another skill to produce output-manifest.json first, then hand the manifest (or its parent directory) to this skill to render the final report. Use when the user already has skill outputs and wants a formatted deliverable document.

1 次安装