skillfed

odc-geo

Geometry Classes and Operations (opendatacube)

odc-geo v0.5.3 168.7K downloads/30d#10,437 on PyPI114
Permissive license Active released

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-geo

uv

uv add odc-geo

poetry

poetry add odc-geo

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: GISTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

projection-aware geometrygeospatial raster metadatageobox pixel coordinate mappingxarray geospatial accessorcrs-aware shapely geometriesgeo-registered data handlingopendatacube geometry utilities
geospatialraster-datacrs-projection

More Python Modules packages