lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: "Point in polygon" search with Lucene / Spatial4j / JTS
Date Fri, 15 Jul 2016 15:06:25 GMT
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 <
lucene@mikemccandless.com> wrote:

>
> On Wed, Jun 8, 2016 at 10:54 AM, Randall Tidd <rc@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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message