[ 
https://issues.apache.org/jira/browse/LUCENE-7970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16177050#comment-16177050
 ] 

Karl Wright commented on LUCENE-7970:
-------------------------------------

Well, the test fails under some conditions, e.g.:

{code}
FAILED:  
org.apache.lucene.spatial3d.geom.GeoCircleTest.RandomPointBearingCardinalTest 
{seed=[E9FDB0C7D468FDF8:EAFA8E50F86DF78D]}

Error Message:
PlanetModel(ab=0.9012401636526054 c=1.3895444300878061) 8.233858039830011E-12 
2.8044786894992013

Stack Trace:
java.lang.AssertionError: PlanetModel(ab=0.9012401636526054 
c=1.3895444300878061) 8.233858039830011E-12 2.8044786894992013
        at 
__randomizedtesting.SeedInfo.seed([E9FDB0C7D468FDF8:EAFA8E50F86DF78D]:0)
        at org.junit.Assert.fail(Assert.java:93)
        at org.junit.Assert.assertTrue(Assert.java:43)
        at 
org.apache.lucene.spatial3d.geom.GeoCircleTest.checkBearingPoint(GeoCircleTest.java:454)
        at 
org.apache.lucene.spatial3d.geom.GeoCircleTest.RandomPointBearingCardinalTest(GeoCircleTest.java:446)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        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:1737)
        at 
com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:934)
        at 
com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:970)
        at 
com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:984)
        at 
org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:49)
        at 
org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
        at 
org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:48)
        at 
org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
        at 
org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
        at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
        at 
com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
        at 
com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:817)
        at 
com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:468)
        at 
com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:943)
        at 
com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:829)
        at 
com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:879)
        at 
com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:890)
        at 
org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
        at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
        at 
org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:41)
        at 
com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
        at 
com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
        at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
        at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
        at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
        at 
org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
        at 
org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
        at 
org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
        at 
org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:54)
        at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
        at 
com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
        at java.lang.Thread.run(Thread.java:748)
{code}


> Add a Geo3d shape that models an exact circle, even when the planet model is 
> not a sphere
> -----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-7970
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7970
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/spatial3d
>            Reporter: Ignacio Vera
>            Assignee: Karl Wright
>         Attachments: LUCENE_7970.patch, LUCENE-7970.patch, 
> LUCENE-7970-proposed.patch, LUCENE-7970_testBearingPoint.patch
>
>
> Hi [~Karl wright],
> How circles are currently build do not behave very well when the planet model 
> is not an sphere. when you are close to the border in WGS84 you might get 
> false positves or false negatives when checking if a point is WITHIN. I think 
> the reason is how the points to generate the circle plane are generated which 
> assumes a sphere.
> My proposal is the following:
> Add a new method to PlanetModel:  
> public GeoPoint pointOnBearing(GeoPoint from, double dist, double bearing);
> Which uses and algorithm that takes into account that the planet might not be 
> spherical. For example Vincenty's formulae 
> (https://en.wikipedia.org/wiki/Vincenty%27s_formulae).
> Use this method to generate the points for the circle plane. My experiments 
> shows that this approach removes false negatives in WGS84 meanwhile it works 
> nicely in the Sphere.
> Does it make sense?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to