Skip to main content

A lightweight morton coder with lat/long support.

Project description

Ordinal hashing of multidimensonal data and geographic coordinates via Morton coding / Z-ordering.

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

This version
History Node

1.0.5

History Node

1.0.4

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pymorton-1.0.5-py2.7.egg (4.5 kB) Copy SHA256 hash SHA256 Egg 2.7 Feb 15, 2018
pymorton-1.0.5-py2.py3-none-any.whl (4.4 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Feb 15, 2018
pymorton-1.0.5-py3.6.egg (4.6 kB) Copy SHA256 hash SHA256 Egg 3.6 Feb 15, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page