I have a requirement where I need to convert a set of Geohash to KML files such that they can be used as areas to plot data by overlaying on map.

Is anyone aware of an open resource which can help me with this conversion.


Yes, there are a couple of options I can point you towards.

Using's PostGIS's ST_GeomFromGeoHash

ST_GeomFromGeoHash — Return a geometry from a GeoHash string. Return a geometry from a GeoHash string. The geometry will be a polygon representing the GeoHash bounds.

If no precision is specified ST_GeomFromGeoHash returns a polygon based on full precision of the input GeoHash string.

If precision is specified ST_GeomFromGeoHash will use that many characters from the GeoHash to create the polygon.

Also, here is a tool Geohash Converter which states

Simple and fast conversion from geohash to latitude/longitude and from latitude/longitude to geohash.

  • Thanks! I was able to convert a bulk of geohashes using the ST_GeomFromGeoHash function. Is there a way to transform this output such that Qgis can read either in the form of GeoJson or KML? – nehalkum May 23 '18 at 7:21
  • Can you update what you have received, provide a screen shot as well. Also, was there a polygon generated? – whyzar May 23 '18 at 17:12
  • It outputs values in the form POLYGON(77.783203125,13.0572509765625 77.783203125,13.062744140625 77.794189453125,13.062744140625 77.794189453125,13.0572509765625 77.783203125,13.0572509765625). These need to be translated to KML/SHP file – nehalkum May 28 '18 at 13:00

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.