[
https://issues.apache.org/jira/browse/LUCENE-7204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15237061#comment-15237061
]
Karl Wright commented on LUCENE-7204:
-------------------------------------
More analysis:
The only thing in the XYZSolid that intersects the world at all is the circle
described by Y=-0.5200593200323914. Our algorithm will look for an
intersection between any external edge of the polygon and this circle. If it
doesn't find such an intersection, then it concludes that the shape contains
the XYZSolid. But none of the polygon edges above are outside of the range Y=0
through Y=-0.2968103450748192, so obviously there's no intersection.
The solid's edge points listed below are correct as well, given the current
logic, but what's weird is that path.isWithin() is true for both of these,
since we already concluded that the shape didn't go anywhere near Y=-0.52:
{code}
[junit4] 2> Edge point [X=0.0, Y=-1.0011188539924791, Z=0.0]
path.isWithin()? true
[junit4] 2> Edge point [X=0.0, Y=-0.5200593200323914,
Z=-0.8525716793307343] path.isWithin()? true
[junit4] 2> path edge point [lat=0.2669499069140678,
lon=-0.31249902828113546([X=0.9186752334433793, Y=-0.2968103450748192,
Z=0.2640238502385029])] isWithin()? false minx=1.9197940874358586
maxx=-0.08244362054909982 miny=0.70430850891766 maxy=0.22324897495757223
minz=1.2617861422967118 maxz=-0.7332234954588774
[junit4] 2> all area points inside shape
{code}
If both Y=-1.0011188539924791 and the point [X=0.0, Y=-0.5200593200323914,
Z=-0.8525716793307343] is within the shape, and there are no edge
intersections, then the logic is correct to conclude it's a "contains"
situation. So the question is whether the logic is justified in concluding
both of these points are within the shape. The latter point in particular
would seem suspicious. Confirming now.
> Geo3d test failure
> ------------------
>
> Key: LUCENE-7204
> URL: https://issues.apache.org/jira/browse/LUCENE-7204
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/spatial3d
> Affects Versions: master
> Reporter: Karl Wright
> Assignee: Karl Wright
>
> Here's the failure:
> {code}
> [junit4] 1> doc=88 should not have matched but did
> [junit4] 1> point=[X=0.0038335118741108774, Y=-0.573079818081998,
> Z=0.8181033476562913]
> [junit4] 1> doc=204 should not have matched but did
> [junit4] 1> point=[X=0.06261935698392095, Y=-0.7037442799933893,
> Z=0.7068904282182165]
> [junit4] 1> doc=260 should not have matched but did
> [junit4] 1> point=[X=0.4907901530264244, Y=-0.5758499506609788,
> Z=0.653363480679368]
> [junit4] 1> doc=264 should not have matched but did
> [junit4] 1> point=[X=-0.061800745070773974, Y=-0.5326052041841663,
> Z=0.8425951029848608]
> [junit4] 1> doc=287 should not have matched but did
> [junit4] 1> point=[X=0.08818422712556362, Y=-0.614963564464081,
> Z=0.7824044277871937]
> [junit4] 1> doc=547 should not have matched but did
> [junit4] 1> point=[X=-0.04739860157482007, Y=-0.6574284839960851,
> Z=0.750985475815813]
> [junit4] 1> doc=554 should not have matched but did
> [junit4] 1> point=[X=-0.5779207585184598, Y=-0.6049825614514794,
> Z=0.5479227404361104]
> [junit4] 1> doc=847 should not have matched but did
> [junit4] 1> point=[X=0.48950343395228607, Y=-0.6406286311662371,
> Z=0.5914916803363882]
> [junit4] 1> doc=854 should not have matched but did
> [junit4] 1> point=[X=3.042457161835612E-4, Y=-0.7128650494052442,
> Z=0.7005389695059573]
> [junit4] 1> doc=907 should not have matched but did
> [junit4] 1> point=[X=-0.18691746426020325, Y=-0.6887854957245693,
> Z=0.6996969822802096]
> [junit4] 1> doc=1094 should not have matched but did
> [junit4] 1> point=[X=0.24447941208949003, Y=-0.7129089791613828,
> Z=0.6567516017564152]
> [junit4] 1> doc=1096 should not have matched but did
> [junit4] 1> point=[X=0.07576694938258999, Y=-0.7384703771772976,
> Z=0.6694322939400529]
> [junit4] 1> doc=1192 should not have matched but did
> [junit4] 1> point=[X=0.36909002466675517, Y=-0.542817605169824,
> Z=0.7533496242201582]
> [junit4] 1> doc=1268 should not have matched but did
> [junit4] 1> point=[X=0.3890280101830621, Y=-0.5810079873616575,
> Z=0.7140654641512392]
> [junit4] 1> doc=1324 should not have matched but did
> [junit4] 1> point=[X=0.19309742942422353, Y=-0.5212802964477496,
> Z=0.8298063161802797]
> [junit4] 1> doc=1435 should not have matched but did
> [junit4] 1> point=[X=-0.23456167467604777, Y=-0.690411120935381,
> Z=0.6836682010255007]
> [junit4] 1> doc=1457 should not have matched but did
> [junit4] 1> point=[X=-0.2700839398927264, Y=-0.71866306815227,
> Z=0.6403541724008389]
> [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestGeo3DPoint
> -Dtests.method=testGeo3DRelations -Dtests.seed=3B0F8F9FC5B270DA
> -Dtests.slow=true -Dtests.locale=th-TH -Dtests.timezone=Japan
> -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
> [junit4] FAILURE 0.45s | TestGeo3DPoint.testGeo3DRelations <<<
> [junit4] > Throwable #1: java.lang.AssertionError: invalid hits for
> shape=GeoCompositeMembershipShape: {[GeoConvexPolygon:
> {planetmodel=PlanetModel.WGS84, points=[[lat=0.2669499069140678,
> lon=-0.31249902828113546([X=0.9186752334433793, Y=-0.2968103450748192,
> Z=0.2640238502385029])], [lat=1.538559019421765,
> lon=0.0([X=0.03215971057004023, Y=0.0, Z=0.9972473454662941])],
> [lat=-0.5516194571595735, lon=0.0([X=0.8518418310766115, Y=0.0,
> Z=-0.5241686363384119])]], internalEdges={2}}, GeoConvexPolygon:
> {planetmodel=PlanetModel.WGS84, points=[[lat=0.0,
> lon=-3.141592653589793([X=-1.0011188539924791, Y=-1.226017000107956E-16,
> Z=0.0])], [lat=-1.5707963267948966,
> lon=-2.2780601241431375([X=-3.9697069088211677E-17, Y=-4.644115432258393E-17,
> Z=-0.997762292022105])], [lat=0.2669499069140678,
> lon=-0.31249902828113546([X=0.9186752334433793, Y=-0.2968103450748192,
> Z=0.2640238502385029])]], internalEdges={2}}, GeoConvexPolygon:
> {planetmodel=PlanetModel.WGS84, points=[[lat=0.2669499069140678,
> lon=-0.31249902828113546([X=0.9186752334433793, Y=-0.2968103450748192,
> Z=0.2640238502385029])], [lat=-0.5516194571595735,
> lon=0.0([X=0.8518418310766115, Y=0.0, Z=-0.5241686363384119])], [lat=0.0,
> lon=-3.141592653589793([X=-1.0011188539924791, Y=-1.226017000107956E-16,
> Z=0.0])]], internalEdges={0, 2}}]}
> [junit4] > at
> __randomizedtesting.SeedInfo.seed([3B0F8F9FC5B270DA:8B70F20B4AFFDE46]:0)
> [junit4] > at
> org.apache.lucene.spatial3d.TestGeo3DPoint.testGeo3DRelations(TestGeo3DPoint.java:434)
> [junit4] > at java.lang.Thread.run(Thread.java:745)
> [junit4] 2> NOTE: test params are: codec=Asserting(Lucene60): {},
> docValues:{}, maxPointsInLeafNode=812, maxMBSortInHeap=4.018189025913436,
> sim=RandomSimilarity(queryNorm=true,coord=no): {}, locale=th-TH,
> timezone=Japan
> [junit4] 2> NOTE: Windows 7 6.1 amd64/Oracle Corporation 1.8.0_45
> (64-bit)/cpus=4,threads=1,free=103491752,total=128974848
> [junit4] 2> NOTE: All tests run in this JVM: [TestGeo3DPoint]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]