1

I have a WKT Linestring, let's say:

LINESTRING (11.782009 42.099761, 11.781858 42.099615, 11.782359 42.100029) 

From this path, I want to get the list of geohashes that it goes through.

In python, there is https://github.com/mathieuripert/geoh . A Java equivalent is https://github.com/jillesvangurp/geogeometry however this library is buggy (it doesn't use the provided precision and somewhere it inverts lat and lon so that the resulting geohashes are wrong). I prefer not to fork it as I am not an expert in spatial processing.

I can't find the same function in geomesa or jts, do you know any reliable library that does the job?

Rolintocour
  • 2,934
  • 4
  • 32
  • 63

1 Answers1

0

Finally found GeohashUtils.decomposeGeometry() in https://github.com/locationtech/geomesa/blob/master/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geohash/GeoHash.scala as suggested

Rolintocour
  • 2,934
  • 4
  • 32
  • 63