[ https://issues.apache.org/jira/browse/LUCENE-7316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15316639#comment-15316639 ]
Karl Wright commented on LUCENE-7316: ------------------------------------- Looks like this is a problem because of minimum resolution. Here's some debugging output: {code} [junit4] 1> Looking for coplanar points for: [[lat=0.0425265613312593, lon=0.0([X=1.0002076326868337, Y=0.0, Z=0.042561051669501374])], [lat=0.0, lon=-1.7156310907312492E-12([X=1.0011188539924791, Y=-1.7175506314267352E-12, Z=0.0])], [lat=-0.7766317703682181, lon=3.141592653589793([X=-0.7128972529667801, Y=8.730473389667082E-17, Z=-0.7005064828988063])]] [junit4] 1> planeToFind.evaluate(start) = 0.0 [junit4] 1> planeToFind.evaluate(end) = 0.0 [junit4] 1> failing because planeToFind = [A=1.7156310907312492E-12, B=1.0; C=-4.031825447240733E-11; D=0.0] doesn't contain [lat=-0.7766317703682181, lon=3.141592653589793([X=-0.7128972529667801, Y=8.730473389667082E-17, Z=-0.7005064828988063])]; off by 2.7020217250132315E-11 [junit4] 1> planeToFind.evaluate(start) = 0.0 [junit4] 1> planeToFind.evaluate(end) = -2.0194839173657902E-28 [junit4] 1> failing because planeToFind = [A=1.7156310907312492E-12, B=1.0; C=-1.7458530603341764E-12; D=0.0] doesn't contain [lat=0.0425265613312593, lon=0.0([X=1.0002076326868337, Y=0.0, Z=0.042561051669501374])]; off by 1.6416819695159931E-12 [junit4] 1> planeToFind.evaluate(start) = 0.0 [junit4] 1> planeToFind.evaluate(end) = -7.703719777548943E-34 [junit4] 1> failing because planeToFind = [A=5.543375111216114E-18, B=-1.0; C=-1.3027230013345064E-16; D=0.0] doesn't contain [lat=0.0, lon=-1.7156310907312492E-12([X=1.0011188539924791, Y=-1.7175506314267352E-12, Z=0.0])]; off by 1.7175561810040737E-12 [junit4] 1> ... not coplanar {code} Note that the amount it is "off" by is just larger than Vector.MINIMUM_RESOLUTION (1e-12). The triangle is therefore barely not degenerate, but it is close enough to degenerate to make plane sidedness not work well in determining inclusion of a given point. I solved a similar problem for GeoBBox shapes by computing the bounds of intersections as well as of edges and points. The only other solution is to create a pair of cutoff planes for each edge of the polygon. That would be a more accurate solution that we might want to adopt in the future, since acute angles between planes otherwise will allow quite a bit of "leakage" of places that shouldn't legitimately be "in set", but are, due to the MINIMUM_RESOLUTION value. > Geo3d test failure > ------------------ > > Key: LUCENE-7316 > URL: https://issues.apache.org/jira/browse/LUCENE-7316 > Project: Lucene - Core > Issue Type: Bug > Components: modules/spatial3d > Affects Versions: master (7.0) > Reporter: Karl Wright > Assignee: Karl Wright > Attachments: LUCENE-7316.patch > > > Reproducible on master with: > {code} > ant test -Dtestcase=TestGeo3DPoint -Dtests.method=testGeo3DRelations > -Dtests.seed=EEA08DD7FAE3C688 -Dtests.multiplier=2 -Dtests.slow=true > -Dtests.directory=MMapDirectory -Dtests.locale=es > -Dtests.timezone=America/Manaus -Dtests.asserts=true > -Dtests.file.encoding=UTF-8 > {code} > Note: I was initially unable to reproduce this, until I pulled up code that > [~mikemccand] recently committed. It seems possible that encoding/decoding > changes are triggering it. Of specific concern is the new way > maximum/minimum decoded values are computed. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org