Skip to content

Transform a geoJSON into a list of geohashes that intersect with it

License

Notifications You must be signed in to change notification settings

mathieuripert/geoh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geoh

Transform a geoJSON into a list of geohashes that intersect with it.

Latest Pypi Release
Build Status (Travis)

Install

pip install geoh

How to use it

import geoh

geohashes = geoh.geohashes(geojson=geojson, precision=6)

Example

Let's take the geojson of San Francisco boundaries. (available here https://github.com/mathieuripert/geoh/blob/master/examples/geojson-sf.json)

alt text

Geohash coverage with precision 5

geohashes = geoh.geohashes(geojson=geojson, precision=5)

['9q8yh', '9q8yj', '9q8yk', '9q8ym', '9q8yn', '9q8yp', '9q8yq', '9q8yr', '9q8ys', '9q8yt', '9q8yu', '9q8yv', '9q8yw', '9q8yx', '9q8yy', '9q8yz', '9q8zh', '9q8zj', '9q8zn', '9q8zp']

alt text

Geohash coverage with precision 6

geohashes = geoh.geohashes(geojson=geojson, precision=6)

alt text