geojsonhash 0.1.1

Creator: bradpython12

Last updated:

Add to Cart

Description:

geojsonhash 0.1.1

geojsonhash





This package is responsible for generating identifiers for geojson objects. To do so, it makes use of the pygeohash library in charge of generating the identifiers of the different points contained in the geojson.
In this implementation, individual points are ignored, treating the input geojson as a set of polygons defining a surface. The polygons are sorted according to their coordinates while the northwest-most vertex of the polygons defines the starting point for encoding.
Installation
To install the package there are two options: through poetry or by using the pip command
Pip command
$ pip install geojsonhash

Poetry
$ git clone https://github.com/AdrianSeguraOrtiz/geojsonhash.git
$ cd geojsonhash
$ poetry install

Example
An example is shown below:
from geojsonhash import get_geojson_id
import json

with open("./resources/geojson.json") as geo_d:
geojson = json.load(geo_d)

geojson_id = get_geojson_id(geojson)
print(geojson_id)

To run it through console we can do:
$ cd examples
$ python example.py

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.