Class SwapAxesProjectionTransform

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

public class SwapAxesProjectionTransform extends ProjectionTransform
Inverses the warped projection such that x becomes y and y becomes x.
  • Constructor Details

    • SwapAxesProjectionTransform

      public SwapAxesProjectionTransform(GeographicProjection delegate)
      Parameters:
      delegate - - projection to transform
  • Method Details

    • 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 lon, double lat) throws OutOfProjectionBoundsException
      Description copied from interface: GeographicProjection
      Converts geographic coordinates to map coordinates
      Parameters:
      lon - - longitude, in degrees
      lat - - 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
    • 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}
    • toString

      public String toString()
      Overrides:
      toString in class Object