xarray-spatial
xarray-based spatial analysis tools
Decision gist · record as of 2026-08-14
Yes, if you work with raster geospatial data and want to avoid GDAL/GEOS dependencies. The library is actively maintained, has low install friction, and offers a broad toolkit for common GIS operations. The feature freeze may slow new feature adoption, but core functionality is stable. Requires Python 3.12+. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.12 or later.
- GPU operations require additional NVIDIA libraries not bundled with the package.
- Low friction: pure-Python wheel with six runtime dependencies (numba, scipy, xarray, numpy, urllib3, zstandard).
License · maintenance · safety
MIT (permissive) — MIT license (permissive): you can use, modify, and distribute xarray-spatial freely in commercial and private projects with minimal restrictions, provided you include the license notice.
last release 2026-07-17 (28 days) · last repo commit 2026-08-08 · 961 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 130,025 downloads/mo, #11,655 on PyPI
Alternatives
Verify before relying
pip install xarray-spatial
import xarray
from xarray_spatial import geotiff
da = geotiff.open_geotiff('dem.tif')
geotiff.to_geotiff(da, 'output.tif', compression='zstd')- Whether the 150+ functions cover your specific spatial analysis use case.
- Performance characteristics and memory overhead on CPU-only systems with large rasters.
- Stability of experimental GPU backends for production workflows.
- Timeline and scope of the 1.0.0 release and feature freeze impact on your needs.
What it is and what it does
xarray-spatial is a Python library for raster analysis built on xarray that handles gridded geospatial data (GeoTIFFs, COGs, and other raster formats) without requiring GDAL or GEOS. It provides a large collection of spatial functions for tasks like elevation analysis, hydrological modeling, fire behavior simulation, and multispectral image processing. The library automatically selects the right computational backend—NumPy for single-machine CPU work, Dask for distributed processing, CuPy for GPU acceleration, or combinations thereof—based on your data and parameters, so you write the same code regardless of scale.
The package includes a native GeoTIFF and Cloud Optimized GeoTIFF reader and writer implemented in pure Python and Numba, eliminating the need for external C/C++ geospatial libraries. It is designed for GIS professionals and researchers who need fast, extensible raster operations. The project is currently in feature freeze leading toward a 1.0.0 release, accepting only bug fixes, performance improvements, and documentation work.
Use it for
- Read and write GeoTIFF or COG files directly without GDAL, optionally scaling to Dask or GPU backends.
- Compute hydrological flow direction and accumulation using D8, D-infinity, or MFD algorithms on elevation models.
- Generate multispectral vegetation indices from satellite imagery bands.
- Model flood extent and fire behavior by applying focal and morphological operations across raster datasets.
- Perform proximity analysis, pathfinding, and interpolation on gridded spatial data with automatic backend dispatch.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with raster geospatial data and want to avoid GDAL/GEOS dependencies.
The library is actively maintained, has low install friction, and offers a broad toolkit for common GIS operations. The feature freeze may slow new feature adoption, but core functionality is stable. Requires Python 3.12+. No known security vulnerabilities.
Install
xarray-spatial on PyPI
Before you install
Low friction: pure-Python wheel with six runtime dependencies (numba, scipy, xarray, numpy, urllib3, zstandard). Active maintenance—last commit 2026-08-08, release 28 days ago. Requires Python 3.12+.
Requires Python 3.12 or later. GPU operations require additional NVIDIA libraries not bundled with the package.
License in practice
MIT license (permissive): you can use, modify, and distribute xarray-spatial freely in commercial and private projects with minimal restrictions, provided you include the license notice.
Quickstart
pip install xarray-spatial
import xarray
from xarray_spatial import geotiff
da = geotiff.open_geotiff('dem.tif')
geotiff.to_geotiff(da, 'output.tif', compression='zstd')
Verify before relying
- Whether the 150+ functions cover your specific spatial analysis use case.
- Performance characteristics and memory overhead on CPU-only systems with large rasters.
- Stability of experimental GPU backends for production workflows.
- Timeline and scope of the 1.0.0 release and feature freeze impact on your needs.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.12 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesnumbascipyxarraynumpyurllib3zstandard |
| Maintenance | Actively maintained 28 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 130,025 / month, #11,655 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: xarray_spatial-0.10.17-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “spatial functions xarray”
- xarray-spatialxarray-spatial provides 150+ functions for raster analysis—surface…
- multiscale-spatial-imageGenerates multiscale image pyramids organized as Xarray Datatrees,…
- odc-stacConverts STAC (SpatialTemporal Asset Catalog) metadata into xarray…
Give your agent the search over MCP, or paste the wish link into any chat.
More Information Analysis packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyarrow provides Python bindings to Apache Arrow's C++ libraries for efficient columnar data processing, serialization, and interoperability with pandas, NumPy, and other Python ecosystem tools.
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
Snowpark Python provides APIs to query and process data directly in Snowflake without moving data to your local system, with support for both native Snowpark and pandas-compatible interfaces.
Install it if you use Snowflake and want to process data without moving it to your application layer.
See also rasterix · rasterio · datashader · odc-loader · rio-tiler · rioxarray · GDAL · rasterstats · whitebox · exactextract