If you just need the intersecting geohashes for a provided polygon you can do so in a few lines without indexing the shape.
// build poly ctx = JtsSpatialContext.GEO; Shape shape = ctx.readShapeFromWkt(wkt); // build geohash prefix tree and iterate intersecting cells CellIterator iter = new GeohashPrefixTree(ctx, 6).getTreeCellIterator(shape, 6); while (iter.hasNext()) { Cell c = iter.next(); System.out.println(c); } On Mon, Oct 12, 2015 at 4:40 AM, Swarn Kumar <swarn.ku...@housing.com> wrote: > > Hi, > > I am trying to find intersecting geo-hashes(upto precision length 6) of > around 2lakhs polygons. I have tried using postgis st_geohash and > st_intersect but it is very slow for my use-case. I need to index 2lakhs > polygons and find their intersecting geohashes in 2 mins. > > I read it that its possible to do so using lucene. > > http://opensourceconnections.com/blog/2014/04/11/indexing-polygons-in-lucene-with-accuracy/ > > Kindly, tell me how to do it or point me in the right direction. > > Regards, > Swarn Avinash Kumar >