GeoMet

Pure-Python conversion library for common geospatial data formats

Library
PyPI
v1.1.0
176stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
41/100Fair
Development Activity0
Maintenance20
Community64
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
72/100Good
Architecture72
Code Quality70
Innovation65
Learning Curve82

GeoMet is a pure-Python library for converting geometries between common geospatial data formats without any compiled dependencies. It supports GeoJSON, WKT/EWKT, WKB/EWKB, GeoPackage binary, and EsriJSON for 2D, 3D, and 4D geometries including Z, M, and ZM coordinates.

Conversions are exposed through familiar load/loads/dump/dumps interfaces modeled on Python’s json module, so the API feels natural to anyone who has serialized data before. A small command-line tool is also included for ad-hoc format conversion.

What You Get

  • Round-trip conversion between GeoJSON, WKT/EWKT, WKB/EWKB, GeoPackage binary, and EsriJSON
  • Familiar load/loads/dump/dumps APIs mirroring the standard json module
  • Support for Point, LineString, Polygon, their Multi- variants, and GeometryCollection
  • Handling of 2D, 3D, and 4D geometries with Z, M, and ZM coordinate dimensions
  • A bundled command-line tool for quick format conversions, with no compiled dependencies

Common Use Cases

  • Converting GeoJSON features into WKB for insertion into PostGIS or other spatial databases
  • Translating WKT/WKB geometries returned by a database back into GeoJSON for web maps
  • Reading and writing GeoPackage binary geometry blobs
  • Interoperating with Esri systems by producing or consuming EsriJSON

Under The Hood

Architecture GeoMet is organized as a package with one module per format family — wkt.py, wkb.py, geopackage.py, and esri.py — each exposing symmetric load/loads/dump/dumps functions, plus a shared util.py for byte-order and type helpers and a tool.py CLI entry point. GeoJSON acts as the neutral intermediate representation (plain Python dicts), and every converter reads from or writes to that dict form. Tech Stack Pure Python packaged via pyproject.toml with a thin setup.py, no compiled extensions, and only standard-library dependencies at runtime; development uses tox, CircleCI, and a requirements-split (requirements/test-requirements/packaging-requirements) build setup. Code Quality The repository ships a real test suite under geomet/tests (wkt_test.py, wkb_test.py, test_geopackage.py, esri_test.py, test_cli.py, util_test.py) covering each format and the CLI, indicating deliberate correctness testing across geometry types. API Design The public API deliberately mirrors Python’s json module (load/loads/dump/dumps), which makes it immediately learnable, and format selection is handled by importing the relevant submodule, keeping each conversion path explicit and discoverable.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search