Class RotateProjectionTransform

java.lang.Object
net.buildtheearth.terraminusminus.projection.transform.ProjectionTransform
net.buildtheearth.terraminusminus.projection.transform.RotateProjectionTransform
All Implemented Interfaces:
GeographicProjection

public class RotateProjectionTransform extends ProjectionTransform
  • Constructor Details

    • RotateProjectionTransform

      public RotateProjectionTransform(GeographicProjection delegate, double by)
      Parameters:
      delegate - - Input projection
      by - - how much to rotate the projection by
  • Method Details

    • bounds

      public double[] bounds()
      Description copied from interface: GeographicProjection
      Indicates the minimum and maximum X and Y coordinates on the projected space.
      Specified by:
      bounds in interface GeographicProjection
      Overrides:
      bounds in class ProjectionTransform
      Returns:
      {minimum X, minimum Y, maximum X, maximum Y}
    • toGeo

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

      public double[] fromGeo(double longitude, double latitude) throws OutOfProjectionBoundsException
      Description copied from interface: GeographicProjection
      Converts geographic coordinates to map coordinates
      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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • by

      public double by()