A lightweight morton coder with lat/long support.
Project description
A lightweight Python library that enables ordinal hashing of multidimensonal data via Morton coding / Z-ordering, along with support for geospatial indexing.
In mathematical analysis and computer science, Z-order, Morton-order, or a Morton-code is a function which maps multidimensional data to one dimension while preserving locality of the data points. It was introduced in 1966 by IBM researcher, G. M. Morton. The z-value of a point in multidimensions is calculated by interleaving the binary representations of its coordinate values. Once the data are sorted into this ordering, any one-dimensional data structure can be used, such as binary search trees, B-trees, skip lists, or hash tables. The resulting ordering can equivalently be described as the order one would achieve from a depth-first traversal of a quadtree, where {x, y, …, K} are combined into a single ordinal value that is easily compared, searched, and indexed against other Morton numbers.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for pymorton-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38200c1ce35e57ace712777f68ee0c2044e7dcf0390a8c0da764766e61b4eea4 |
|
MD5 | 9d316a10c1c204fc01125678034e72aa |
|
BLAKE2b-256 | 1a5ae77103510b51e69033faa186cd7bd524f5e873fdb70a1400a5ddaeb50939 |