Skip to main content

Vector data cubes for Xarray

Project description

Vector data cubes for Xarray

In geospatial analysis, data cubes can be of two sorts. The first is a raster data cube, typically represented by an Xarray DataArray indexed either by x or y dimensions or latitude and longitude. The second is a vector data cube, which is an n-D array that has either at least one dimension indexed by a 2-D array of vector geometries (Pebesma, 2022) or contains geometries as variables (e.g. moving features or time-evolving shapes), possibly both.

We can distinguish between two types of geometries in a DataArray or Dataset:

  • coordinate geometry - an array (typically one dimensional) is used as coordinates along one or more dimensions. A typical example would be an outcome of zonal statistics of a multi-dimensional raster, avoiding the need for flattenning of the array to a data frame.
  • variable geometry - an array (typicially multi-dimensional) is used as a variable within a DataArray. This may encode evolving shapes of lava flows in time, trajectories, or growth of city limits.

The Xvec package brings support for both of these to the Xarray ecosystem. It uses Shapely package, allowing a seamless interface between Xvec and GeoPandas. See this post by Edzer Pebesma on an introduction of the concept of coordinate geometry or introduction page in Xvec documentation.

Project status

The project is in the early stage of development and its API may still change.

Installing

You can install Xvec from PyPI using pip or from conda-forge using mamba or conda:

pip install xvec

Or (recommended):

mamba install xvec -c conda-forge

Development version

The development version can be installed from GitHub.

pip install git+https://github.com/xarray-contrib/xvec.git

We recommend installing its dependencies using mamba or conda before.

mamba install xarray shapely pyproj -c conda-forge

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

xvec-0.5.0.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

xvec-0.5.0-py3-none-any.whl (784.4 kB view details)

Uploaded Python 3

File details

Details for the file xvec-0.5.0.tar.gz.

File metadata

  • Download URL: xvec-0.5.0.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for xvec-0.5.0.tar.gz
Algorithm Hash digest
SHA256 c5daad2e61386a4abd5d81b511a2b501986d85ec2febe3a32e3f1af24fca6571
MD5 e8d2c3e3f6d3ff93e20c14be0889e325
BLAKE2b-256 262f314b390340fa92f17e5e6ad59633d8826331d2932793b568b00a694e72a2

See more details on using hashes here.

File details

Details for the file xvec-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: xvec-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 784.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for xvec-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 541bfaa43afd18848f64f9da8d7fb74a180dfac05bcc803b04fe0872f626b278
MD5 7102a4b8e03ac1edd4d0d8432462b336
BLAKE2b-256 64a4daf21c5756c1bcd865db89eafb1860aa1d70863ab8562d34a688043fdb98

See more details on using hashes here.

Supported by

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