Class SinusoidalProjection

java.lang.Object
net.buildtheearth.terraminusminus.projection.SinusoidalProjection
All Implemented Interfaces:
GeographicProjection

public class SinusoidalProjection extends Object implements GeographicProjection
Implementation of the Sinusoidal projection.
See Also:
  • Constructor Details

    • SinusoidalProjection

      public SinusoidalProjection()
  • Method Details

    • toGeo

      public double[] toGeo(double x, double y)
      Description copied from interface: GeographicProjection
      Converts map coordinates to geographic coordinates
      Specified by:
      toGeo in interface GeographicProjection
      Parameters:
      x - - x map coordinate
      y - - y map coordinate
      Returns:
      {longitude, latitude} in degrees
    • fromGeo

      public double[] fromGeo(double longitude, double latitude) throws OutOfProjectionBoundsException
      Description copied from interface: GeographicProjection
      Converts geographic coordinates to map coordinates
      Specified by:
      fromGeo in interface GeographicProjection
      Parameters:
      longitude - - longitude, in degrees
      latitude - - latitude, in degrees
      Returns:
      {x, y} map coordinates
      Throws:
      OutOfProjectionBoundsException - if the specified point on the geographic space cannot be mapped to a point of the projected space
    • metersPerUnit

      public double metersPerUnit()
      Description copied from interface: GeographicProjection
      Gives an estimation of the scale of this projection. This is just an estimation, as distortion is inevitable when projecting a sphere onto a flat surface, so this value varies from places to places in reality.
      Specified by:
      metersPerUnit in interface GeographicProjection
      Returns:
      an estimation of the scale of this projection
    • toString

      public String toString()
      Overrides:
      toString in class Object