[
https://issues.apache.org/jira/browse/LUCENE-6487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14564550#comment-14564550
]
Karl Wright commented on LUCENE-6487:
-------------------------------------
Hi David,
This test is now wrong, and will blow up whenever a point is chosen at the
poles:
{code}
final double pLat = (randomFloat() * 180.0 - 90.0) *
DistanceUtils.DEGREES_TO_RADIANS;
final double pLon = (randomFloat() * 360.0 - 180.0) *
DistanceUtils.DEGREES_TO_RADIANS;
final GeoPoint p1 = new GeoPoint(PlanetModel.SPHERE, pLat, pLon);
assertEquals(pLat, p1.getLatitude(), 1e-12);
assertEquals(pLon, p1.getLongitude(), 1e-12);
final GeoPoint p2 = new GeoPoint(PlanetModel.WGS84, pLat, pLon);
assertEquals(pLat, p2.getLatitude(), 1e-12);
assertEquals(pLon, p2.getLongitude(), 1e-12);
{code}
The conversion at the pole will produce a longitude value always of zero, not
what went into it.
> Add WGS84 capability to geo3d support
> -------------------------------------
>
> Key: LUCENE-6487
> URL: https://issues.apache.org/jira/browse/LUCENE-6487
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/spatial
> Reporter: Karl Wright
> Attachments: LUCENE-6487.patch, LUCENE-6487.patch, LUCENE-6487.patch,
> LUCENE-6487.patch
>
>
> WGS84 compatibility has been requested for geo3d. This involves working with
> an ellipsoid rather than a unit sphere. The general formula for an ellipsoid
> is:
> x^2/a^2 + y^2/b^2 + z^2/c^2 = 1
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]