[ 
https://issues.apache.org/jira/browse/LUCENE-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Smiley resolved LUCENE-2519.
----------------------------------

    Resolution: Won't Fix

Closing because the old spatial contrib module referenced here no longer exists 
as of Solr 4.

> SinusoidalProjection returns the incorrect results
> --------------------------------------------------
>
>                 Key: LUCENE-2519
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2519
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial
>            Reporter: Grant Ingersoll
>
> Currently, the SinusoidalProjection does:
> {code}
> public double[] coords(double latitude, double longitude) {
>     double rlat = Math.toRadians(latitude);
>     double rlong = Math.toRadians(longitude);
>     double nlat = rlong * Math.cos(rlat);
>     return new double[]{nlat, rlong};
>     
>   }
> {code}
> But the correct formula (from 
> http://en.wikipedia.org/wiki/Sinusoidal_projection) is:
> {quote}
> x = (gamma - gamma[0]) cos(phi)
> y = phi
> {quote}
> where gamma[0] is assumed to be the prime meridian in this case (0), gamma is 
> the incoming longitude and phi is the latitude
> Thus, the above code should return:
> {quote}
> {nlat, rlat}
> {quote}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to