[
https://issues.apache.org/jira/browse/LUCENE-7221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15242266#comment-15242266
]
Karl Wright commented on LUCENE-7221:
-------------------------------------
Turns out this code uncovers a bug in bounds computation for polygons.
Reproduce with:
{code}
ant test -Dtestcase=TestGeo3DPoint -Dtests.method=testRandomMedium
-Dtests.seed=96181AB6D0236473 -Dtests.slow=true -Dtests.locale=es-AR
-Dtests.timezone=Africa/Bangui -Dtests.asserts=true -Dtests.file.encoding=UTF-8
{code}
The shape is:
{code}
[junit4] > shape=GeoCompositeMembershipShape: {[GeoConvexPolygon:
{planetmodel=PlanetModel.WGS84, points=[[lat=-0.3223407132800339,
lon=2.6278324620407245([X=-0.8266928846353055, Y=0.46650761662052037,
Z=-0.3170348306189759])], [lat=0.01301880911291212,
lon=0.7283615633492176([X=0.7470372494410034, Y=0.6663357291352862,
Z=0.013032999649579735])], [lat=0.061052074724583294,
lon=0.3894227057058894([X=0.9244263390490473, Y=0.37936630074905675,
Z=0.061081654345083204])]], internalEdges={1, 2},
holes=[GeoCompositeMembershipShape: {[GeoConvexPolygon:
{planetmodel=PlanetModel.WGS84, points=[[lat=0.4239436021336153,
lon=3.0050433500742275([X=-0.9034847363399677, Y=0.1241427489569449,
Z=0.41158375834364846])], [lat=-0.14253519387124003,
lon=1.1917661574944194([X=0.3666521639791506, Y=0.9205690456389853,
Z=-0.14220232046957249])], [lat=0.10351507181685156,
lon=2.5661648321528787([X=-0.8353722856562604, Y=0.5418668676051542,
Z=0.10344219359741076])]], internalEdges={2}, holes=[]}, GeoConvexPolygon:
{planetmodel=PlanetModel.WGS84, points=[[lat=0.4239436021336153,
lon=3.0050433500742275([X=-0.9034847363399677, Y=0.1241427489569449,
Z=0.41158375834364846])], [lat=0.10351507181685156,
lon=2.5661648321528787([X=-0.8353722856562604, Y=0.5418668676051542,
Z=0.10344219359741076])], [lat=-0.2405959750069592,
lon=2.669431717325145([X=-0.8657373000645269, Y=0.4421211394988106,
Z=-0.23850245173617218])]], internalEdges={0}, holes=[]}]}]},
GeoConcavePolygon: {planetmodel=PlanetModel.WGS84,
points=[[lat=0.061052074724583294,
lon=0.3894227057058894([X=0.9244263390490473, Y=0.37936630074905675,
Z=0.061081654345083204])], [lat=-0.3223407132800339,
lon=2.6278324620407245([X=-0.8266928846353055, Y=0.46650761662052037,
Z=-0.3170348306189759])], [lat=1.0911716284952522,
lon=-2.236440690307192([X=-0.28453872918027256, Y=-0.36238247637599824,
Z=0.8858145117278357])]], internalEdges={0},
holes=[GeoCompositeMembershipShape: {[GeoConvexPolygon:
{planetmodel=PlanetModel.WGS84, points=[[lat=0.4239436021336153,
lon=3.0050433500742275([X=-0.9034847363399677, Y=0.1241427489569449,
Z=0.41158375834364846])], [lat=-0.14253519387124003,
lon=1.1917661574944194([X=0.3666521639791506, Y=0.9205690456389853,
Z=-0.14220232046957249])], [lat=0.10351507181685156,
lon=2.5661648321528787([X=-0.8353722856562604, Y=0.5418668676051542,
Z=0.10344219359741076])]], internalEdges={2}, holes=[]}, GeoConvexPolygon:
{planetmodel=PlanetModel.WGS84, points=[[lat=0.4239436021336153,
lon=3.0050433500742275([X=-0.9034847363399677, Y=0.1241427489569449,
Z=0.41158375834364846])], [lat=0.10351507181685156,
lon=2.5661648321528787([X=-0.8353722856562604, Y=0.5418668676051542,
Z=0.10344219359741076])], [lat=-0.2405959750069592,
lon=2.669431717325145([X=-0.8657373000645269, Y=0.4421211394988106,
Z=-0.23850245173617218])]], internalEdges={0}, holes=[]}]}]},
GeoConcavePolygon: {planetmodel=PlanetModel.WGS84,
points=[[lat=0.061052074724583294,
lon=0.3894227057058894([X=0.9244263390490473, Y=0.37936630074905675,
Z=0.061081654345083204])], [lat=0.01301880911291212,
lon=0.7283615633492176([X=0.7470372494410034, Y=0.6663357291352862,
Z=0.013032999649579735])], [lat=-0.033592961905519345,
lon=1.038407790034418([X=0.5078720357813785, Y=0.862071201120426,
Z=-0.03362409479423826])]], internalEdges={0},
holes=[GeoCompositeMembershipShape: {[GeoConvexPolygon:
{planetmodel=PlanetModel.WGS84, points=[[lat=0.4239436021336153,
lon=3.0050433500742275([X=-0.9034847363399677, Y=0.1241427489569449,
Z=0.41158375834364846])], [lat=-0.14253519387124003,
lon=1.1917661574944194([X=0.3666521639791506, Y=0.9205690456389853,
Z=-0.14220232046957249])], [lat=0.10351507181685156,
lon=2.5661648321528787([X=-0.8353722856562604, Y=0.5418668676051542,
Z=0.10344219359741076])]], internalEdges={2}, holes=[]}, GeoConvexPolygon:
{planetmodel=PlanetModel.WGS84, points=[[lat=0.4239436021336153,
lon=3.0050433500742275([X=-0.9034847363399677, Y=0.1241427489569449,
Z=0.41158375834364846])], [lat=0.10351507181685156,
lon=2.5661648321528787([X=-0.8353722856562604, Y=0.5418668676051542,
Z=0.10344219359741076])], [lat=-0.2405959750069592,
lon=2.669431717325145([X=-0.8657373000645269, Y=0.4421211394988106,
Z=-0.23850245173617218])]], internalEdges={0}, holes=[]}]}]}]}
{code}
The computed bounds are:
{code}
[junit4] 1> For docID 567, x=0.07978638431240402 y=0.9870320611411413
z=0.14661490892355114; shape minX=-1.0011188540024791 maxX=1.0011188540024791
minY=-1.0011188540024791 maxY=0.9723375662805899 minZ=-0.9977622920321051
maxZ=0.9977622920321051
{code}
The document is in the shape, and should be in the bounds, but is not in the
bounds. Looking into this now.
> Improve Geo3d BKD search performance for large polygons
> -------------------------------------------------------
>
> Key: LUCENE-7221
> URL: https://issues.apache.org/jira/browse/LUCENE-7221
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/spatial3d
> Affects Versions: master
> Reporter: Karl Wright
> Assignee: Karl Wright
> Attachments: LUCENE-7221.patch
>
>
> Geo3d polygon BKD search performance is very slow for large polygons. We
> need to improve it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]