lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll (JIRA)" <>
Subject [jira] Created: (LUCENE-2519) SinusoidalProjection returns the incorrect results
Date Tue, 29 Jun 2010 16:06:51 GMT
SinusoidalProjection returns the incorrect results

                 Key: LUCENE-2519
             Project: Lucene - Java
          Issue Type: Bug
          Components: contrib/spatial
            Reporter: Grant Ingersoll

Currently, the SinusoidalProjection does:
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};

But the correct formula (from is:
x = (gamma - gamma[0]) cos(phi)
y = phi
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:
{nlat, rlat}

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message