[ https://issues.apache.org/jira/browse/LUCENE-8245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432111#comment-16432111 ]
Karl Wright commented on LUCENE-8245: ------------------------------------- [~ivera], I've committed the tests with the @AwaitsFix annotation. I'm looking at them one at a time. Please let me turn your attention to "case2". Debug output from this case looks like this: {code} [junit4] 1> [junit4] 1> The following edges should intersect the travel/testpoint planes: [junit4] 1> Travel plane: [lat=-0.09183481853716734, lon=0.0([X=0.9957861458099824, Y=0.0, Z=-0.09170578941866683])] -> [lat=-0.3728403971990659, lon=-0.27395646628085935([X=0.8965665862615776, Y=-0.25195523953197785, Z=-0.3642621496554991])] [junit4] 1> [junit4] 1> Considering edge [lat=-0.09183481853716734, lon=0.0([X=0.9957861458099824, Y=0.0, Z=-0.09170578941866683])] -> [lat=-0.3728403971990659, lon=-0.27395646628085935([X=0.8965665862615776, Y=-0.25195523953197785, Z=-0.3642621496554991])] [junit4] 1> Intersection found with travel plane... [junit4] 1> Edge intersects travel or testPoint plane [junit4] 1> Edge added 0 to innerCrossingCount [junit4] 1> Edge added 1 to outerCrossingCount [junit4] 1> [junit4] 1> Considering edge [lat=-0.28073906699213097, lon=0.21188006007761473([X=0.9393636799476138, Y=0.20206530496788694, Z=-0.2770658573760249])] -> [lat=-0.1600017188310958, lon=0.0849758111192731([X=0.983664825750331, Y=0.08378949178268695, Z=-0.1593199034909639])] [junit4] 1> No intersections with travel plane... [junit4] 1> No intersections with testpoint plane... [junit4] 1> [junit4] 1> Considering edge [lat=-0.1600017188310958, lon=0.0849758111192731([X=0.983664825750331, Y=0.08378949178268695, Z=-0.1593199034909639])] -> [lat=-0.09183481853716734, lon=0.0([X=0.9957861458099824, Y=0.0, Z=-0.09170578941866683])] [junit4] 1> No intersections with travel plane... [junit4] 1> No intersections with testpoint plane... [junit4] 1> [junit4] 1> Considering edge [lat=-0.3728403971990659, lon=-0.27395646628085935([X=0.8965665862615776, Y=-0.25195523953197785, Z=-0.3642621496554991])] -> [lat=-0.4683367913453203, lon=0.09620752412577895([X=0.8881938751251655, Y=0.08571555484949944, Z=-0.4514027955684197])] [junit4] 1> No intersections with travel plane... [junit4] 1> No intersections with testpoint plane... {code} So, the sole edge that intersects with the travel plane does *not* intersect at either edge's endpoint; it intersects by virtue of an actual mathematical intersection being detected. Since there is no detection of an intersection of the travel plane by any of the other edges, we can conclude, as you certainly have, that the edge's endpoints both lie outside of the zone where we would consider those endpoints to be on the travel plane. So far, so good. But let's be clear: this means, mathematically, that there is *no* intersection between any of the other edges and the travel plane. What we need to do is figure out how the edge winds up crossing just one side of the envelope, and not exiting anywhere, without intersecting either the inner or outer envelope planes. We know that intersection computation is not guaranteed to come up with a plane intersection unless there's an actual crossing of the plane within the intersection bounds. So, probably, the endpoint's intersection with the inner/outer envelope plane(s) is what's being missed. I'll try a fix and see how that does. > GeoComplexPolygon fails when intersection of travel plane with edge is near > polygon point > ----------------------------------------------------------------------------------------- > > Key: LUCENE-8245 > URL: https://issues.apache.org/jira/browse/LUCENE-8245 > Project: Lucene - Core > Issue Type: Bug > Components: modules/spatial3d > Reporter: Ignacio Vera > Assignee: Karl Wright > Priority: Major > Fix For: 6.7, 7.4, master (8.0) > > Attachments: LUCENE-8245-case2.patch, LUCENE-8245.jpg, > LUCENE-8245.patch, LUCENE-8245_Polygon.patch, LUCENE-8245_Random.patch, > LUCENE-8245_case3.patch > > > When a travel plane crosses an edge close to an edge point , it is possible > that the above and below planes crosses different edges. In the current > implementation one of the crosses is missed because we only check edges that > are crossed by the main plain and the {{within}} result is wrong. > One possible fix is to check always the intersection of planes and edges > regardless if they are crossed by main plane. That fixed the above issue but > shows other issues like travel planes crossing two edges when it should be > only one due to the fuzziness at edge intersections. > Not sure of a fix so I add the test showing the issue. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org