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.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ba119d9ac54a18a20c91706f3d4c08e2f0681a4278cbb72391dd44cb4fe0592 |
|
MD5 | 2bf1935d4e15e49437217c2a53776afd |
|
BLAKE2b-256 | 1458752ad6be7a88203aa6e02126323c312b3bc3b29ede3b3ff1a021cce82a00 |