pyquadkey2


Namepyquadkey2 JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/muety/pyquadkey2
SummaryPython implementation of geographical tiling using QuadKeys as proposed by Microsoft
upload_time2024-05-03 17:07:41
maintainerNone
docs_urlNone
authorFerdinand Mütsch
requires_python>=3.10
licenseNone
keywords tiling quadkey quadtile geospatial geohash
VCS
bugtrack_url
requirements Cython setuptools
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🌍 pyquadkey2
[![Documentation](https://docs.muetsch.io/badge.svg)](https://docs.muetsch.io/pyquadkey2/)

![](https://docs.microsoft.com/en-us/bingmaps/articles/media/5cff54de-5133-4369-8680-52d2723eb756.jpg)

This is a feature-rich Python implementation of [QuadKeys](https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system), 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](https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system).

[muety/pyquadkey2](https://github.com/muety/pyquadkey2) originates from a **fork**
of [buckhx/QuadKey](https://github.com/buckhx/QuadKey), which is not maintained anymore. It builds on top of that
project and adds:

* ✅ Several (critical) [bug fixes](https://github.com/buckhx/QuadKey/pull/15)
* ✅ Python 3 support
* ✅ [Type hints](https://docs.python.org/3.6/library/typing.html) 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.10** or higher. To compile it from source, Cython is required in addition.

### Using Pip
```bash
$ 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
```bash
$ wget https://github.com/muety/pyquadkey2/releases/download/0.3.1/pyquadkey2-0.3.1.tar.gz
$ pip install pyquadkey2-0.3.1.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](https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory/21530768#21530768)

#### Prerequisites (`Windows`)
* Visual C++ Build Tools 2015 (with Windows 10 SDK) (see [here](https://devblogs.microsoft.com/python/unable-to-find-vcvarsall-bat/#i-need-a-package-that-has-no-wheel-what-can-i-do))

#### Build
```bash
# 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 .
```

## Developer Notes

### Unit Tests

```bash
python tests/__init__.py
```

### Release

See [here](https://packaging.python.org/en/latest/tutorials/packaging-projects/).

```bash
pip install setuptools wheel auditwheel
python -m build
cd dist
auditwheel repair *.whl
twine upload --repository testpypi wheelhouse/* ../*.tar.gz
```

## License
Apache 2.0

[![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoff.ee/n1try)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/muety/pyquadkey2",
    "name": "pyquadkey2",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "tiling quadkey quadtile geospatial geohash",
    "author": "Ferdinand M\u00fctsch",
    "author_email": "ferdinand@muetsch.io",
    "download_url": "https://files.pythonhosted.org/packages/aa/32/7cf240304eaff8c5af857cefafd2e87eb65ffb4e9b845d44ade68e413fc3/pyquadkey2-0.3.1.tar.gz",
    "platform": null,
    "description": "# \ud83c\udf0d pyquadkey2\n[![Documentation](https://docs.muetsch.io/badge.svg)](https://docs.muetsch.io/pyquadkey2/)\n\n![](https://docs.microsoft.com/en-us/bingmaps/articles/media/5cff54de-5133-4369-8680-52d2723eb756.jpg)\n\nThis is a feature-rich Python implementation of [QuadKeys](https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system), an approach to **geographical tiling**, popularized by Microsoft to be used for Bing Maps.\n\nIn 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`.\n\nFor more details on the concept, please refer to\nthe [original article](https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system).\n\n[muety/pyquadkey2](https://github.com/muety/pyquadkey2) originates from a **fork**\nof [buckhx/QuadKey](https://github.com/buckhx/QuadKey), which is not maintained anymore. It builds on top of that\nproject and adds:\n\n* \u2705 Several (critical) [bug fixes](https://github.com/buckhx/QuadKey/pull/15)\n* \u2705 Python 3 support\n* \u2705 [Type hints](https://docs.python.org/3.6/library/typing.html) for all methods\n* \u2705 Higher test coverage\n* \u2705 Cython backend for improved performance\n* \u2705 64-bit integer representation of QuadKeys\n* \u2705 Additional features and convenience methods\n\n## Installation\n### Requirements\n\nThis library requires **Python 3.10** or higher. To compile it from source, Cython is required in addition.\n\n### Using Pip\n```bash\n$ pip install pyquadkey2\n```\n\nPip 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.\n\n### From archive\n```bash\n$ wget https://github.com/muety/pyquadkey2/releases/download/0.3.1/pyquadkey2-0.3.1.tar.gz\n$ pip install pyquadkey2-0.3.1.tar.gz\n```\n\n### From source\n#### Prerequisites (`Linux`)\n* `gcc`\n    * Fedora: `dnf install @development-tools`\n    * Ubuntu / Debian: `apt install build-essential`\n* `python3-devel`\n    * Fedora: `dnf install python3-devel`\n    * Ubuntu / Debian: `apt install python3-dev`\n    * Others: See [here](https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory/21530768#21530768)\n\n#### Prerequisites (`Windows`)\n* Visual C++ Build Tools 2015 (with Windows 10 SDK) (see [here](https://devblogs.microsoft.com/python/unable-to-find-vcvarsall-bat/#i-need-a-package-that-has-no-wheel-what-can-i-do))\n\n#### Build\n```bash\n# Check out repo\n$ git clone https://github.com/muety/pyquadkey2\n\n# Create and active virtual environment (optional)\n$ python -m venv ./venv\n$ source venv/bin/activate\n\n# Install depencencies\n$ pip install -r requirements.txt\n\n# Compile\n$ cd src/pyquadkey2/quadkey/tilesystem && python setup.py build_ext --inplace && cd ../../../..\n\n# Install as module\n$ pip install .\n```\n\n## Developer Notes\n\n### Unit Tests\n\n```bash\npython tests/__init__.py\n```\n\n### Release\n\nSee [here](https://packaging.python.org/en/latest/tutorials/packaging-projects/).\n\n```bash\npip install setuptools wheel auditwheel\npython -m build\ncd dist\nauditwheel repair *.whl\ntwine upload --repository testpypi wheelhouse/* ../*.tar.gz\n```\n\n## License\nApache 2.0\n\n[![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoff.ee/n1try)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python implementation of geographical tiling using QuadKeys as proposed by Microsoft",
    "version": "0.3.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/muety/pyquadkey2/issues",
        "Documentation": "https://docs.muetsch.io/pyquadkey2/",
        "Homepage": "https://github.com/muety/pyquadkey2",
        "Source Code": "https://github.com/muety/pyquadkey2"
    },
    "split_keywords": [
        "tiling",
        "quadkey",
        "quadtile",
        "geospatial",
        "geohash"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d046b68fc97deb65acc834cdb30c1b5282c8765e6ddf7e3cb88933061344beab",
                "md5": "9677918172ba9d06287bac6ea1965f32",
                "sha256": "91a7097a3c3e67cc59f0e99aafc4237f4775f07ded445c3d75bfd42889c5c7fd"
            },
            "downloads": -1,
            "filename": "pyquadkey2-0.3.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "9677918172ba9d06287bac6ea1965f32",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.10",
            "size": 46652,
            "upload_time": "2024-05-03T17:07:38",
            "upload_time_iso_8601": "2024-05-03T17:07:38.967320Z",
            "url": "https://files.pythonhosted.org/packages/d0/46/b68fc97deb65acc834cdb30c1b5282c8765e6ddf7e3cb88933061344beab/pyquadkey2-0.3.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aa327cf240304eaff8c5af857cefafd2e87eb65ffb4e9b845d44ade68e413fc3",
                "md5": "3890a46fee6c3a5e429198abea155a1a",
                "sha256": "587ffa758c37857ac14d67aaed6f2473911bc194b74d1713a577b97413ec4264"
            },
            "downloads": -1,
            "filename": "pyquadkey2-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3890a46fee6c3a5e429198abea155a1a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 69687,
            "upload_time": "2024-05-03T17:07:41",
            "upload_time_iso_8601": "2024-05-03T17:07:41.087889Z",
            "url": "https://files.pythonhosted.org/packages/aa/32/7cf240304eaff8c5af857cefafd2e87eb65ffb4e9b845d44ade68e413fc3/pyquadkey2-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-03 17:07:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "muety",
    "github_project": "pyquadkey2",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "Cython",
            "specs": [
                [
                    "==",
                    "3.0.10"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": []
        }
    ],
    "lcname": "pyquadkey2"
}
        
Elapsed time: 0.24838s