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.4.0.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.4.0-cp310-abi3-win_amd64.whl (161.8 kB view details)

Uploaded CPython 3.10+Windows x86-64

mortie-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (253.7 kB view details)

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

mortie-0.4.0-cp310-abi3-macosx_11_0_arm64.whl (222.6 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

mortie-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl (233.0 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: mortie-0.4.0.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.4.0.tar.gz
Algorithm Hash digest
SHA256 a07fede5b3071ee1cf2f80f683f21300d144dd2b8338bbd6e3c63e8cc6041500
MD5 fa06bcb746e6ff89af1b70533a3bf0b2
BLAKE2b-256 0eacd31c31973f38d3389ee2d813147ea6f4f3ece79106f26e637aa0a94cc313

See more details on using hashes here.

Provenance

The following attestation bundles were made for mortie-0.4.0.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.4.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: mortie-0.4.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 161.8 kB
  • 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.4.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 053b0af4778ff131984e5a17fdf59e69c02b355c1329751a7ad694b09d91c973
MD5 e3fe56a2bcc5dda3ff607751a22e06b6
BLAKE2b-256 d354a07f4b2ff0fbb67e6b53c7f3dd625f71509d6ed82e08a6b477e118b4eb96

See more details on using hashes here.

Provenance

The following attestation bundles were made for mortie-0.4.0-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.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mortie-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1098c51c03a80ad4fada0cf3d50c5e8d2d21dce05060e90abba6495e8d35b9dd
MD5 0bb08e99725d4b424e605c16d6c3ad31
BLAKE2b-256 43869bf3d845e1cc3a59d12a03847a79644d9e538a29ea336cdc84ecaa5c3ea3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mortie-0.4.0-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.4.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mortie-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d2eb54e284e09445823cd6186ba96a0fd5b2a019a1f58a5f724b2c4345ba282a
MD5 7108d2d2ec095d1bfb5dcf581e0b7811
BLAKE2b-256 570bf720262d61ab9c140961670c8b1b72ae17cce2677f369d5a6fea415998d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mortie-0.4.0-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.4.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mortie-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2254670bb542c9a7989369b58aefc932fff38170f80564be101774b7ec6790a2
MD5 2834ae4388ac2f6e52ecffe87599c19b
BLAKE2b-256 5707f13edb80197f837236ad803a57e12ea3151db8934d70dac5d31de8a68668

See more details on using hashes here.

Provenance

The following attestation bundles were made for mortie-0.4.0-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