[
https://issues.apache.org/jira/browse/LUCENE-8239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16426960#comment-16426960
]
Karl Wright commented on LUCENE-8239:
-------------------------------------
This is the decision-making logging I just put in for the "outside world" test
for the failure situation:
{code}
[junit4] 1> Not on top of any testpoint planes; testPoint = [lat=0.25,
lon=0.0([X=0.968912421710645, Y=0.0, Z=0.247403959254523])]; this point =
[0.999999999999995,9.999999999999982E-8,0.0]
[junit4] 1> XIntersectionY point: travel distance: tpDelta1 =
-0.03108757828935005; tpDelta2 = 0.24740385929449488; cpDelta1 =
9.999999999999982E-8; cpDelta2 = -9.996002811937585E-8; newDistance =
0.062175107117726676
[junit4] 1> XIntersectionY point: travel distance: tpDelta1 =
-0.03108757828935005; tpDelta2 = 0.2474040592145511; cpDelta1 =
9.999999999999982E-8; cpDelta2 = 9.996002811937585E-8; newDistance =
0.06217520603975357
[junit4] 1> YIntersectionX point: travel distance: tpDelta1 =
-9.999999999999982E-8; tpDelta2 = 0.494807918509025; cpDelta1 =
0.03108757828935005; cpDelta2 = 0.247403959254502; newDistance =
0.30701003279794364
[junit4] 1> YIntersectionX point: travel distance: tpDelta1 =
-9.999999999999982E-8; tpDelta2 = 2.098321516541546E-14; cpDelta1 =
0.03108757828935005; cpDelta2 = -0.247403959254502; newDistance =
0.062175156578709756
[junit4] 1> YIntersectionZ point: travel distance: tpDelta1 =
5.329070518200751E-15; tpDelta2 = -9.999999999999982E-8; cpDelta1 =
0.031087578289355378; cpDelta2 = -0.247403959254523; newDistance =
0.06217515657872048
[junit4] 1> YIntersectionZ point: travel distance: tpDelta1 =
1.9378248434212846; tpDelta2 = -9.999999999999982E-8; cpDelta1 =
1.9689124217106346; cpDelta2 = -0.247403959254523; newDistance =
7.692989967201986
[junit4] 1> ZIntersectionX point: travel distance: tpDelta1 =
-0.24740395925452222; tpDelta2 = 0.247403959254523; cpDelta1 =
-0.2474038592545222; cpDelta2 = 0.03108757828935005; newDistance =
0.18459254520755486
[junit4] 1> ZIntersectionX point: travel distance: tpDelta1 =
0.24740395925452222; tpDelta2 = 0.247403959254523; cpDelta1 =
0.24740405925452222; cpDelta2 = 0.03108757828935005; newDistance =
0.18459264416913856
[junit4] 1> ZIntersectionY point: travel distance: tpDelta1 =
1.968912421710645; tpDelta2 = 0.247403959254523; cpDelta1 =
9.999999999999982E-8; cpDelta2 = 1.9999999999999951; newDistance =
7.937824843421281
[junit4] 1> ZIntersectionY point: travel distance: tpDelta1 =
-0.031087578289355045; tpDelta2 = 0.247403959254523; cpDelta1 =
9.999999999999982E-8; cpDelta2 = -4.9960036108132044E-15; newDistance =
0.062175156578720456
[junit4] ERROR 0.13s | GeoPolygonTest.testComplexPolygonPlaneOutsideWorld
<<<
[junit4] > Throwable #1: java.lang.IllegalArgumentException: No off-plane
intersection points were found; can't compute traversal
[junit4] > at
org.apache.lucene.spatial3d.geom.GeoComplexPolygon$DualCrossingEdgeIterator.pickProximate(GeoComplexPolygon.java:1118)
[junit4] > at
org.apache.lucene.spatial3d.geom.GeoComplexPolygon$DualCrossingEdgeIterator.computeInsideOutside(GeoComplexPolygon.java:1098)
[junit4] > at
org.apache.lucene.spatial3d.geom.GeoComplexPolygon$DualCrossingEdgeIterator.matches(GeoComplexPolygon.java:1171)
[junit4] > at
org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Node.traverse(GeoComplexPolygon.java:586)
[junit4] > at
org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Tree.traverse(GeoComplexPolygon.java:682)
[junit4] > at
org.apache.lucene.spatial3d.geom.GeoComplexPolygon$Tree.traverse(GeoComplexPolygon.java:668)
[junit4] > at
org.apache.lucene.spatial3d.geom.GeoComplexPolygon.isWithin(GeoComplexPolygon.java:379)
[junit4] > at
org.apache.lucene.spatial3d.geom.GeoBaseMembershipShape.isWithin(GeoBaseMembershipShape.java:36)
[junit4] > at
org.apache.lucene.spatial3d.geom.GeoPolygonTest.testComplexPolygonPlaneOutsideWorld(GeoPolygonTest.java:1451)
{code}
The travel in each plane is never less than about 1e-8, so there's no numerical
issue with the decision-making logic. So I agree that we will need to also
consider whether the test point or check point is at a pole as part of making
the decision as to which route we can take.
> 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]