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

Ignacio Vera commented on LUCENE-8239:
--------------------------------------

There are two cases in the Patch:

1) Plane outside of the world: The check point is near a pole and one of the 
travel planes chosen is the plane (almost) tangent to the world. The problem is 
on method {{computeInsideOutside}} in the {{DualCrossingEdgeIterator }}
{code:java}
// Get the outside-outside intersection point
final GeoPoint[] outsideOutsidePoints = 
testPointOutsidePlane.findIntersections(planetModel, travelOutsidePlane);  
//these don't add anything: , checkPointCutoffPlane, testPointCutoffPlane);
final GeoPoint outsideOutsidePoint = pickProximate(outsideOutsidePoints);{code}
The travelOutsidePlane is actually outside of the world because travelPlane is 
tangent and it cannot find any intersections. The method pickProximate throws 
the following error:
{code:java}
if (points.length == 0) {
  throw new IllegalArgumentException("No off-plane intersection points were 
found; can't compute traversal");
}{code}
 

2) Degenerated vector: The test point is in one pole and checkpoint is near the 
pole but not identical. The {{SectorLinearCrossingEdgeIterator}} tries to build 
a plane with those two vectors essentially and throws an error as they are 
almost parallel. In {{FullLinearCrossingEdgeIterator}} ocurrs the same.

 

 

> 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