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

Karl Wright commented on LUCENE-8239:
-------------------------------------

Ok, that choice isn't causing the issue.  

The selection logic winds up picking a path based on deltas that are all not 
infitesimal.   So we have the following situation: the intersection point is 
somehow at least 1e-8 from the test or check point, and yet the intersection of 
the above planes or below planes does not intersect the planet.

So, as you originally proposed, you can check explicitly for the case where the 
test point or check point is right on the pole.  I don't think, however, that 
that's a safe check for this condition.  What you want is a check for whether 
the above plane or below plane intersects the world at all.  Luckily, once the 
normalized above/below planes are constructed, the check is easy: just look at 
the D value and compare against the appropriate min/max x/y/z.  If the plane 
fails the test, then you can't expect to travel in it.

Unfortunately, as a performance optimization, we don't construct the 
above/below travel planes right now at the time we need them to make this kind 
of decision -- we wait until we have a crossing to analyze first.  I'll 
therefore need to restructure things to make that possible.  But that cannot 
happen today -- it will have to wait.


> GeoComplexPolygon fails when test or/and check point are near a pole
> --------------------------------------------------------------------
>
>                 Key: LUCENE-8239
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8239
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial3d
>            Reporter: Ignacio Vera
>            Priority: Major
>         Attachments: LUCENE-8239.patch
>
>
> When calling {{within}} method in GeoComplexPolygon you can get errors if the 
> test point of the polygon or the given point is near a pole.
> The reason is that one of the planes defined by these points is tangent to 
> the world therefore intersection with the above plane fails. We should 
> prevent navigating those planes ( we should not even construct them).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to