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

Karl Wright commented on LUCENE-6487:
-------------------------------------

bq. GeoPoint.magnitude is a bit confusing to me… it seems it’s lazy 
initialized. I think it could use comments to this effect? And why is there a 
computeMagnitude() method distinct from super.magnitude() which also “computes” 
the magnitude?

Two different kinds of magnitude.  One is the inverse ellipsoid magnitude 
(computeMagnitude()) and the other is the classic root-of-squares linear 
magnitude.  I can change the method name to clarify this and add comments 
accordingly.

bq. Geo3dShapeRectRelationTestCase.geoPointToSpatial4jPoint (something I wrote) 
is probably wrong since it uses ‘x’ and ‘y’ as if it’s lon & lat when it’s not; 
and it doesn’t use ‘z’. How should this be rewritten?

I can propose code if you like, but basically what you do is this: (1) compute 
the inverse magnitude (im), then (2) lat = im * asin(z), (3) lon = atan2(y,x).

I can code up all of this stuff if you want to propose a good way to deliver 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
>
>
> 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]

Reply via email to