[
https://issues.apache.org/jira/browse/LUCENE-8457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584685#comment-16584685
]
Karl Wright commented on LUCENE-8457:
-------------------------------------
Analysis:
Left and right planes are pretty near identical, but not quite, so the shape is
a very narrow one that probably has some in-set points on the planet that are
directly opposite the narrow wedge that is created. These should, however, be
captured with the bounds computations.
The basic Lagrangian bounds computation is coming up with decent bounding
points, but they're getting thrown away because they're not within the
GeoNorthRectangle shape:
{code}
[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> Computing +/- X bounds for plane [A=0.0, B=0.0, C=1.0,
D=-0.9467800047525483, side=1.0]
[junit4] 1> add points [X=-0.31591984570875703, Y=0.0,
Z=0.9467800047525481] and [X=0.31591984570875703, Y=0.0, Z=0.9467800047525481]
[junit4] 1> Computing +/- X bounds for plane [A=0.0, B=-1.0, C=0.0, D=0.0,
side=-1.0]
[junit4] 1> add points [X=-1.0011188539924791, Y=-0.0, Z=0.0] and
[X=1.0011188539924791, Y=0.0, Z=-0.0]
[junit4] 1> Computing +/- X bounds for plane [A=3.5181789305199657E-12,
B=-1.0, C=0.0, D=0.0, side=1.0]
[junit4] 1> add points [X=-1.0011188539924791, Y=-3.522115259062634E-12,
Z=0.0] and [X=1.0011188539924791, Y=3.522115259062634E-12, Z=-0.0]
[junit4] 1> solid = StandardXYZSolid: {planetmodel=PlanetModel.WGS84,
isWholeWorld=false, minXplane=[A=1.0, B=0.0, C=0.0, D=1.0E-9, side=1.0],
maxXplane=[A=1.0, B=0.0, C=0.0, D=-0.31591984670875706, side=-1.0],
minYplane=[A=0.0, B=1.0, C=0.0, D=1.0010000000000002E-9, side=1.0],
maxYplane=[A=0.0, B=1.0, C=0.0, D=-1.0011114625449057E-9, side=-1.0],
minZplane=[A=0.0, B=0.0, C=1.0, D=-0.9467800037525481, side=1.0],
maxZplane=[A=0.0, B=0.0, C=1.0, D=-0.9977622930221051, side=-1.0]}
{code}
The intersection bounds computation also needs to be considered in this case
because it's designed to capture points on the antipodes. For some reason
that's not capturing the antipodes in this case in the bounds. Figuring out
why would be the next step.
An alternative would be to finally go ahead and install backing planes for all
shapes that had the potential to be very narrow. That would meet user
expectations better but there's a severe price: the propagation of backing
planes to many geo3d shapes that currently don't compute them.
> 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]