[
https://issues.apache.org/jira/browse/LUCENE-7970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16176348#comment-16176348
]
Karl Wright edited comment on LUCENE-7970 at 9/22/17 12:45 PM:
---------------------------------------------------------------
[~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.
For testing, 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!
was (Author: [email protected]):
[~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: [email protected]
For additional commands, e-mail: [email protected]