Install & Compatibility
Where this runs
tested against v0.5.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.9
✕ build_error
✓ 6.1s
216MB installed
● package 216MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
GeoBox
✓ from odc.geo import GeoBox
Correct import path
Geometry
✓ from odc.geo import Geometry
Correct import path
BoundingBox
✓ from odc.geo import BoundingBox
Correct import path
CRS
✓ from odc.geo.crs import CRS
Avoid importing from odc.geo.crs unless specifically needed for CRS operations
odc.geo.xr
✓ from odc.geo import xr_zeros
xr_zeros is a top-level function, not submodule
Create a GeoBox from bounding box, generate a zero-filled DataArray, and reproject.
from odc.geo import GeoBox, CRS
from odc.geo.xr import xr_zeros
import os
# Define a GeoBox
crs = CRS('EPSG:4326')
geobox = GeoBox.from_bbox((-10, 10, 10, -10), crs=crs, resolution=0.1)
print(geobox)
# Create an xarray DataArray with geospatial info
da = xr_zeros(geobox)
print(da)
# Basic reproject (if dask available)
if 'PYTEST_CURRENT_TEST' not in os.environ:
da_reproj = da.odc.reproject('EPSG:3857', resolution=100)
print(da_reproj)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'odc.geo'
odc-geo is not installed or installed in a different environment.
fixRun: pip install odc-geo
ImportError: cannot import name 'GeoBox' from 'odc.geo'
An outdated version (<0.4.0) where GeoBox was not in the public API or path changed.
fixUpgrade: pip install --upgrade odc-geo. Use correct import: from odc.geo import GeoBox
TypeError: 'NoneType' object is not subscriptable when accessing .shape
GeoBox shape was not set or is None; often from missing resolution in from_bbox.
fixEnsure you provide resolution or shape when creating GeoBox. Example: GeoBox.from_bbox(bbox, crs=crs, resolution=0.1)
ValueError: Expected 'shapely' >=2.0, found version ...
odc-geo requires Shapely 2.0+; older versions are incompatible.
fixUpgrade Shapely: pip install --upgrade shapely
Upgrade
Version history
0.5.1latest on PyPI · released Mar 10, 2026
Audit
Dependencies
xarrayrequiredRequired for xarray integration (was optional before v0.5.0)
shapelyrequiredCore dependency for geometry operations
rasteriorequiredUsed for CRS and raster I/O
daskoptionalOptional but recommended for large data processing