lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-7970) Add a Geo3d shape that models an exact circle, even when the planet model is not a sphere
Date Sat, 23 Sep 2017 00:29:02 GMT

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

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

I also had another look at the logic in the proposed "complex circle".  The real problem I
see is the intersects() methods.  The code in the patch does not actually reliably determine
intersection of a plane and an exact circle within the specified bounds, and that's in fact
rather hard.  Computing the distance from the plane to the center of the circle isn't going
to work.  

You could do this with a lagrangian multiplier, but the problem with that is that the Vincenty
formula is iterative and is thus not describable as a differentiable function.

That means that instead of an analytic solution, an iterative numeric solution will be needed
that finds the intersection of the exact circle edge on the surface of the ellipsoid with
the given plane.  Coming up with such a thing will require a far more in-depth understanding
of the Vincenty algorithm than I have at this time.  Maybe an idea will come to me but so
far I am not so inspired.

> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message