pygeoif
A basic implementation of the __geo_interface__
Decision gist · record as of 2026-08-14
Yes, if you need lightweight GeoJSON-compatible geometry handling without Shapely's compiled dependencies. The active maintenance, copyleft license clarity, and zero external dependencies make it a solid choice for minimal GIS work or as a foundation for custom geospatial libraries. Not suitable if you need advanced spatial operations—use Shapely for that.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is straightforward with low friction: the package is a pure-Python wheel with only typing_extensions as a runtime dependency.
- Maintenance is active with recent commits and stable production status.
License · maintenance · safety
LGPL (copyleft) — PyGeoIf is licensed under LGPL (copyleft), which requires that derivative works and modifications remain under the same or compatible license. Proprietary projects using it must either comply with copyleft terms or seek alternative licensing.
last release 2025-10-01 (317 days) · last repo commit 2026-08-14 · 72 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 370,286 downloads/mo, #7,180 on PyPI
Alternatives
Verify before relying
pip install pygeoif
from pygeoif import geometry
p = geometry.Point(1, 1)
print(p.__geo_interface__) # {'type': 'Point', 'bbox': (1, 1, 1, 1), 'coordinates': (1, 1)}
l = geometry.LineString([(0.0, 0.0), (1.0, 1.0)])
print(l.bounds) # (0.0, 0.0, 1.0, 1.0)- Performance characteristics compared to Shapely for large geometry datasets
- Whether convex_hull and other operations scale adequately for production GIS workloads
- Interoperability guarantees with other GIS libraries beyond the __geo_interface__ protocol
What it is and what it does
PyGeoIf is a minimal, pure-Python library for constructing and manipulating geospatial geometries. It implements the __geo_interface__ protocol—a GeoJSON-like standard used by many GIS libraries—allowing you to create Points, LineStrings, Polygons, and their multi- and collection variants, then read and write them in WKT (Well Known Text) format or convert them to GeoJSON-compatible dictionaries.
The package is designed as a lightweight alternative to Shapely, with no dependencies outside the Python standard library (only typing_extensions at runtime). It supports basic geometric operations like computing bounds, convex hulls, and polygon orientation. It also provides Hypothesis strategies for property-based testing. PyGeoIf is tested on CPython, PyPy, and GraalPy, and was originally written to supply clean, Python-only geometries for the fastkml library.
Use it for
- Parse and construct GeoJSON-compatible geometry objects without heavy dependencies
- Convert between WKT and Python geometry representations in lightweight applications
- Build geospatial libraries that need a standard __geo_interface__ protocol foundation
- Generate test geometries using Hypothesis strategies for property-based GIS testing
- Embed geometry handling in projects where Shapely's size or compiled dependencies are prohibitive
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight GeoJSON-compatible geometry handling without Shapely's compiled dependencies.
The active maintenance, copyleft license clarity, and zero external dependencies make it a solid choice for minimal GIS work or as a foundation for custom geospatial libraries. Not suitable if you need advanced spatial operations—use Shapely for that.
Install
pygeoif on PyPI
Before you install
Installation is straightforward with low friction: the package is a pure-Python wheel with only typing_extensions as a runtime dependency. Maintenance is active with recent commits and stable production status.
License in practice
PyGeoIf is licensed under LGPL (copyleft), which requires that derivative works and modifications remain under the same or compatible license. Proprietary projects using it must either comply with copyleft terms or seek alternative licensing.
Quickstart
pip install pygeoif
from pygeoif import geometry
p = geometry.Point(1, 1)
print(p.__geo_interface__) # {'type': 'Point', 'bbox': (1, 1, 1, 1), 'coordinates': (1, 1)}
l = geometry.LineString([(0.0, 0.0), (1.0, 1.0)])
print(l.bounds) # (0.0, 0.0, 1.0, 1.0)
Verify before relying
- Performance characteristics compared to Shapely for large geometry datasets
- Whether convex_hull and other operations scale adequately for production GIS workloads
- Interoperability guarantees with other GIS libraries beyond the __geo_interface__ protocol
Package facts
| License | LGPL copyleft |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping_extensions |
| Maintenance | Actively maintained 317 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 370,286 / month, #7,180 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: HypothesisIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: GraalPyProgramming Language :: Python :: Implementation :: PyPyTopic :: Scientific/Engineering :: GISTyping :: Typed |
Evidence: pygeoif-1.6.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “wkt well known text parsing”
- pygeoifPyGeoIf provides lightweight, pure-Python geometry classes that…
- geometConverts between GeoJSON, WKT/WKB, Extended WKT/WKB, GeoPackage…
- geoarrow-pandasIntegrates GeoArrow geometry data with pandas and pyarrow, enabling…
Give your agent the search over MCP, or paste the wish link into any chat.
More GIS packages
Shapely provides Python tools for creating, manipulating, and analyzing 2D geometric objects (points, lines, polygons) using the GEOS library, with both scalar and vectorized NumPy-based operations.
pyproj provides a Python interface to PROJ, enabling cartographic projections and coordinate system transformations for geospatial applications.
GeoPandas extends pandas DataFrames to handle geographic data, combining pandas operations with shapely geometry and spatial analysis capabilities that would otherwise require a spatial database.
Install it if you work with geographic data in Python and want to avoid setting up a spatial database or learning a separate GIS tool.
geopy is a Python client for geocoding and distance calculation that converts addresses to coordinates and vice versa using multiple web-based geocoding services, and computes geodesic and great-circle distances between geographic points.
Install it if you need geocoding or distance calculations in your application.
Pyogrio provides fast, bulk-oriented read and write access to vector spatial data formats (Shapefile, GeoPackage, GeoJSON, etc.) via GDAL/OGR bindings, typically for use with GeoPandas GeoDataFrames.
h3 provides Python bindings to Uber's H3 geospatial indexing library, converting geographic coordinates into hierarchical hexagonal grid cells and performing spatial operations on them.
See also geojson · pygeofilter · pygeos · pyshp · osm2geojson · pydantic-geojson · plpygis · fiona · cligj