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

Karl Wright commented on LUCENE-8337:
-------------------------------------

I think I understand the problem -- it has to do with picking a bad path once 
again.  Here's debugging output for the edge where a crossing should be 
detected (I think):

{code}
   [junit4]   1>  Edge [[lat=1.4379241972924144E-5, 
lon=-3.141520309370815([X=-1.0011188512685139, Y=-7.24251615257059E-5, 
Z=1.4395330244708275E-5])] --> [lat=-1.858900171939205E-5, 
lon=-3.1415059739464217([X=-1.001118850057461, Y=-8.677662511280753E-5, 
Z=-1.860980009708855E-5])]] potentially crosses travel plane [A=1.0, B=0.0; 
C=0.0; D=1.0011188509002849]
   [junit4]   1>   Finding intersections between edge plane and travel plane...
   [junit4]   1>   There were intersection points!
   [junit4]   1>   Getting above crossings...
   [junit4]   1>    Envelope intersection point = [X=-1.0011188509012852, 
Y=-7.86721312086303E-5, Z=2.870854372572661E-8]
   [junit4]   1>      Adjoining points not found.  Are planes parallel?  edge = 
[A=7.207753470315688E-5, B=-0.9170557581136873; C=0.3987589890088486; D=0.0]; 
envelope = [A=1.0, B=0.0; C=0.0; D=1.0011188509012852]; perpendicular = 
[X=3.130986100560408E-5, Y=-0.39875898777965174, Z=-0.9170557609462142]
   [junit4]   1>     No adjoining points
   [junit4]   1>    Edge crosses envelope 1 times
   [junit4]   1>   Getting below crossings...
   [junit4]   1>   Above crossings = 1; below crossings = 0
{code}

Note that the "above" envelope intersection point is way out at the negative X 
pole, and the "above" envelope plane equation is: A=1.0, B=0.0; C=0.0; 
D=1.0011188509012852 .  This is so far out that the adjoining points algorithm 
can't locate any adjoining points even though the edge plane and the envelope 
plane are not parallel, not even close.  The algorithm still detects it as a 
crossing, which is OK, but not for the "below" envelope plane, which apparently 
doesn't intersect the edge plane at all, possibly because it doesn't even 
intersect the world.

So it appears that the problem here is once again a poor choice of path.


> Reproducing Geo3D test failure
> ------------------------------
>
>                 Key: LUCENE-8337
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8337
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial3d
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>            Priority: Major
>
> {code}
>    [junit4] Suite: org.apache.lucene.spatial3d.geom.RandomGeoPolygonTest
>    [junit4]   2> NOTE: reproduce with: ant test  
> -Dtestcase=RandomGeoPolygonTest -Dtests.method=testCompareSmallPolygons 
> -Dtests.seed=6369EE055A678918 -Dtests.slow=true -Dtests.locale=es-BO 
> -Dtests.timezone=Europe/Jersey -Dtests.asserts=true 
> -Dtests.file.encoding=UTF-8
>    [junit4] FAILURE 0.03s J0 | RandomGeoPolygonTest.testCompareSmallPolygons 
> {seed=[6369EE055A678918:B5D2F4B1CA30632A]} <<<
>    [junit4]    > Throwable #1: java.lang.AssertionError: 
>    [junit4]    > Standard polygon: GeoCompositePolygon: {[GeoConvexPolygon: 
> {planetmodel=PlanetModel.WGS84, points=[[lat=1.4379241972924144E-5, 
> lon=-3.141520309370815([X=-1.0011188512685139, Y=-7.24251615257059E-5, 
> Z=1.4395330244708275E-5])], [lat=-1.858900171939205E-5, 
> lon=-3.1415059739464217([X=-1.001118850057461, Y=-8.677662511280753E-5, 
> Z=-1.860980009708855E-5])], [lat=2.7071641284581073E-5, 
> lon=-3.141469177092562([X=-1.001118845991408, Y=-1.2361464904363391E-4, 
> Z=2.7101930495137982E-5])], [lat=8.285235549000288E-5, 
> lon=-3.1414967545451287([X=-1.0011188459297669, Y=-9.600634121467467E-5, 
> Z=8.29450550819143E-5])]], internalEdges={3}}, GeoConvexPolygon: 
> {planetmodel=PlanetModel.WGS84, points=[[lat=1.4379241972924144E-5, 
> lon=-3.141520309370815([X=-1.0011188512685139, Y=-7.24251615257059E-5, 
> Z=1.4395330244708275E-5])], [lat=8.285235549000288E-5, 
> lon=-3.1414967545451287([X=-1.0011188459297669, Y=-9.600634121467467E-5, 
> Z=8.29450550819143E-5])], [lat=-8.956596846349593E-303, 
> lon=-3.1415926535897922([X=-1.0011188539924791, Y=-1.0117738616818362E-15, 
> Z=-8.966617970490158E-303])]], internalEdges={0}}]}
>    [junit4]    > Large polygon: GeoComplexPolygon: 
> {planetmodel=PlanetModel.WGS84, number of shapes=1, address=c865f21d, 
> testPoint=[lat=2.114284741800425E-5, 
> lon=-3.141516973708951([X=-1.0011188509002849, Y=-7.57645554894811E-5, 
> Z=2.1166503175641402E-5])], testPointInSet=true, shapes={ 
> {[lat=1.4379241972924144E-5, lon=-3.141520309370815([X=-1.0011188512685139, 
> Y=-7.24251615257059E-5, Z=1.4395330244708275E-5])], 
> [lat=-1.858900171939205E-5, lon=-3.1415059739464217([X=-1.001118850057461, 
> Y=-8.677662511280753E-5, Z=-1.860980009708855E-5])], 
> [lat=2.7071641284581073E-5, lon=-3.141469177092562([X=-1.001118845991408, 
> Y=-1.2361464904363391E-4, Z=2.7101930495137982E-5])], 
> [lat=8.285235549000288E-5, lon=-3.1414967545451287([X=-1.0011188459297669, 
> Y=-9.600634121467467E-5, Z=8.29450550819143E-5])], 
> [lat=-8.956596846349593E-303, lon=-3.1415926535897922([X=-1.0011188539924791, 
> Y=-1.0117738616818362E-15, Z=-8.966617970490158E-303])]}}
>    [junit4]    > Point: [lat=-6.499661194605612E-10, 
> lon=-2.0286460544410216([X=-0.4425148814082194, Y=-0.8980086522698344, 
> Z=-6.506933366482957E-10])]
>    [junit4]    > WKT: POLYGON((-179.9950336222651 
> -0.001065071343882595,-179.9929253178396 
> 0.001551090790098614,-179.9945053894814 
> 0.004747090292294721,-179.99999999999994 
> -5.131751980960148E-301,-179.99585498158038 
> 8.238698776459206E-4,-179.9950336222651 -0.001065071343882595))
>    [junit4]    > WKT: POINT(-116.23285704533717 -3.7240315471586036E-8)
>    [junit4]    > normal polygon: false
>    [junit4]    > large polygon: true
>    [junit4]    >        at 
> __randomizedtesting.SeedInfo.seed([6369EE055A678918:B5D2F4B1CA30632A]:0)
>    [junit4]    >        at 
> org.apache.lucene.spatial3d.geom.RandomGeoPolygonTest.checkPoint(RandomGeoPolygonTest.java:227)
>    [junit4]    >        at 
> org.apache.lucene.spatial3d.geom.RandomGeoPolygonTest.testComparePolygons(RandomGeoPolygonTest.java:202)
>    [junit4]    >        at 
> org.apache.lucene.spatial3d.geom.RandomGeoPolygonTest.testCompareSmallPolygons(RandomGeoPolygonTest.java:109)
>    [junit4]    >        at java.lang.Thread.run(Thread.java:748)
>    [junit4]   2> NOTE: test params are: codec=Lucene70, 
> sim=Asserting(org.apache.lucene.search.similarities.AssertingSimilarity@735f0010),
>  locale=es-BO, timezone=Europe/Jersey
>    [junit4]   2> NOTE: SunOS 5.11 amd64/Oracle Corporation 1.8.0_172 
> (64-bit)/cpus=3,threads=1,free=256153464,total=524288000
>    [junit4]   2> NOTE: All tests run in this JVM: [TestGeo3DDocValues, 
> GeoCircleTest, GeoExactCircleTest, GeoPolygonTest, RandomBinaryCodecTest, 
> RandomGeoPolygonTest]
> {code}



--
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