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

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

[~ivera] I think this is a good addition to the stable of circle 
implementations, and I like how you solve the problem in a way that's as cheap 
as possible.

I have a few things that we should discuss:

(1) For the initial computation of the inner and outer planes, I would like 
more comments that explain exactly what the math is behind the construction of 
these planes.  It's currently unclear where that came from and I think we 
really need to know it.

(2) The getBounds() method shouldn't bother being exact; it should just use the 
outer plane (if present), or the inner plane (if not present) to set the 
bounds.  Bounds are defined as possibly being larger than the shape they 
contain, so that is OK.  Also, we need to be sure xyz bounds work OK as well; 
just doing points doesn't work for XYZ bounds -- you need the planes too.  
Maybe you can just use both planes; that would be safest.

(3) We shouldn't make the class public; it should be class scoped.  Instead, 
add a factory method to GeoCircleFactory.

Thanks!!


> Improve generation of circle plane 
> -----------------------------------
>
>                 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
>
>
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to