lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-7153) give GeoPoint and LatLonPoint full polygon support
Date Fri, 01 Apr 2016 04:24:25 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-7153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15221132#comment-15221132
] 

ASF subversion and git services commented on LUCENE-7153:
---------------------------------------------------------

Commit cc75be53f9b3b86ec59cb93896c4fd5a9a5926b2 in lucene-solr's branch refs/heads/master
from [~rcmuir]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=cc75be5 ]

LUCENE-7153: remove extra PIP copy, this is in Polygon.java now


> give GeoPoint and LatLonPoint full polygon support
> --------------------------------------------------
>
>                 Key: LUCENE-7153
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7153
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Robert Muir
>             Fix For: master, 6.1
>
>         Attachments: LUCENE-7153.patch, LUCENE-7153.patch, LUCENE-7153.patch
>
>
> These two geo impls have a very limited polygon support that does not support inner rings
(holes) or multiple outer rings efficiently.
> Basically if you want to do this, you are left building crazy logic with booleanquery
which will send memory into the gigabytes for a single query, needlessly. 
> For example Russia polygon from geonames is 250KB of geojson and over a thousand outer
rings.
> We should instead support this stuff with the queries themselves, especially it will
allow us to implement things more efficiently in the future.
> I think instead of {{newPolygonQuery(double[], double[])}} it should look like {{newPolygonQuery(Polygon...)}}.
A polygon can be a single outer ring (shape) with 0 or more inner rings (holes). No nesting,
you just use multiply polygons if you e.g. have an island. 
> See http://esri.github.io/geometry-api-java/doc/Polygon.html for visuals and examples.
I indented their GeoJSON example:
> {noformat}
> {
>   "type":"MultiPolygon",
>   "coordinates": [
>      // first polygon (order does not matter could have been last instead)
>      [
>        // clockwise => outer ring
>        [[0.0,0.0],[-0.5,0.5],[0.0,1.0],[0.5,1.0],[1.0,0.5],[0.5,0.0],[0.0,0.0]],
>        // hole
>        [[0.5,0.2],[0.6,0.5],[0.2,0.9],[-0.2,0.5],[0.1,0.2],[0.2,0.3],[0.5,0.2]]
>      ],
>      // second polygon (order does not matter, could have been first instead)
>      [ 
>        // island
>        [[0.1,0.7],[0.3,0.7],[0.3,0.4],[0.1,0.4],[0.1,0.7]]
>      ]
>   ],
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message