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

Karl Wright commented on LUCENE-8245:
-------------------------------------

Here's the output of the two edges that get considered in this case:

{code}
   [junit4]   1> Considering edge [lat=1.5463873005088208E-34, lon=0.0([X=1.0, 
Y=0.0, Z=1.5463873005088208E-34])] -> [lat=-0.08842062843650192, 
lon=2.2837078580414776([X=-0.6514839583883643, Y=0.7535056721696336, 
Z=-0.08830545832969094])]
   [junit4]   1> Looking for intersection between plane [A=0.0, B=0.0; C=1.0; 
D=-2.330673801245995E-13] and plane [A=-1.5358762834889417E-34, 
B=0.11639624844359603; C=0.9932028560914717; D=0.0] within bounds
   [junit4]   1>  Two points of intersection
   [junit4]   1>   return no solutions
   [junit4]   1> Looking for intersection between plane [A=0.0, B=1.0; C=0.0; 
D=-0.7784765265847915] and plane [A=-1.5358762834889417E-34, 
B=0.11639624844359603; C=0.9932028560914717; D=0.0] within bounds
   [junit4]   1>  Two points of intersection
   [junit4]   1>   return no solutions
   
   [junit4]   1> Considering edge [lat=-0.08842062843650192, 
lon=2.2837078580414776([X=-0.6514839583883643, Y=0.7535056721696336, 
Z=-0.08830545832969094])] -> [lat=0.379731892927642, 
lon=2.3485766139444504([X=-0.651713420845267, Y=0.6617191814215959, 
Z=0.370671474528177])]
   [junit4]   1> Looking for intersection between plane [A=0.0, B=0.0; C=1.0; 
D=-2.330673801245995E-13] and plane [A=0.7421702138887571, 
B=0.6571273907443821; C=0.1317837848515384; D=0.0] within bounds
   [junit4]   1>  Two points of intersection
   [junit4]   1>   return no solutions
   [junit4]   1> Looking for intersection between plane [A=0.0, B=1.0; C=0.0; 
D=-0.7784765265847915] and plane [A=0.7421702138887571, B=0.6571273907443821; 
C=0.1317837848515384; D=0.0] within bounds
   [junit4]   1>  no solutions - no intersection
   [junit4]   1> Considering edge [lat=0.7779906922732096, 
lon=2.728264320121337([X=-0.6523396177204123, Y=0.2861122564854598, 
Z=0.7018495564158925])] -> [lat=1.5463873005088208E-34, lon=0.0([X=1.0, Y=0.0, 
Z=1.5463873005088208E-34])]
   [junit4]   1> Looking for intersection between plane [A=0.0, B=0.0; C=1.0; 
D=-2.330673801245995E-13] and plane [A=5.837507846237386E-35, 
B=0.9260123314536496; C=-0.377493260861404; D=0.0] within bounds
   [junit4]   1>  Two points of intersection
   [junit4]   1>   returning 1 solution
   [junit4]   1>   Travel inner point [X=1.0, Y=9.103203687613759E-13, 
Z=2.2330673801246004E-12]; edgeplane=-1.0097419586828951E-28; 
travelInsidePlane=4.0389678347315804E-28; edgestartplane=0.7579267927410742; 
edgeendplane=-2.4114877353945626E-12
   [junit4]   1>  Edge added 1 to innerCrossingCount
   [junit4]   1>  Edge added 0 to outerCrossingCount
{code}

The second edge is detected as an intersection, but as you surmised, the first 
is not, even though it's properly found out of the tree.

The reason it's rejected is because of bounds; two points of intersection are 
in fact found, but apparently the bounding planes operate a bit too strenuously 
and do not permit either intersection point to remain.

It should be possible to bypass this case, however, since the case we're trying 
to catch is when an edge's endpoint is actually on the travel plane.  In that 
case, we've already got an intersection point to check.  I'll see if that 
solves this problem. 



> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to