[ https://issues.apache.org/jira/browse/LUCENE-7157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15224084#comment-15224084 ]
Karl Wright commented on LUCENE-7157: ------------------------------------- I am sorry about the non-linearity. And forget the talk about "poles", that's an implementation issue and actually is not about "earth's poles" in any sense. I am happy to explain but it's not relevant to the API question. bq. Karl: i also would like to know if we solve your problem by refining docs to say: outer rings should be clockwise, holes counter-clockwise. [~rcmuir]: The answer is *no*. The description "inner" and "outer" are orthogonal to which side of the polygon the user means. Would you like an example? Here you go. Suppose you have the following polygon edge (described as lat,lon tuples): (0.0, -150.0) (25.0, 0.0) (0.0, 150.0) (-25.0, 0.0) (0.0, -150.0) // return leg The point (0.0, 0.0) should be considered "inside" the polygon if the points above are in clockwise order, meaning as they are stated above. But if they are in counter clockwise order, then you are talking about the complementary area: (0.0, -150.0) (-25.0, 0.0) (0.0, 150.0) (25.0, 0.0) (0.0, -150.0) // return leg ... and the point (0.0, 0.0) is NOT inside the polygon. But the point (0.0, -180.0) is. So, in my opinion, the API javadoc needs to change to reflect this. As for "holes", I'm happy with whatever convention you want to adopt. Either holes are the reverse order of where they are embedded, or it's the same order. But order, once again, does matter, and we'd want to stick with a convention. Thanks! > Geo3DPoint implementation should pay attention to the ordering of lat/lon > points > -------------------------------------------------------------------------------- > > Key: LUCENE-7157 > URL: https://issues.apache.org/jira/browse/LUCENE-7157 > Project: Lucene - Core > Issue Type: Bug > Reporter: Karl Wright > Attachments: LUCENE-7157.diff, LUCENE-7157.diff, LUCENE-7157.diff, > LUCENE-7157.diff, LUCENE-7157.diff > > > The LatLonPoint API implementation pays attention to the order of the points; > "clockwise" means one side of the polygon boundary, and "counterclockwise" > means the complement. We need to use that in Geo3DPoint and convert into > whatever the underlying GeoPolygonFactory method requires. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org