Hierarchical geospatial indexing system for square cells in Web Mercator projection
Project description
quadbin-py
Python library for quadbin.
Install
pip install quadbin
Usage
>>> import quadbin
>>> longitude = -3.7038
>>> latitude = 40.4168
>>> resolution = 10
>>> quadbin.point_to_cell(longitude, latitude, resolution)
5234261499580514303
API
Function |
---|
cell_is_valid(index: int) -> bool |
cell_to_tile(index: int) -> {"z","x","y"} |
tile_to_cell(z: int, x: int, y: int) -> [longitude, latitude] |
point_to_cell(longitude: float, latitude: float, resolution: int) -> int |
get_resolution(index: int) -> int |
Development
Make commands:
- init: create the environment and install dependencies
- lint: run linter (flake8) + fix (black)
- test: run tests (pytest)
- publish-pypi: publish package in pypi.org
- publish-test-pypi: publish package in test.pypi.org
- clean: remove the environment
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 Distribution
quadbin-0.1.0a1.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for quadbin-0.1.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60921d2341c811f4b84e79a6ca87a5a511be919956da687c5e7fe68da6d42cb9 |
|
MD5 | 843daf17b7260d6025ea1e00e3548579 |
|
BLAKE2b-256 | 657a82cd9672288a22079e4cd7c6065e43262986eee515d413b8257c6b0b8b26 |