GeoHash is an excellent method to code the latitude and longitude of a point into a string. It's concise, due to the use of numbers + letters, and the precision can be tuned adding characters at the end.

I'm looking for an equivalent method to code polygons, not points. I saw two ways to do it:

I would like the code could be manipulated by humans, ie. manually copied, not only by machines as an index.

Edit: see also the discussion (in French) at http://seenthis.net/messages/269838.

  • Welcome to GIS SE, are you open to use any python/geo library?
    – artwork21
    Jun 23, 2014 at 19:50
  • Clearly yes. But the question is more about concepts and algorithms than implementations. Jun 23, 2014 at 20:00

5 Answers 5


Have a look at Georaptor. Creates a compressed set of geohashes, i.e., a combination of geohashes at different levels.


The most robust implementation is in the s2 geometry library with its Polygon Cover implementation. Uses S2CellIds, an improvement upon GeoHashes, as its unit.


With recent release by Google of Open Location Code, there was a good questioning about Geohash. Infortunately, I didn't see something about polygons Geohash.

As you are looking for various implementations for Geohash like solutions, look at Google comparison of various algorithms and solutions at https://github.com/google/open-location-code/blob/master/docs/comparison.adoc

It's clearly for points but it may help you for your polygon Geohash "quest".


A very simple implementation would be to perform BFS filling the polygon with the geohashes. Then you can recursively breakdown the edges into higher precision.

enter image description here

Here's an example Example BFS


The PostGIS function ST_GeoHash returns a GeoHash based on the input geometry type. Of course, any geometry other than a Point would result in lower precision.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.