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

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

[~ivera], I looked at the problem and realized that since the radius for the 
exact circle is measured as a surface distance, even for spheres I should be 
using the point-on-bearing method, since the maximum surface distance has to do 
with the details of the planet model.  Furthermore, since it is not really 
feasible to determine when the surface distance describes the entire world, I 
removed handling for that case; instead, you get an IllegalArgumentException 
when you try to do something like that.  (It would only apply in the case of a 
sphere and for a very specific surface distance in any case -- neither of which 
I'd expect GeoExactCircle to be used for.)

I also clarified the radius argument javadoc, since that was referring to 
angles and these are not angles.

Thanks for the contribution!!!


> 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: circle.jpg, LUCENE-7970-exact.diff, 
> LUCENE-7970-generator.patch, 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