Skip to main content

A plugin for Xarray-xdggs that implements dggal as DGGS provider

Project description

xdggs-dggal

An xdggs plugin that registers the DGGAL discrete global grid systems as Xarray indexes.

The following DGGAL grids are registered by this plugin and can be used as the grid_name attribute on an xdggs-indexed cell-id coordinate:

  • ivea7h.dggal — IVEA7H
  • isea7hz7.dggal — ISEA7H (Z7 ordering)
  • rhealpix.dggal — rHEALPix
  • healpix.dggal — HEALPix

Install

pip install xdggs-dggal

Platform support

The underlying dggal wheel from ecere currently only works reliably on Linux. On macOS (arm64 and x86_64) the published wheel fails to load due to a flat-namespace linker issue in its _pyecrt extension. Track the upstream pydggal project for a fix.

Usage

See example_notebook/demo_xdggs-dggal.ipynb for a walkthrough covering grid registration, cell boundaries, and regridding gridded rasters onto DGGAL cells via the nearestcentroid method.

Minimal sketch:

import xarray as xr
import xdggs_dggal  # noqa: F401 — registers the DGGAL grids with xdggs

ds = xr.Dataset(...)  # with a cell_id coordinate whose attrs include
                      # grid_name="ivea7h.dggal" and level=N
ds = ds.dggs.decode()

The nearestcentroid regridder additionally requires pys2index, which you may need to install separately (it has no macOS arm64 wheel today).

Development

This project uses pixi for environment management:

pixi install
pixi run --environment dev test

Roadmap

Once mature and well-tested, the plan is to propose inclusion natively into the main xdggs repository.

License

MIT — see LICENSE.

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

xdggs_dggal-0.1.2.tar.gz (81.2 kB view details)

Uploaded Source

Built Distribution

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

xdggs_dggal-0.1.2-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file xdggs_dggal-0.1.2.tar.gz.

File metadata

  • Download URL: xdggs_dggal-0.1.2.tar.gz
  • Upload date:
  • Size: 81.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xdggs_dggal-0.1.2.tar.gz
Algorithm Hash digest
SHA256 795bc6f7bca78809ee51a411dfa371a7acde8a567a37005bac79e2a5d773c490
MD5 be45f15559fb2af9dcfdd8b33434e586
BLAKE2b-256 f9243436000f730ed996813e4bc4a406705df01fe57b8e08fe7121d730d63134

See more details on using hashes here.

Provenance

The following attestation bundles were made for xdggs_dggal-0.1.2.tar.gz:

Publisher: python-publish.yml on LandscapeGeoinformatics/xdggs-dggal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xdggs_dggal-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: xdggs_dggal-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xdggs_dggal-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c9319465827ca9bf843b308078d1348b1a7284fc509bbf2e1ef89ae8696364cd
MD5 e49490e6c5f4eadc638c2128fa144ebe
BLAKE2b-256 9e6be3ca7a8c8ba5344e5e605f4e2b93ed71c2951736551fbad5970c1b7af364

See more details on using hashes here.

Provenance

The following attestation bundles were made for xdggs_dggal-0.1.2-py3-none-any.whl:

Publisher: python-publish.yml on LandscapeGeoinformatics/xdggs-dggal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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