odc-geo
Geometry Classes and Operations (opendatacube)
What it is and what it does
odc-geo is a geospatial library that wraps shapely geometries with CRS awareness from pyproj, preventing accidental operations between geometries in different projections. It provides GeoBox, an abstraction for geo-registered pixel planes with linear world-coordinate mappings, and integrates with xarray to attach and preserve geospatial metadata through data transformations.
The library was extracted from Open Datacube to serve projects working with geo-registered raster data, satellite imagery, and other geospatial datasets. It enables robust handling of projection information alongside geometry operations, making it easier to work with multi-CRS workflows and to attach geospatial context to xarray Datasets and DataArrays in ways that survive serialization and common data operations.
Use it for:
- Prevent projection mismatches by refusing geometry operations across different CRS and providing explicit reprojection.
- Define and work with geo-registered pixel grids (GeoBox) for satellite or raster imagery analysis.
- Attach and preserve geospatial metadata on xarray objects through mathematical operations and format conversions.
- Build geospatial data pipelines where projection consistency is enforced at the library level.
- Work with geospatial information in ways that survive serialization to zarr, netcdf, and GeoTIFF formats.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides projection-aware geometry classes combining shapely shapes with pyproj CRS support, plus GeoBox for geo-registered raster data and xarray integration for geospatial metadata.
Yes. Active maintenance, no known vulnerabilities, low install friction, and a permissive license make it safe to adopt. Install if you work with geo-registered raster data, need CRS-aware geometry operations, or want to attach robust geospatial metadata to xarray objects. The library is mature and widely used in geospatial data science.
Install
odc-geo on PyPI
pip
pip install odc-geouv
uv add odc-geopoetry
poetry add odc-geoInstalling odc-geo
Before you install
Low friction: pure Python wheel with six well-established dependencies (affine, cachetools, numpy, pyproj, shapely, xarray). Active maintenance with a release 29 days ago and recent commits.
License in practice
Permissive license allows commercial and private use without restriction.
Quickstart
pip install odc-geo
from odc.geo.geom import Geometry
from pyproj import CRS
geom = Geometry(shape, crs=CRS.from_epsg(code))
geom_reprojected = geom.to_crs(CRS.from_epsg(target_code))
Requires Python 3.10 or later.
Verify before relying
- Whether GeoBox's linear mapping supports all common geospatial coordinate systems or has known limitations.
- Performance characteristics when working with large raster datasets or many geometries.
- Specific EPSG codes or coordinate systems supported by the GeoBox implementation.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — affine, cachetools, numpy, pyproj, shapely, xarray |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 168,746/month — #10,437 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: odc_geo-0.5.3-py3-none-any.whl
Keywords: gis, geospatial, opendatacube
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
reprojReproject shapely geometries between coordinate…
permissive · top 15,000 on PyPI
xprojXProj is an Xarray extension that provides…
permissive · top 15,000 on PyPI
odc-loaderConstructs xarray objects from parsed…
permissive · top 15,000 on PyPI
pyprojpyproj provides a Python interface to PROJ,…
permissive · top 1,000 on PyPI
geopandasGeoPandas extends pandas DataFrames to handle…
permissive · top 1,000 on PyPI
shapelyShapely provides Python tools for creating,…
permissive · top 1,000 on PyPI
odc-stacConverts STAC (SpatialTemporal Asset Catalog)…
unclear · top 15,000 on PyPI
pygeosPyGEOS wraps GEOS geometry operations in NumPy…
permissive · top 15,000 on PyPI
fudgeofudgeo creates and manages OGC…
permissive · top 15,000 on PyPI
shapely-polyskelComputes the straight skeleton of a polygon, a…
copyleft · top 15,000 on PyPI