Skip to main content

geomlint

test docs License: MIT Python 3.9+

Full documentation →

Monte Carlo for geometry columns. Continuous validity, topology, and CRS-sanity checks for vector geospatial data — the checks every mainstream data-observability tool (Monte Carlo, Anomalo, Great Expectations) skips because it treats a geometry column as an opaque blob.

No GDAL, no Fiona, no system dependencies to get started — a single pip install and it runs anywhere pip does, which is the point: this is meant to live in CI, not require a GIS environment to even install.

$ geomlint check ./parcels/
SEVERITY CODE                 FILE                         FEATURE      MESSAGE
-------------------------------------------------------------------------------
ERROR    invalid-geometry     parcels/block_14.geojson      parcel-001   topologically invalid: Self-intersection[0.5 0.5]
ERROR    coordinates-out-of-wgs84-range parcels/poles.geojson -          12/40 feature(s) outside valid lon/lat bounds — likely UTM mislabeled as WGS84
WARNING  mismatched-crs-across-files (batch) -               -          multiple distinct CRS declarations found in this batch

2 issue(s) — 1 error, 1 warning
$ echo $?
1

Why this exists

Bad geometry and CRS confusion don't throw exceptions — they produce quietly wrong maps, quietly wrong joins, and quietly wrong distance calculations that nobody notices until a downstream report is off and nobody can say why. ST_IsValid and friends exist in every spatial database, but they're one-off functions you have to remember to run — not a check suite that runs in CI on every pull request or every pipeline load, the way great_expectations or a dbt test does for tabular data.

geomlint is that check suite, aimed at the failure modes that show up constantly in production GIS/remote-sensing pipelines:

  • Topologically invalid geometry — self-intersections, collapsed rings, zero-area/zero-length shapes, duplicate vertices that turn into self-intersections after the next simplify or reproject, ring winding order that violates RFC 7946.
  • CRS confusion — no CRS declared, an unrecognized CRS, or coordinates that are obviously projected data (UTM meters, state plane feet) sitting in a file that claims to be WGS84 lon/lat degrees.
  • CRS drift across a batch — two files in the same pipeline run declaring two different CRSes, which is a very easy way to silently corrupt a spatial join.
  • Structural footguns — duplicate feature ids within a file (broken joins/lookups), fake-precision coordinates from a float round-trip, features that cross the antimeridian without being split.

Not yet implemented, on purpose: positional/GPS-drift detection (multipath, sensor jumps). See geomlint/checks/drift.py for why this is a harder statistical problem than a distance threshold, and the roadmap for doing it properly instead of faking it.

Install

Not on PyPI yet — install straight from GitHub:

pip install "geomlint @ git+https://github.com/DBishal13/geomlint.git"              # GeoJSON only
pip install "geomlint[formats] @ git+https://github.com/DBishal13/geomlint.git"     # + Shapefile/GPKG, via pyogrio

Working on this repo instead:

git clone https://github.com/DBishal13/geomlint.git && cd geomlint
pip install -e ".[dev,formats]"

Use

geomlint check ./path/to/data                    # table output, human-readable
geomlint check a.geojson b.gpkg ./more_data/      # multiple files/dirs in one run
geomlint check ./path/to/data --format json       # for piping into another tool
geomlint check ./path/to/data --fail-on warning   # stricter CI gate
geomlint check ./path/to/data --config custom.toml

Exit code is 0 when nothing at or above --fail-on was found, 1 otherwise — built to drop into a CI step or a pipeline's post-load validation, not just to be read by a human.

Config

Drop a .geomlint.toml in the repo (or use [tool.geomlint] in pyproject.toml) — geomlint finds it by walking up from the path you scan:

zero_area_epsilon = 1e-9          # default 1e-12
out_of_range_error_pct = 30       # default 50 — % of features out-of-range before it's an error, not a warning
max_coordinate_precision = 6      # default 7 decimal places
disabled_checks = ["wrong-ring-orientation"]
severity_overrides = { "duplicate-feature-id" = "warning" }
exclude = ["**/scratch/**"]

GitHub Actions

- uses: DBishal13/geomlint@v0.1.0
  with:
    path: ./data
    fail-on: warning  # optional, default: error
    extras: formats   # optional, e.g. for Shapefile/GPKG

Pre-commit

- repo: https://github.com/DBishal13/geomlint
  rev: v0.1.0
  hooks:
    - id: geomlint

Status

Early but usable. Geometry-validity, CRS-sanity, and structural checks work and are tested against planted fixtures across GeoJSON, Shapefile, and GPKG; drift detection is intentionally stubbed. Issues and PRs welcome.

License

MIT

Metadata

Release files for geomlint 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geomlint 0.1.0
File Size Uploaded
geomlint-0.1.0.tar.gz 19.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geomlint 0.1.0
File Interpreter ABI Platform
geomlint-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.7 kB

Release files / geomlint-0.1.0.tar.gz

Download URL geomlint-0.1.0.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ad11575e00b7e37cfa09a10a85e93af0cdda76163c69b51215c299ce14f3cc24
BLAKE2b-256 checksum
How to use checksums
342da269482cd9589c9626ca7327a7985dc088d04ff03c2ca17b2aba867279a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release files / geomlint-0.1.0-py3-none-any.whl

Download URL geomlint-0.1.0-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb975cf92ccae56c6260a63ef9f197d4c132182953be57d1b05b955740f0c262
BLAKE2b-256 checksum
How to use checksums
80ab8e92d250086c86e7dcb4065e186a7a09abe76ed599fb8ae7d05b48caeea8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page