Skip to main content

Python bindings for S2, a hierarchical square geospatial indexing system.

Project description

S2-py

https://img.shields.io/pypi/v/s2.svg https://img.shields.io/travis/JoaoCarabetta/s2.svg Documentation Status

A light wrapper over s2sphere to mirror H3-py API calls.

Installing

pip install s2

Using

Import It

from s2 import s2

Get a s2 square given a point

lat, lon, res = 12, -3, 10
s2_address = s2.geo_to_s2(lat, lon, res)

Get the boundaries of a s2 square

s2.s2_to_geo_boundary(s2_address)

Get squares of a resolution within a polygon

s2.polyfill(geo_json, res)

Features

Table of functions to be implemented in order of priority

h3 functions

implemented?

issue

geo_to_h3

yes

h3_to_geo

yes

h3_to_geo_boundary

yes

polyfill

yes

hex_ring

no

k_ring

no

k_ring_distances

no

h3_set_to_multi_polygon

no

h3_to_parent

no

h3_to_children

no

hex_range

no

hex_area

no

edge_length

no

num_hexagons

no

h3_indexes_are_neighbors

no

h3_distance

no

h3_line_size

no

Credits

  • Free software: MIT license

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.9 (2019-11-12)

  • Add option to polyfill to return geometry ids.

0.1.8 (2019-11-12)

  • Add example tests.

0.1.7 (2019-11-12)

  • Basic Documenations.

0.1.0 (2019-11-12)

  • First release on PyPI.

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

s2-0.1.9.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

s2-0.1.9-py2.py3-none-any.whl (4.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file s2-0.1.9.tar.gz.

File metadata

  • Download URL: s2-0.1.9.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.0

File hashes

Hashes for s2-0.1.9.tar.gz
Algorithm Hash digest
SHA256 ad7a90d78f00dd9edf5002ebfa16163a6cbea582bba4ad8ea9d22df07a60851e
MD5 383301f9cdc50983bcfbea8495e87224
BLAKE2b-256 b9b0efaa760f81b02e11a74d00d9810e1f3b704ee8894be7cf996e4f74759a3f

See more details on using hashes here.

File details

Details for the file s2-0.1.9-py2.py3-none-any.whl.

File metadata

  • Download URL: s2-0.1.9-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.0

File hashes

Hashes for s2-0.1.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8f550c1f65a16a5e2efb64867d12356f20092a2d87b10575104563ef6379c192
MD5 e4bb4772b69451d9a986d3190d0369de
BLAKE2b-256 a3cd149942fbf9cd80e2ef62bb4ccac8a016e6ba2ce383ab01ae8dbf8953fe59

See more details on using hashes here.

Supported by

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