skillfed

xproj

Xarray extension for projections and coordinate reference systems

xproj v0.2.1 136.3K downloads/30d#11,398 on PyPI43
Permissive license Apache-2.0 Active released

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 xproj

uv

uv add xproj

poetry

poetry add xproj

Installing 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

Intended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: GIS

Tags

xarray coordinate reference systemCRS management xarraygeospatial projection xarrayPROJ pyproj xarray extensionxarray GIS coordinate systemsCRS index xarray alignment
geospatialxarray-extensioncoordinate-systems

More GIS packages