xproj
Xarray extension for projections and coordinate reference systems
What it is and what it does
XProj is a lightweight Xarray extension designed to centralize coordinate reference system (CRS) handling for geospatial data. It wraps Pyproj functionality and exposes it through Xarray accessors, allowing you to work with CRS metadata consistently across Xarray datasets and dataarrays. The package aims to prevent duplication of CRS logic across the Xarray geospatial ecosystem by providing a common, reusable foundation.
The extension focuses narrowly on CRS management—parsing, formatting, equality checking, and comparison—rather than on data reprojection or spatial operations, which are left to specialized downstream packages. It leverages Xarray's custom indexes feature to enable alignment and combination of datasets based on their CRS. The project is currently experimental and proof-of-concept, with active development but no guarantee of API stability.
Use it for:
- Standardize CRS representation and comparison across multiple Xarray-based geospatial libraries in a single project.
- Build Xarray extensions that need CRS handling without reimplementing PROJ parsing and validation logic.
- Align or combine Xarray datasets based on their coordinate reference systems using CRSIndex.
- Consolidate CRS metadata operations (checking equality, formatting, resetting) in geospatial workflows.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
XProj is an Xarray extension that provides tools for managing geospatial coordinate reference systems (CRS) using PROJ and Pyproj, enabling uniform CRS handling across Xarray datasets.
Yes, if you are building or using Xarray-based geospatial extensions and want a lightweight, centralized CRS management layer. The low install friction, permissive license, and active maintenance make it a reasonable foundation dependency. However, treat it as experimental—the API may change, and it is not yet proven in production workflows. Not necessary for simple one-off geospatial scripts; most value accrues when building reusable libraries.
Install
xproj on PyPI
pip
pip install xprojuv
uv add xprojpoetry
poetry add xprojInstalling xproj
Before you install
Low install friction; pure Python wheel with only two runtime dependencies (xarray and pyproj). Actively maintained with recent commits, though the project is explicitly marked experimental and proof-of-concept in its early releases.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the license notice.
Quickstart
pip install xproj
import xarray as xr
import xproj
# Access CRS tools via xarray accessor
ds = xr.Dataset()
ds.xproj.crs # Interact with CRS through the extension
Requires Python 3.10 or later; xarray and pyproj must be installed as runtime dependencies.
Verify before relying
- Whether the CRSIndex feature for comparing and aligning datasets by CRS is production-ready or still experimental.
- What specific CRS operations (parse, reset, formatting, equality checking) are currently exposed in the public API.
- Whether the package is suitable for production geospatial workflows or primarily for development/prototyping.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — xarray, pyproj |
| Maintenance | actively maintained — 403 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 136,340/month — #11,398 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: xproj-0.2.1-py3-none-any.whl
Keywords: xarray, GIS, CRS, proj
Tags
More GIS packages
Shapely provides Python tools for creating,…
permissive · top 1,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
geopygeopy is a Python client for geocoding and…
permissive · top 5,000 on PyPI
pyogrioPyogrio provides fast, bulk-oriented read and…
permissive · top 5,000 on PyPI
h3h3 provides Python bindings to Uber's H3…
permissive · top 5,000 on PyPI
odc-geoProvides projection-aware geometry classes…
permissive · top 15,000 on PyPI
reprojReproject shapely geometries between coordinate…
permissive · top 15,000 on PyPI
rioxarrayrioxarray extends xarray with geospatial and…
permissive · top 5,000 on PyPI
odc-loaderConstructs xarray objects from parsed…
permissive · top 15,000 on PyPI
cf-xarraycf-xarray adds a `.cf` accessor to xarray…
permissive · top 15,000 on PyPI
xeeXee is an Xarray backend that lets you open…
permissive · top 15,000 on PyPI
rasterixRasterix provides tools for analyzing raster…
permissive · top 15,000 on PyPI
spatial_imagespatial-image provides an N-dimensional spatial…
permissive · top 15,000 on PyPI
xarray-dataclassDefines typed xarray DataArray and Dataset…
permissive · top 15,000 on PyPI