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

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

I committed the new Bounded interface regardless; it seemed like a worthwhile 
addition to granularity.

I also considered what would happen if we just considered any intersection with 
either the inner or the outer plane to be an intersection with the exact 
circle.  This is worth considering in the context of what is actually computed 
with the intersects() method.  These are specifically GeoArea relationships.  
So it is worth asking what the problems actually are if we're too inclined to 
detect intersection?

The main issue is that it's possible to *not* detect intersection when we 
*should*.  If the plane that is intersecting happens to lie between the outer 
and inner planes, then we will miss an intersection that actually must be 
there, and I don't know any way to compute the actual points of intersection.  
So even though there's a boolean result, there's no way to know if the 
intersection in fact occurs within the given bounds.

However, if we were just worried about overdetection of intersections, then 
this is actually almost workable, because if we falsely detect an intersection 
that actually isn't there, we simply wind up treating the shape as bigger than 
it really is.  As long as it behaves consistently and the user doesn't mind 
having the shape not perfectly detect the difference between overlaps and 
contains, we're good.  If the case of the plane being between the outer and 
inner planes can be turned into overdetection of intersection, then I think we 
could manage.

Unfortunately, I cannot convince myself that it's impossible to have an 
intersection on the true circle curve that's within the provided bounds while 
NOT intersecting either the inner or outer planes within those same bounds.


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

Reply via email to