Skip to main content

Geolocation utilities for xarray objects

Project description

https://github.com/geoxarray/geoxarray/workflows/CI/badge.svg?branch=main https://img.shields.io/pypi/v/geoxarray.svg https://badges.gitter.im/geoxarray/geoxarray.svg https://coveralls.io/repos/github/geoxarray/geoxarray/badge.svg?branch=main pre-commit.ci status

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geoxarray-0.2.0.tar.gz (47.4 kB view details)

Uploaded Source

File details

Details for the file geoxarray-0.2.0.tar.gz.

File metadata

  • Download URL: geoxarray-0.2.0.tar.gz
  • Upload date:
  • Size: 47.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for geoxarray-0.2.0.tar.gz
Algorithm Hash digest
SHA256 75a7f49b4c81f0c391e752354aec75e41b7e8d322e7b9ae4ae3bd60e3c0cf3bd
MD5 f3b66eb002023d86732df94ec0872301
BLAKE2b-256 34008fd3eb309aee7643ad92ad3b17eec002f59ebd782f9269a48433ac199a55

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page