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.2.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xvec-0.5.2-py3-none-any.whl (784.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xvec-0.5.2.tar.gz
Algorithm Hash digest
SHA256 f62334066fa0a85a51732361170bb050ae9106ffababb6afbb2301a3f7ee9a04
MD5 c25809faa326744a2b833b18e50773bd
BLAKE2b-256 6d38d45c4bf760f3c46621631b48ae0af7583747022051bc318a51cb87a9ea75

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for xvec-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 757243b9ad8d66922111b16f51d157560cf11916fe790a20b9e955a44efb8e8d
MD5 89b6efce1a27cf44854734889da631c0
BLAKE2b-256 9eb4b3161f856c704938d69c10680abaaf4a24783fa58a9f95590f2a0b63dd09

See more details on using hashes here.

Supported by

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