[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-22 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-7970:
-

[~ivera]  Obviously for this strategy to work we need a robust way of locating 
the minimum and maximum points in the cardinal directions from the center of 
the circle.  So that point-on-bearing method must do that whatever the provided 
center is and whatever the distance provided is, within reasonable limits.

Once that's possible I am quite comfortable writing logic that produces the two 
necessary planes that have the correct relationship with each other.  One plane 
will be defined by the top/bottom (aka "north" and "south") points, while the 
other will be determined by the east/west points.  It's perfectly OK to have 
the "top/bottom" points be on opposite sides of the earth but we would require 
them both to be on a plane that goes through the north and south poles.  Then, 
"east/west" points would be computed as follows:

(1) Compute the plane that is perpendicular to the first plane which contains 
both the top and bottom points.  There is likely a Plane constructor for this 
kind of case already.
(2) The "east/west" points should be on a plane that goes through the center of 
the circle, and is perpendicular to both of the planes we've now mentioned.  We 
have logic that computes this plane too, I believe, that we could use for the 
test.

If we have the above planes and points, it's straightforward to pick the two 
ellipses that will define this shape.  I *think* that your point-on-bearing 
method will pick the right points if bearings are chosen in cardinal 
directions, but that's what we need to verify with a test.  Please also make 
sure to verify that that works for a sample of points that includes the north 
and south poles.

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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-21 Thread Ignacio Vera (JIRA)

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

Ignacio Vera commented on LUCENE-7970:
--

Thanks [~karl wright],

For the documentation I took the method from, it seems that it might have 
problems for antipodal points. Other than that, I will devise a test to shows 
the limits in distance and maybe values for planet model.

One more observation: I think there would be a dependency on whether the center 
of the circle is in the north or south hemisphere. I am busy this morning but I 
hope to be able to spend some time on this later today.

> 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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-21 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-7970:
-

Commit 289e746793b0548c5c353dd36e6fecb57b208183 in lucene-solr's branch 
refs/heads/branch_7x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=289e746 ]

LUCENE-7970: Add surface point on bearing method to PlanetModel.  Committed on 
behalf of Ignacio Vera.


> 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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-21 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-7970:
-

Commit c374aad51df56470a586a24e84ee87eb8cfa5766 in lucene-solr's branch 
refs/heads/branch_6x from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c374aad ]

LUCENE-7970: Add surface point on bearing method to PlanetModel.  Committed on 
behalf of Ignacio Vera.


> 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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-21 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on LUCENE-7970:
-

Commit d84beb415cebc3f144fdd068c2728d5468d8c343 in lucene-solr's branch 
refs/heads/master from [~kwri...@metacarta.com]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d84beb4 ]

LUCENE-7970: Add surface point on bearing method to PlanetModel.  Committed on 
behalf of Ignacio Vera.


> 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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-21 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-7970:
-

Also, I played around with the vincenti bearing formula, as described here, and 
determined that it works reasonably even at the poles.  Giving four direction 
bearings seemingly does yield reasonable point values.

http://www.movable-type.co.uk/scripts/latlong-vincenty.html

[~ivera], can you comment what the source is of your point-on-bearing code?  
I'd also want to be sure that we know in advance what the limits are -- is it 
limited to any particular maximum surface distance, for instance?


> 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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-21 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-7970:
-

My initial observations:

(1) The "inner" and "outer" planes are in fact parallel to one another -- so we 
would want to compute first the one that goes through the upper latitude point 
and the lower latitude point, and then compute an "adjusted" parallel plane.  
The problem is how to figure out the adjustment.  This is what I still need to 
consider.  One way to do it is to find a point-on-bearing to the left or right 
and pick the second plane's D coefficient based on that point.  I think this 
would work quite well actually.
(2) The choice of which plane is "inner" and which plane is "outer" depends on 
whether c > ab, and on whether the radius of the circle is greater than 180 
degrees.  Need to think this through too.


> 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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-21 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-7970:
-

[~ivera], with luck I'll be able to do more on this tomorrow, since things are 
slowing down now at work somewhat.

My thought is that it should be possible to pick the outer and inner planes 
based on (a) whether planetModel.c > planetModel.ab, and (b) a precise 
computation of the top and bottom latitude points of the circle.  I'll think 
about this further tomorrow morning and let's see what you come up with too.


> 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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-21 Thread Ignacio Vera (JIRA)

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

Ignacio Vera commented on LUCENE-7970:
--

(1) I was having problems with the maths so before going foward  in trying to 
solve/formalize it I wanted to see if the approach I was taken would be 
considered. First thing we need to do then, it is to formalize the way to 
compute the planes. I know there is something missing; there is a maximum 
cutoff angle which depends on the spheriod(ab,c) where the outerEllipse does 
not make sense and should be the whole planet. The same with the innerEllipse.  

(2) Ok, I think we can use only the outer plane as it is bigger than the shape. 
If null then bounds should be the whole world.Using the inner plane can give 
bounds smaller than the shape and we might want to avoid that.

(3) upps, my mistake ... shapes should not be public. 

I will try then to find the way to compute the planes that provides the desired 
inner and outer plane in a formal way. 

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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-21 Thread Karl Wright (JIRA)

[ 
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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-15 Thread Ignacio Vera (JIRA)

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

Ignacio Vera commented on LUCENE-7970:
--

[~karl wright], that is ok. It seems a very hard problem and I only got partial 
results which are not so happy with. I will give myself a week and see how far 
I can get. I am very busy as well later so let see if we can improve cirlces in 
non-spherical planets.

> 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-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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-15 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-7970:
-

[~ivera], I will have to put this on hold for about a week.  If you want to 
submit a complete patch that addresses the areas of concern described above, I 
might be able to look at it a little this weekend, but I'm pretty overcommitted 
even then.


> 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-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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-14 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-7970:
-

[~ivera], now I understand what you are trying to do.

There are several areas of concern:
(1) For extremely small circles, e.g. those with radii 
Vector.MINIMUM_ANGULAR_RESOLUTION, does this reliably work?
(2) For PlanetModel.SPHERE, can we "shortcut" to a faster implementation?  Or 
is the vincenti formula guaranteed to converge in one iteration in that case?  
I do not want to make it exorbitantly expensive to construct circles in 
PlanetModel.SPHERE.
(3) Paths also use circles.  The way those circles are constructed depends on 
whether the circles are intersection points, endpoints, or single circles. 
 The latter I think should behave exactly like GeoCircles, however that works 
out.  It may be valuable, therefore, to provide a Plane static builder method 
that can be used for both GeoStandardCircle and GeoStandardPath.



> 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
> Attachments: 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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-14 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-7970:
-

[~ivera], I'm sorry, but I still don't see that you've proposed any solution to 
the underlying issue.
Maybe you can submit a patch for isWithin() that shows what you intend.


> 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
> Attachments: LUCENE-7970.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



[jira] [Commented] (LUCENE-7970) Improve generation of circle plane

2017-09-14 Thread Karl Wright (JIRA)

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

Karl Wright commented on LUCENE-7970:
-

[~ivera]: isWithin() for any plane on a non-spherical ellipsoid will generate 
"true" for an area that is an ellipse.  See:

https://file.scirp.org/pdf/AM2012119_89014420.pdf

This is almost certainly the cause for the claim that points around the edge of 
a GeoCircle are incorrectly described as in-set or out-of-set, when you apply 
the Vincenti formula to perform the surface distance computation.

Since there are no "generated" points for a geo circle except maybe in the 
testing framework, I can't see how adding a point generation method helps this 
in any way.  Please clarify.



> 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
>
> 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