Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-2519

SinusoidalProjection returns the incorrect results

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: modules/spatial
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      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 http://en.wikipedia.org/wiki/Sinusoidal_projection) 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:

      Unknown macro: {nlat, rlat}

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gsingers Grant Ingersoll
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: