[
https://issues.apache.org/jira/browse/LUCENE-8245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16430353#comment-16430353
]
Karl Wright edited comment on LUCENE-8245 at 4/9/18 11:06 AM:
--------------------------------------------------------------
What's right:
The graphic shows there are only two edges that intersect the travel plane and
test point plane. And we find two, which is good. These are the ones we find:
{code}
[junit4] 1> Considering edge [lat=-1.4506713533447755,
lon=-1.2251247551355924([X=0.04060395941016342, Y=-0.11274773940940182,
Z=-0.9927936672533157])] -> [lat=4.9E-324, lon=0.0([X=1.0, Y=0.0, Z=4.9E-324])]
{code}
and
{code}
[junit4] 1> Considering edge [lat=4.9E-324, lon=0.0([X=1.0, Y=0.0,
Z=4.9E-324])] -> [lat=0.13953211802880663,
lon=-2.443438340098597([X=-0.7585849990851791, Y=-0.6365576248361361,
Z=0.139079795174987])]
{code}
We'd expect one of the planes to intersect both the travel and the test point
planes, and the other to intersect just one. The second edge intersects just
the travel plane, and it crosses both inner and outer envelopes. The first
edge, therefore, should cross the test point plane, both inner and outer, and
it does. But since the second edge crossed both inner and outer travel plane
envelopes, we'd expect that the first edge would do the same, but it doesn't;
it only crosses the inner side.
So, either, the first edge should also cross the outer side of the travel
plane, or the second edge should NOT cross the outer side of the travel plane.
We need to determine what the right behavior is by going deeper numerically --
we need to evaluate the edge endpoint to see where it sits relative to the
travel plane and to the inner and outer envelopes. I will add evaluate()
method calls to the diagnostics so we can see this.
But it's also clear we're looking at a numerical precision problem here.
was (Author: [email protected]):
Basic on the graphic, there should be two adjoining edges intersect the travel
plane. But the total inner crossings, added together, should be equal - same
number of inner crossings as outer crossings. We're seeing only ONE come up as
intersecting the travel plane, though. That's hard to do given that the other
crosses it.
> 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
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]