Skip to main content

Hierarchical geospatial indexing system for square cells in Web Mercator projection

Project description

quadbin-py

PyPI version PyPI downloads Tests

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
is_valid_index(index)
is_valid_cell(cell)
cell_to_tile(cell)
tile_to_cell(tile)
cell_to_point(cell, geojson=False)
point_to_cell(longitude, latitude, resolution)
cell_to_boundary(cell, geojson=False)
cell_to_bounding_box(cell)
get_resolution(index)
index_to_string(index)
string_to_index(index)
k_ring(origin, k)
k_ring_distances(origin, k)
cell_sibling(cell, direction)
cell_to_parent(cell, parent_resolution)
cell_to_children(cell, children_resolution)
geometry_to_cells(geometry, resolution)

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

NOTE: Python2 is supported to enable the usage in platforms like Amazon Redshift.

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

quadbin-0.1.0b3.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

quadbin-0.1.0b3-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file quadbin-0.1.0b3.tar.gz.

File metadata

  • Download URL: quadbin-0.1.0b3.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for quadbin-0.1.0b3.tar.gz
Algorithm Hash digest
SHA256 2b77ca165bab511615f8250b34fa9d1391956241f1211829f0dcdf92876d8ffb
MD5 2c4625b9fafb7bb579e96795f95e730f
BLAKE2b-256 ab706c6925815af5b3adf8fc61e701d877b7ab32689230d86702ce043c814847

See more details on using hashes here.

File details

Details for the file quadbin-0.1.0b3-py3-none-any.whl.

File metadata

  • Download URL: quadbin-0.1.0b3-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for quadbin-0.1.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 82445a77ce3ea0a1dd7a32100b1d811cd9d9c1612a8562a3f1c7f4fe96e198c0
MD5 79fe392b65e9437a4fc52e08ceebefdb
BLAKE2b-256 bf05a1e5cedbf4985644df250e427482b6083c51695e8ff208b3de30cd747b3c

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