Class ClampProjectionTransform

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

public class ClampProjectionTransform extends ProjectionTransform
  • Constructor Details

    • ClampProjectionTransform

      public ClampProjectionTransform(GeographicProjection delegate, double minX, double maxX, double minY, double maxY)
      Parameters:
      delegate - - Input projection
  • 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
    • minX

      public double minX()
    • maxX

      public double maxX()
    • minY

      public double minY()
    • maxY

      public double maxY()