Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JoaoCarabetta/s2-py
A python API to work with S2 grid cells
https://github.com/JoaoCarabetta/s2-py
Last synced: 3 months ago
JSON representation
A python API to work with S2 grid cells
- Host: GitHub
- URL: https://github.com/JoaoCarabetta/s2-py
- Owner: JoaoCarabetta
- Created: 2019-11-11T22:48:15.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-26T20:59:49.000Z (almost 2 years ago)
- Last Synced: 2024-05-15T04:39:08.245Z (6 months ago)
- Language: Python
- Homepage:
- Size: 33.2 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
Awesome Lists containing this project
README
=====
S2-py
=====\:warning: Project was merged to `BabelGrid `_ \:warning:
A light wrapper over `s2sphere `_ to mirror
`H3-py `_ API calls.Installing
-----------
.. code:: pythonpip install s2
Using
-----Import It
.. code:: python
from s2 import s2
Get a s2 square given a point
.. code:: python
lat, lon, res = 12, -3, 10
s2_address = s2.geo_to_s2(lat, lon, res)Get the boundaries of a s2 square
.. code:: python
s2.s2_to_geo_boundary(s2_address)
Get squares of a resolution within a polygon
.. code:: python
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.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage