Standardize, normalize, and validate spatial data — deterministically.
Geospatial Schema is a reference resource for GIS data managers, government technology teams, and Python ETL engineers building production pipelines against INSPIRE, FGDC, OGC, ISO 19115, and local government schemas. Each guide pairs declarative configuration patterns with executable examples so transformations stay idempotent and auditable.
Explore schema contracts and migrations, CRS and vertical datum normalization, attribute mapping and delta loads, geometry and topology validation, and audit-grade compliance reporting — organized into five core subject areas below.
Start here
Practical, production-tested guides that get straight to executable code and measurable thresholds.
Repairing Self-Intersecting Polygons with make_valid
Classify the defect, run the structured GEOS repair, decide whether a bowtie may become a multipolygon, and hold every repair to a published area-delta budget.
Detecting Gaps and Overlaps in Parcel Coverages
Union-and-subtract at county scale: tiled evaluation with a halo, sliver classification by shape index, and exactly-once reporting of edge-straddling breaches.
Computing Geometry Hashes for Change Detection
A canonical byte form that ignores a re-export and catches a one-centimetre move — precision snapping, ring normalization, and the tests that prove both.
Zero-Downtime Column Renames in Live Spatial Tables
Expand, backfill in bounded batches, prove no reader remains, then contract — renaming a PostGIS column while map services keep serving.
Converting Ellipsoidal to Orthometric Heights
Pin the geoid grid, choose the transformation explicitly, and verify against published benchmarks — because a missing grid fails silently, not loudly.
Publishing a Schema Conformance Scorecard in GitHub Actions
Run the validation suite in CI, compute a conformance scorecard, and publish a Markdown summary, an SVG badge, and a sticky pull-request comment on every run.
What you’ll find here
Every guide is engineered for production use: declarative schema configurations, strict tolerance thresholds, deterministic CRS and vertical datum handling, measurable quality gates, and auditable CI gating. Browse by topic or follow the cross-links between guides to assemble an end-to-end pipeline — from the source delivery through validation to a published, cited release.
Schema Architecture & Standards
Cross-Platform Schema Translation
Translate geospatial schemas deterministically across Esri, PostGIS, GeoPackage, and GeoParquet. Covers YAML mapping manifests, pydantic/pyproj execution engines, failure-mode routing, lineage logging, and CI gating for ETL pipelines.
Local Government Data Dictionaries
Enforce municipal data dictionaries as a deterministic ETL pipeline stage. Covers version-controlled YAML field manifests with mandatory/optional tables, alias normalization, a validation engine with domain/pattern/datetime guards and CRS sync, failure-mode routing, audit-trail output, and CI gating for cross-agency GIS exports.
Spatial Database Schema Migrations
Version and apply schema changes to live spatial databases: a migration manifest with forward and reverse steps, geometry-column and SRID changes, index rebuild strategy, expand-and-contract for zero downtime, and CI gating against a golden schema.
INSPIRE Directive Schema Compliance: Automated Annex II/III Conformance
Build a deterministic INSPIRE Directive compliance stage: a declarative Annex II/III manifest, ETRS89/LAEA CRS synchronization, attribute validation with fallback routing, auditable compliance reports, and a CI gate that blocks non-conformant geospatial data.
FGDC Metadata Mapping
Map FGDC CSDGM metadata onto a modern catalog schema deterministically: a version-controlled mapping manifest, safe XML parsing, mandatory-element gates, confidence-scored synonym matching, quarantine routing, and reproducible compliance reports.
CRS Normalization & Sync
Projection Normalization Workflows
Build a deterministic projection normalization stage for geospatial ETL pipelines. Covers YAML CRS mapping manifests, pyproj resolution with CRSError/ProjError handling, pre-transform validity gating, tolerance enforcement, audit-trail output, failure-mode routing, and CI gating.
Unit Conversion & Tolerance Thresholds
Implement deterministic unit conversion and tolerance thresholds in Python geospatial ETL pipelines. Covers YAML configuration, vectorized scaling, snap/round/drift gating, failure-mode routing, ISO 19115 compliance logging, and CI integration.
Multi-CRS Dataset Harmonization
Harmonize datasets arriving in mixed coordinate reference systems into one authoritative target CRS. Covers YAML routing manifests, per-source datum transforms with pyproj, tolerance and topology gates, quarantine routing, lineage logging, and CI gating for geospatial ETL.
Vertical Datum & Geoid Model Handling
Treat height as a datum-bearing quantity, not a number: declare the vertical CRS, pin the geoid model, convert ellipsoidal to orthometric heights deterministically, detect unlabelled height columns, and record vertical accuracy in the audit trail.
Datum Transformation Fallback Chains
Implement deterministic datum transformation fallback chains in Python ETL pipelines. Covers YAML configuration, pyproj TransformerGroup routing, failure-mode tables, compliance logging, and CI gating for geospatial schema normalization.
Attribute Transformation & ETL
Error Handling & Retry Logic for Geospatial Schema Mapping Pipelines
Engineer deterministic error handling and retry logic for geospatial ETL: config-as-code retry policies, exponential backoff, dead-letter routing, idempotent writes, audit-grade rejection logs, and CI gating for government and enterprise GIS workflows.
Batch Schema Processing Pipelines for Geospatial Standardization
Implement deterministic batch schema processing pipelines for geospatial ETL: configuration-as-code manifests, streaming execution, failure routing, compliance reporting, and CI integration for government and enterprise GIS workflows.
Incremental Change Detection & Delta Loads
Stop reprocessing whole deliveries: compute stable content hashes over geometry and attributes, classify each feature as inserted, updated, unchanged or deleted, and apply the delta to the target idempotently with a full audit of what moved.
Nested JSON/GeoJSON Flattening for Geospatial ETL Pipelines
Flatten deeply nested JSON and GeoJSON payloads deterministically: dot-notation mapping manifests, RFC 7946-safe geometry preservation, mandatory/optional field routing, streaming execution, compliance logging, and CI gating for government and enterprise GIS workflows.
Field Renaming & Type Coercion Rules for Geospatial ETL Pipelines
Engineer deterministic field renaming and type coercion for geospatial ETL: declarative YAML contracts, pyarrow precision guards, null and tolerance enforcement, failure routing, compliance audit output, and CI gating for government and enterprise GIS data.
Data Quality & Geometry Integrity
Geometry Validity & Repair Rules
Implement a deterministic geometry validity gate in Python: the OGC invalidity taxonomy GEOS actually reports, a declarative repair ladder, area-delta budgets, type-drift rejection, quarantine routing, and CI gating for spatial ETL pipelines.
Topology Rule Enforcement
Enforce must-not-overlap, must-not-have-gaps and coincident-boundary rules across spatial coverages in Python: declarative rule manifests, indexed pair evaluation, sliver classification by shape index, reconciliation queues, and CI gating.
Attribute Domain & Code List Validation
Validate spatial attribute values against ranges, enumerations and externally governed code lists: pinned register caches, mandatory-field rules, conditional domains, pandera enforcement, rejection logging and CI gating for geospatial ETL.
Duplicate Detection & Feature Deduplication
Detect and resolve duplicated spatial features deterministically: declarative match rules combining spatial predicates with attribute agreement, blocking for scale, survivor precedence, merge provenance, and CI gating for geospatial pipelines.
Compliance Reporting & Audit Trails
Lineage Manifest Generation
Build an append-only, queryable provenance record for every geospatial transform and validation event. Covers Parquet schema design, mandatory lineage fields, upstream row emission, dedup, retention, and CI gating.
CI Validation Scorecards
Aggregate deterministic CRS, ETL, and schema validation gate results into a published conformance scorecard per pipeline run. Covers threshold manifests, scorecard computation from lineage manifests, JSON/Markdown/SVG badge emission, and CI merge gating.
Dataset Metadata & JSON-LD Publishing
Emit machine-readable schema.org Dataset and DCAT-AP JSON-LD so published geospatial datasets are discoverable and auditable. Covers the metadata manifest, coverage extraction, serialization engine, failure modes, and CI validation.
Open Data Portal Publication Workflows
Publish spatial datasets to open data portals as a repeatable pipeline stage: a publication manifest, distribution and checksum discipline, DCAT harvest endpoints, versioned releases with stable landing pages, and retention sweeps that expire nothing by accident.