Skip to main content

Python implementation of geographical tiling using QuadKeys as proposed by Microsoft

Project description

🌍 pyquadkey2

Documentation

This is a feature-rich Python implementation of QuadKeys, an approach to geographical tiling, popularized by Microsoft to be used for Bing Maps.

In essence, the concept is to recursively divide the flat, two-dimensional world map into squares. Each square contains four squares as children, which again contain four squares and so on, up centimeter-level precision. Each of these squares is uniquely identifiable with a string like 021030032.

For more details on the concept, please refer to the original article.

muety/pyquadkey2 originates from a fork of buckhx/QuadKey, which is not maintained anymore. It builds on top of that project and adds:

  • ✅ Several (critical) bug fixes
  • ✅ Python 3 support
  • Type hints for all methods
  • ✅ Higher test coverage
  • ✅ Cython backend for improved performance
  • ✅ 64-bit integer representation of QuadKeys
  • ✅ Additional features and convenience methods

Installation

Requirements

This library requires Python 3.6 or higher. To compile it from source, Cython is required in addition.

Using Pip

$ pip install pyquadkey2

Pip installation is only tested for Linux and Mac, yet. If you encounter problems with the installation on Windows, please report them as a new issue.

From archive

$ wget https://github.com/muety/pyquadkey2/releases/download/0.2.2/pyquadkey2-0.2.2.tar.gz
$ pip install pyquadkey2-0.2.2.tar.gz

From source

Prerequisites (Linux)

  • gcc
    • Fedora: dnf install @development-tools
    • Ubuntu / Debian: apt install build-essential
  • python3-devel
    • Fedora: dnf install python3-devel
    • Ubuntu / Debian: apt install python3-dev
    • Others: See here

Prerequisites (Windows)

  • Visual C++ Build Tools 2015 (with Windows 10 SDK) (see here)

Build

# Check out repo
$ git clone https://github.com/muety/pyquadkey2

# Create and active virtual environment (optional)
$ python -m venv ./venv
$ source venv/bin/activate

# Install depencencies
$ pip install -r requirements.txt

# Compile
$ cd src/pyquadkey2/quadkey/tilesystem && python setup.py build_ext --inplace && cd ../../../..

# Install as module
$ pip install .

License

Apache 2.0

Buy me a coffee

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

pyquadkey2-0.2.2.tar.gz (60.9 kB view details)

Uploaded Source

Built Distributions

pyquadkey2-0.2.2-cp310-cp310-win_amd64.whl (30.8 kB view details)

Uploaded CPython 3.10Windows x86-64

pyquadkey2-0.2.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (136.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.5+ x86-64

pyquadkey2-0.2.2-cp39-cp39-win_amd64.whl (28.6 kB view details)

Uploaded CPython 3.9Windows x86-64

pyquadkey2-0.2.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (136.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.5+ x86-64

File details

Details for the file pyquadkey2-0.2.2.tar.gz.

File metadata

  • Download URL: pyquadkey2-0.2.2.tar.gz
  • Upload date:
  • Size: 60.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for pyquadkey2-0.2.2.tar.gz
Algorithm Hash digest
SHA256 27b43ab68442067ecc3adf54d6913cdb98b78da4d7308d356b25cc75f94ce703
MD5 dedb034dd677d267af1107e1d06a2af5
BLAKE2b-256 118d816abe36c5d56b0e1382d5e0147a384eb361644e28866e50b2bf20cd4b6c

See more details on using hashes here.

File details

Details for the file pyquadkey2-0.2.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyquadkey2-0.2.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for pyquadkey2-0.2.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9448eac4dca3bf5407bccf2a8d4886432bf877770683733bbe68af8ddcbab43d
MD5 4bd2eafffc33f79d036619e9dc336250
BLAKE2b-256 5f67bf7c6a1221676ba900607b441bb9bcd37dac60e8d715fb2115110bb74f3c

See more details on using hashes here.

File details

Details for the file pyquadkey2-0.2.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pyquadkey2-0.2.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2ff30c8561eaf36ab0cbd4c5e4dc004b900c22c925ffd1759d4b03a46e95fa15
MD5 d57ed4e583d66b88aff747ff7c9527a5
BLAKE2b-256 6fe022f52fc5341444547f8f830d32fbb1006b389506fcf6280c67b6ee052642

See more details on using hashes here.

File details

Details for the file pyquadkey2-0.2.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyquadkey2-0.2.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for pyquadkey2-0.2.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d0efc0a16f20176de56ddc54c412dc2a7ee74e6f26e51a8c4c3ca6f9a0da329d
MD5 0cf43422029acc3950d2d1f4e533a7ba
BLAKE2b-256 c1ce344f86bb34b2aa308f3d44a60f2d8dca015798242f6e638e8ff860725b73

See more details on using hashes here.

File details

Details for the file pyquadkey2-0.2.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pyquadkey2-0.2.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6e95e4f01be0a3376c0d8c68b56e58e1bbdcc6b8887a5619fd951420fddd6451
MD5 f390b49e7d0f69af81f9c2c6e8358f80
BLAKE2b-256 8b0f8b5210c916fcd14590273499ca96f08900909a56de6d57484bc3e1e86cff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page