Skip to main content

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

geohash_to_geojson-1.3.2.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geohash_to_geojson-1.3.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file geohash_to_geojson-1.3.2.tar.gz.

File metadata

  • Download URL: geohash_to_geojson-1.3.2.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for geohash_to_geojson-1.3.2.tar.gz
Algorithm Hash digest
SHA256 2047647a87760046b7296669251a248e7bc0385237fed4cddcbbbdbc23712b81
MD5 cba8882990047f9daf0a36059532db46
BLAKE2b-256 528796e41b74d4c4301c86b7392dd069ffeaae69973bed8f0946df597f795b24

See more details on using hashes here.

File details

Details for the file geohash_to_geojson-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: geohash_to_geojson-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for geohash_to_geojson-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ba119d9ac54a18a20c91706f3d4c08e2f0681a4278cbb72391dd44cb4fe0592
MD5 2bf1935d4e15e49437217c2a53776afd
BLAKE2b-256 1458752ad6be7a88203aa6e02126323c312b3bc3b29ede3b3ff1a021cce82a00

See more details on using hashes here.

Supported by

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