[
https://issues.apache.org/jira/browse/LUCENE-7290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15290777#comment-15290777
]
Karl Wright commented on LUCENE-7290:
-------------------------------------
A simple test shows that Geo3D is working just fine. This passes:
{code}
@Test
public void testFailureCase1() {
final GeoPoint point = new GeoPoint(-0.01741337087280333,
2.3309114714909325E-10, 0.9976113452615002);
final GeoBBox box = new GeoNorthRectangle(PlanetModel.WGS84,
0.35451471030934045, 9.908337057950734E-15, 2.891004593509811E-11);
final XYZBounds bounds = new XYZBounds();
box.getBounds(bounds);
final XYZSolid solid = XYZSolidFactory.makeXYZSolid(PlanetModel.WGS84,
bounds.getMinimumX(), bounds.getMaximumX(), bounds.getMinimumY(),
bounds.getMaximumY(), bounds.getMinimumZ(), bounds.getMaximumZ());
assertTrue(!solid.isWithin(point));
assertTrue(!box.isWithin(point));
}
{code}
And yet when shape.isWithin() is called in the relations test for the same
point, it says "yes, this point is within the shape". Not quite sure how to
resolve the discrepancy; looking deeper.
> geo3d test failure
> ------------------
>
> Key: LUCENE-7290
> URL: https://issues.apache.org/jira/browse/LUCENE-7290
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/spatial3d
> Reporter: Karl Wright
> Assignee: Karl Wright
> Fix For: 6.1, master (7.0)
>
>
> {code}
> Error Message:
> invalid hits for shape=GeoNorthRectangle: {planetmodel=PlanetModel.WGS84,
> bottomlat=0.35451471030934045(20.312196676028226),
> leftlon=9.908337057950734E-15(5.677058954136481E-13),
> rightlon=2.891004593509811E-11(1.6564236176104631E-9)}
> Stack Trace:
> java.lang.AssertionError: invalid hits for shape=GeoNorthRectangle:
> {planetmodel=PlanetModel.WGS84,
> bottomlat=0.35451471030934045(20.312196676028226),
> leftlon=9.908337057950734E-15(5.677058954136481E-13),
> rightlon=2.891004593509811E-11(1.6564236176104631E-9)}
> at
> __randomizedtesting.SeedInfo.seed([1D5C0D197B0122B4:AD23708DF44C8C28]:0)
> at org.junit.Assert.fail(Assert.java:93)
> at
> org.apache.lucene.spatial3d.TestGeo3DPoint.testGeo3DRelations(TestGeo3DPoint.java:440)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1764)
> ...
> {code}
> and
> {code}
> Build Log:
> [...truncated 8902 lines...]
> [junit4] Suite: org.apache.lucene.spatial3d.TestGeo3DPoint
> [junit4] 1> doc=3174 should match but did not
> [junit4] 1> point=[X=-0.01741337087280333, Y=-2.3309114714909325E-10,
> Z=0.9976113452615002]
> [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestGeo3DPoint
> -Dtests.method=testGeo3DRelations -Dtests.seed=1D5C0D197B0122B4
> -Dtests.multiplier=3 -Dtests.slow=true -Dtests.locale=lt
> -Dtests.timezone=Europe/Kiev -Dtests.asserts=true -Dtests.file.encoding=UTF-8
> [junit4] FAILURE 7.13s J1 | TestGeo3DPoint.testGeo3DRelations <<<
> [junit4] > Throwable #1: java.lang.AssertionError: invalid hits for
> shape=GeoNorthRectangle: {planetmodel=PlanetModel.WGS84,
> bottomlat=0.35451471030934045(20.312196676028226),
> leftlon=9.908337057950734E-15(5.677058954136481E-13),
> rightlon=2.891004593509811E-11(1.6564236176104631E-9)}
> [junit4] > at
> __randomizedtesting.SeedInfo.seed([1D5C0D197B0122B4:AD23708DF44C8C28]:0)
> [junit4] > at
> org.apache.lucene.spatial3d.TestGeo3DPoint.testGeo3DRelations(TestGeo3DPoint.java:440)
> [junit4] > at java.lang.Thread.run(Thread.java:745)
> [junit4] IGNOR/A 0.01s J1 | TestGeo3DPoint.testRandomBig
> [junit4] > Assumption #1: 'nightly' test group is disabled (@Nightly())
> [junit4] 2> NOTE: test params are: codec=Lucene62,
> sim=RandomSimilarity(queryNorm=false,coord=crazy): {}, locale=lt,
> timezone=Europe/Kiev
> [junit4] 2> NOTE: Linux 4.4.0-21-generic i386/Oracle Corporation
> 1.8.0_92 (32-bit)/cpus=12,threads=1,free=43619256,total=64946176
> [junit4] 2> NOTE: All tests run in this JVM: [TestGeo3DPoint]
> [junit4] Completed [10/11 (1!)] on J1 in 74.75s, 13 tests, 1 failure, 1
> skipped <<< FAILURES!
> {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]