Giter Site home page Giter Site logo

koxudaxi / pyquadkey2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from muety/pyquadkey2

1.0 2.0 0.0 75 KB

๐ŸŒ Python implementation of geographical tiling using QuadKeys as proposed by Microsoft

Home Page: https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system

License: Apache License 2.0

Python 100.00%

pyquadkey2's Introduction

๐ŸŒ pyquadkey2

Documentation

This is a feature-rich Python implementation of QuadKeys, an approach to geographical tiling, that was proposed 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.

n1try/pyquadkey2 originates from a fork of buckhx/QuadKey, which is not maintained anymore. It build 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 by yourself, Cython is required in addition.

Using Pip

  • pip3 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

  • Download the latest release as archive (.tar.gz) or wheel (.whl), e.g. 0.1.1.tar.gz
  • Install it with pip: pip3 install 0.1.1.tar.gz

From source

  • Clone repository: git clone https://github.com/n1try/pyquadkey2
  • Make sure Cython is installed: pip3 install cython
  • Compile Cython modules: cd pyquadkey2/quadkey/tilesystem && python3 setup.py build_ext --inplace && ../../
  • Install the library with Pip: pip3 install .

Troubleshooting

  • ImportError: cannot import name 'tilesystem': Simply try pip3 install --upgrade pyquadkey2 once again. Second time usually works, as required build extensions are installed then. This is a known issue and will be fixed in the future.

License

Apache 2.0

Buy me a coffee

pyquadkey2's People

Contributors

buckhx avatar muety avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.