Geolocation utilities for xarray objects
Project description
Free software: Apache 2
Documentation: https://geoxarray.github.io/.
Geolocation utilities for xarray objects. Geoxarray is meant to bring together all of the features and conversions needed by various python packages working with geolocation xarray objects. This means being able to convert between various coordinate system implementations (rasterio, cartopy, pyresample, NetCDF CF grid mapping, etc). It also means providing basic access to properties of the geolocation information like bounding boxes.
Installation
The geoxarray library is available on PyPI and can be installed with pip:
pip install geoxarray
For the most recent development versions of geoxarray, it can be installed directly from the root of the source directory:
pip install -e .
Or to install into an existing conda-based environment:
.. code-block:: bash
conda install -c conda-forge geoxarray
Dependencies
Besides the xarray dependency, the geoxarray package uses CRS objects from the pyproj library. Additionally, geoxarray has a lot of optional dependencies when it comes to converting to other libraries’ CRS or geolocation objects. These libraries include, but may not be limited to:
rasterio
cartopy
pyresample
Relationship with rioxarray
At the time of writing, rioxarray is an independent project whose features related to CRS and dimension handling are very similar if not exactly the same as geoxarray. Rioxarray existed first and paved the way to show how CRS information can be handled in an xarray-friendly way. Much of geoxarray is inspired by rioxarray, if not copied directly. Portions of code copied from rioxarray are noted in docstrings for that code and are under the Apache License of rioxarray which has been copied as LICENSE_rioxarray in the geoxarray package and repository.
Development Status
Geoxarray is actively being developed as a side project. Additions and modifications are done as developers have time. If you would like to contribute, suggest features, or discuss anything else please file a bug on github.
Features
See the documentation website for how-tos, concepts, and API documentation.
Parse various formats of storing Coordinate Reference System information:
import geoxarray
pyproj_crs = my_data_arr.geo.crs
Write CRS information in a CF-compatible way or add CRS information to an object that didn’t have any:
import geoxarray
new_dataset = my_dataset.geo.write_crs("EPSG:4326", inplace=False)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.