[
https://issues.apache.org/jira/browse/LUCENE-8457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584763#comment-16584763
]
Karl Wright commented on LUCENE-8457:
-------------------------------------
The intersection computation looks like it's producing points, but they are
outside of the GeoNorthRectangle and thus being rejected:
{code}
[junit4] 1> Finding intersection bounds
[junit4] 1> Z biggest
[junit4] 1> Point1: (0.0 9.999999999999998E-13 -0.9977622920221051)
[junit4] 1> Point2: (-0.0 9.999999999999998E-13 0.9977622920221051)
[junit4] 1> Point1: (0.5684759187914333 9.999999999999998E-13
-0.8212966026816061)
[junit4] 1> Point2: (0.5684759187914333 9.999999999999998E-13
0.8212966026816061)
[junit4] 1> Point1: (-0.5684759187914333 -9.999999999999998E-13
-0.8212966026816061)
[junit4] 1> Point2: (-0.5684759187914333 -9.999999999999998E-13
0.8212966026816061)
[junit4] 1> Point1: (0.0 -9.999999999999998E-13 -0.9977622920221051)
[junit4] 1> Point2: (-0.0 -9.999999999999998E-13 0.9977622920221051)
{code}
The code adds a delta of MINIMUM_RESOLUTION to each of the two planes' D values
and computes intersections with the planet. But if the point of intersection
is outside the original shape, then the points are tossed away. Still
verifying what shape discards what point.
The overall issue is that the logic is flawed: for the intersection bounds
determination, we either accept points outside the shape, or we do things
differently and use backing planes. The former situation will lead to bounds
which are much larger than they need to be, and the latter will lead to the
need to create and use backing planes ubiquitously.
> geo3d test failure
> ------------------
>
> Key: LUCENE-8457
> URL: https://issues.apache.org/jira/browse/LUCENE-8457
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/spatial3d
> Reporter: Ignacio Vera
> Assignee: Karl Wright
> Priority: Major
> Attachments: LUCENE-8457.patch
>
>
> {code}
> [junit4] Suite: org.apache.lucene.spatial3d.TestGeo3DPoint
> [junit4] 1> doc=96 is contained by shape but is outside the returned
> XYZBounds
> [junit4] 1> unquantized=[lat=1.4812439919751819,
> lon=-3.141592653589793([X=-0.08923495159694257, Y=-1.0928129784526471E-17,
> Z=0.9937907331608504])]
> [junit4] 1> quantized=[X=-0.08923495170440254,
> Y=-2.3309121299774915E-10, Z=0.9937907329903598]
> [junit4] 1> doc=284 is contained by shape but is outside the
> returned XYZBounds
> [junit4] 1> unquantized=[lat=1.3177235852557188,
> lon=-3.141592653589793([X=-0.24987216435732065, Y=-3.060051462762141E-17,
> Z=0.9661839699711411])]
> [junit4] 1> quantized=[X=-0.24987216431220738,
> Y=-2.3309121299774915E-10, Z=0.9661839700741824]
> [junit4] 1> doc=448 is contained by shape but is outside the
> returned XYZBounds
> [junit4] 1> unquantized=[lat=1.373550879519168,
> lon=-3.141592653589793([X=-0.19555555347329456, Y=-2.3948648261655927E-17,
> Z=0.9785415796969477])]
> [junit4] 1> quantized=[X=-0.19555555342162367,
> Y=-2.3309121299774915E-10, Z=0.9785415795083489]
> [junit4] 1> doc=568 is contained by shape but is outside the
> returned XYZBounds
> [junit4] 1> unquantized=[lat=1.4147644427264174,
> lon=3.141592653589793([X=-0.15506432607243328, Y=1.8989903058654687E-17,
> Z=0.985720859148803])]
> [junit4] 1> quantized=[X=-0.15506432593490593,
> Y=2.3309121299774915E-10, Z=0.9857208592622259]
> [junit4] 1> doc=596 is contained by shape but is outside the
> returned XYZBounds
> [junit4] 1> unquantized=[lat=1.4949759718464255,
> lon=3.141592653589793([X=-0.07557968098734905, Y=9.255841440173507E-18,
> Z=0.9949148423009544])]
> [junit4] 1> quantized=[X=-0.07557968106487689,
> Y=2.3309121299774915E-10, Z=0.9949148424036222]
> [junit4] 1> doc=724 is contained by shape but is outside the
> returned XYZBounds
> [junit4] 1> unquantized=[lat=1.3420318470804882,
> lon=-3.141592653589793([X=-0.2263058688809343, Y=-2.7714475795329682E-17,
> Z=0.9719352310654573])]
> [junit4] 1> quantized=[X=-0.2263058688153078,
> Y=-2.3309121299774915E-10, Z=0.9719352309632839]
> [junit4] 1> doc=726 is contained by shape but is outside the
> returned XYZBounds
> [junit4] 1> unquantized=[lat=1.5087080502478558,
> lon=-3.141592653589793([X=-0.06191034463338769, Y=-7.581830538938776E-18,
> Z=0.995852579168158])]
> [junit4] 1> quantized=[X=-0.0619103447691941,
> Y=-2.3309121299774915E-10, Z=0.9958525790757079]
> [junit4] 1> doc=1090 is contained by shape but is outside the
> returned XYZBounds
> [junit4] 1> unquantized=[lat=1.5015273600939123,
> lon=3.141592653589793([X=-0.0690598132897715, Y=8.45738792950325E-18,
> Z=0.9953854835156319])]
> [junit4] 1> quantized=[X=-0.06905981308929354,
> Y=2.3309121299774915E-10, Z=0.9953854833983399]
> [junit4] 1> shape=GeoNorthRectangle: \{planetmodel=PlanetModel.WGS84,
> bottomlat=1.2487354264870392(71.54726966617622), leftlon=0.0(0.0),
> rightlon=3.5181789305199657E-12(2.0157680429064372E-10)}
> [junit4] 1> bounds=XYZBounds: [xmin=-1.0E-9 xmax=0.31591984670875706
> ymin=-1.0010000000000002E-9 ymax=1.0011114625449057E-9
> zmin=0.9467800037525481 zmax=0.9977622930221051]
> [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestGeo3DPoint
> -Dtests.method=testGeo3DRelations -Dtests.seed=BBEC483AC10CC8FE
> -Dtests.slow=true -Dtests.badapples=true
> -Dtests.locale=th-TH-u-nu-thai-x-lvariant-TH -Dtests.timezone=Egypt
> -Dtests.asserts=true -Dtests.file.encoding=UTF-8
> {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]