convert set of geohashes into a geojson boundaries files of the corresponding geohashes
Project description
Geohash to geojson:
This package convert a set of geohashes into a geojson file with the corresponding boundaries
How it works:
Intall the package with the following code:
pip install goohash-to-geojson
Import the function geohash_to_geojson with the following code:
import geohash_to_geojson
Call the function with a list of the geohashes for example:
geohash_to_geojson.geohash_to_geojson(['snd1j0','snd1jk'])
You ll get the geojson code like that:
'{"type": "FeatureCollection", "features": [{"id": "0", "type": "Feature", "properties": {}, "geometry": {"type": "Polygon", "coordinates": [[[3.0322265625, 36.73828125], [3.043212890625, 36.73828125], [3.043212890625, 36.7437744140625], [3.0322265625, 36.7437744140625], [3.0322265625, 36.73828125]]]}, "bbox": [3.0322265625, 36.73828125, 3.043212890625, 36.7437744140625]}, {"type": "Feature", "properties": {"id": "snd1jk"}, "geometry": {"type": "Polygon", "coordinates": [[[3.043212890625, 36.76025390625], [3.05419921875, 36.76025390625], [3.05419921875, 36.7657470703125], [3.043212890625, 36.7657470703125], [3.043212890625, 36.76025390625]]]}}], "bbox": [3.0322265625, 36.73828125, 3.043212890625, 36.7437744140625]}'
Modify the id :0 in the first feature with the first geohash in your list then copie the text without the first and last ballestics " '' " into a file and save as with a geojson extension and that's it
Requirements:
*json package *polygon_geohasher *geopandas *shapely
Thank you !
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
Built Distribution
Hashes for geohash_to_geojson-1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 118eb4f33328762dff4784fabf5d7adb07ecec599db6b678b67c0be78b88882e |
|
MD5 | 91079d2656ddb5cdaf12a06083792675 |
|
BLAKE2b-256 | 80046a250a2d1f57cf6486c12322b6e49ac657883666217b364c3126fcb3de15 |