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

Uploaded CPython 3.10+Windows x86-64

mortie-0.4.4-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.4-cp310-abi3-macosx_11_0_arm64.whl (222.5 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

mortie-0.4.4-cp310-abi3-macosx_10_12_x86_64.whl (232.9 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: mortie-0.4.4.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.4.tar.gz
Algorithm Hash digest
SHA256 bd54d3226d6d18b24fdadec3b1f12856c6a0453367f0749e37fe5f71e8e1fcec
MD5 5b4ad9ccf2b0dc256f8f5bb013f829ce
BLAKE2b-256 c355061220f6e3aa1b05e23fb29ac77459dd0dc8dc38306ea86450e7c99e7924

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: mortie-0.4.4-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 161.7 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.4-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 024824af9a3a5657d468341e191711e24e6b8478e216352cdb6b255e11a28c10
MD5 4a02a56f53c4ad8ef1a89343cb39faed
BLAKE2b-256 b33d9a17f571f9c85d48794fa9ef4897ea1e236daa610a5b3d54be3dac941fed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mortie-0.4.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bf8ed1dfbb374f73af686526682324e5f9d5d7434fcd1633bb2c7b14ae919953
MD5 4638e8f88593fab7826d01c91c5ecb4c
BLAKE2b-256 478366dcfc63ea6340c7ad0f171bdbeece9996a41c05a5a5d2642c0835a05589

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mortie-0.4.4-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cf98927651a01ec715b5a385902052800080080bb5cf25646284577bdaf47dfa
MD5 6afe8444630b2809c542fbf9fe40817f
BLAKE2b-256 3dfdc5bdd3933c46275e72a677d4efae82bb9f18e577547ebd35a572fbf6f6f3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mortie-0.4.4-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 50e43b6e286f79b9d0b4a0d048847187c33c9c5e828af97aba9bee6996b4c928
MD5 db64e10ad7debab18adb4b0ebf5d7e86
BLAKE2b-256 6ce7a3b7a517dde388d4786e20a3208ac62b305f5dcb5705298a9ead10dba5a4

See more details on using hashes here.

Provenance

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