FYI I just pushed an improvement (will be in Lucene 6.2) to Lucene's Polygon class, to make it easy to construct Polygons from a GeoJSON string without using an external spatial library: https://issues.apache.org/jira/browse/LUCENE-7380
That issue just adds a new Polygon.fromGeoJSON(String) static method. Mike McCandless http://blog.mikemccandless.com On Sun, Jun 12, 2016 at 7:16 AM, Michael McCandless < luc...@mikemccandless.com> wrote: > > On Wed, Jun 8, 2016 at 10:54 AM, Randall Tidd <r...@tidd.cc> wrote: > >> >> I see that it still depends on JTS. >> > >> > Correction: LatLonPoint most definitely does NOT depend on JTS >> >> I’m sorry this is my mistake, I was using >> org.locationtech.spatial4j.context.jts.JtsSpatialContext in my example >> which depends on JTS. However I now realize I’m able to switch to >> org.locationtech.spatial4j.context.SpatialContext and my example works fine >> because I’m only indexing points and searching for points within a polygon >> and LatLonPoint handles this (in conjunction with >> LatLonPointInPolygonQuery). Thank you for pointing that out. >> > > Hmm but why do you even need a spatial4j SpatialContext when using > LatLonPoint? You shouldn't need spatial4j at all, to do "indexed point in > polygon query". > > Mike McCandless > > http://blog.mikemccandless.com > >