Skip to main content

Morton numbering and indexing for healpix grids

Project description

mortie

Tests codecov PyPI version Python 3.10+

Morty using mortie

Mortie is a library for applying morton indexing to healpix grids. Morton numbering (also called z-ordering) facilitates several geospatial operators such as buffering and neighborhood look-ups, and can generally be thought of as a type of geohashing.

This particular implementation focuses on hierarchical healpix maps, and is mostly inspired from this paper.

Performance

Mortie uses Rust-accelerated morton indexing functions for high performance, with an automatic fallback to pure Python if Rust is unavailable. The Rust implementation provides dramatic speedups:

Dataset Size Rust Pure Python Speedup
1,000 values 1.93 ms 4.14 ms 2.1x
100,000 values 1.85 ms 410.59 ms 222x
1.2M coordinates 102.51 ms 5.1 sec 50x

Pre-built wheels are available for Linux, macOS, and Windows. If a wheel is unavailable for your platform, mortie will automatically use the pure Python fallback.

Installation

pip install mortie

For development builds with Rust, see BUILDING.md.

TODO:

  • add paper reference
  • add funding information
  • add tests
  • remove / prune dead code
  • add example(s)
  • fix north / south bug
  • remove numba dependency
  • update documentation
  • publish to pypi

Dependencies are numpy and healpy. The Rust-accelerated functions are optional - if unavailable, mortie will automatically fall back to a pure Python implementation. Although not a dependency, there are several functions that have been written to interface with the vaex project.

Funding

Initial funding of this work was supported by the ICESat-2 project science office, at the Laboratory for Cryospheric Sciences (NASA Goddard, Section 615).

References

[1] Youngren, Robert W., and Mikel D. Petty. "A multi-resolution HEALPix data structure for spherically mapped point data." Heliyon 3.6 (2017): e00332. doi: 10.1016/j.heliyon.2017.e00332

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

mortie-0.5.2.tar.gz (15.1 MB view details)

Uploaded Source

Built Distributions

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

mortie-0.5.2-cp310-abi3-win_amd64.whl (15.0 MB view details)

Uploaded CPython 3.10+Windows x86-64

mortie-0.5.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

mortie-0.5.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.0 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

mortie-0.5.2-cp310-abi3-macosx_11_0_arm64.whl (15.0 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

mortie-0.5.2-cp310-abi3-macosx_10_12_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for mortie-0.5.2.tar.gz
Algorithm Hash digest
SHA256 ee80cf40b0fd82e8b2f7f03fbe968ab642c4ecd3bf4c860023d249b3e4872c2e
MD5 085786befad418a60ef528a55cf7bde0
BLAKE2b-256 8a71182f2272f7a19fde0059658f2207f0f33eab1adf699f3a1d9c49cdc83901

See more details on using hashes here.

Provenance

The following attestation bundles were made for mortie-0.5.2.tar.gz:

Publisher: build-wheels.yml on espg/mortie

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

File details

Details for the file mortie-0.5.2-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: mortie-0.5.2-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 15.0 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mortie-0.5.2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 853ee9756de33254aa250350670f6ddf08144a3a5abeb80baa82a84ed3b825af
MD5 5482c5c0795f37ce65abc23c60914e57
BLAKE2b-256 94fe605377537c5ede20b8820354288aa32fa62d2130e2494854c31eb0fd1c30

See more details on using hashes here.

Provenance

The following attestation bundles were made for mortie-0.5.2-cp310-abi3-win_amd64.whl:

Publisher: build-wheels.yml on espg/mortie

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

File details

Details for the file mortie-0.5.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mortie-0.5.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d87d4f30711d24bfde1ae4845a2ad8d4b9f6ba6bcea6e23c0eb0e837fcc8520c
MD5 58b7ebb5cf4646238b2e03d2ca9160d4
BLAKE2b-256 6febacb7339f37121fedb20814e3d63763f14a5be1efa593b79ba40dec7265c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for mortie-0.5.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build-wheels.yml on espg/mortie

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

File details

Details for the file mortie-0.5.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mortie-0.5.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c82e9dcef8f1671042e571b0988544ee1f10ee9355210d0fa05f6664294509d9
MD5 05362641a3c2c294fadca8c6aa4dd01c
BLAKE2b-256 caeeea1c8f568cc1cd977263d8c6fd3804201b9494568a8dc7c0ec999e1a4487

See more details on using hashes here.

Provenance

The following attestation bundles were made for mortie-0.5.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: build-wheels.yml on espg/mortie

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

File details

Details for the file mortie-0.5.2-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mortie-0.5.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e4caa4df2b4ad5fbc4de248dadbb0dffa5dc09a338a35add0e629d09c7a50e8f
MD5 a3adb587a1d86e3abb0c28bcb0569308
BLAKE2b-256 cc154406f4ad17e45ad4e061b119c9c530f39046dd0c811f7c412fcb55fa1285

See more details on using hashes here.

Provenance

The following attestation bundles were made for mortie-0.5.2-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: build-wheels.yml on espg/mortie

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

File details

Details for the file mortie-0.5.2-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mortie-0.5.2-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f26883110875bb279199cd39f024b32821f1651a046c9e957f21d2cffabd0b16
MD5 86518fc9276414ba367b5eed1b617b5f
BLAKE2b-256 e97a03a4ce089d59d2d7738668aa07613302d732f8531b984bb6b4fcae5e5d60

See more details on using hashes here.

Provenance

The following attestation bundles were made for mortie-0.5.2-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: build-wheels.yml on espg/mortie

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