Class EarthImageTransform

java.lang.Object
noaa.coastwatch.render.EarthImageTransform

public class EarthImageTransform extends Object
The earth image transform class translates between 2D geographic coordinates in latitude, longitude and image coordinates in x, y.
Since:
3.1.1
Author:
Peter Hollemans
  • Constructor Details

  • Method Details

    • getEarthTransform

      public EarthTransform getEarthTransform()
      Gets the earth transform.
    • getImageTransform

      public ImageTransform getImageTransform()
      Gets the image transform.
    • transform

      public Point2D transform(EarthLocation geo)
      Converts geographic coordinates to image coordinates.
      Parameters:
      geo - the geographic location.
      Returns:
      the image coordinates, or null if the geographic point could not be transformed.
      See Also:
    • transform

      public EarthLocation transform(Point2D point)
      Converts arbitrary precision image coordinates to geographic coordinates.
      Parameters:
      point - the image coordinates.
      Returns:
      the geographic location.
      See Also:
    • transform

      public EarthLocation transform(Point point)
      Converts integer image coordinates to geographic coordinates.
      Parameters:
      point - the image coordinates.
      Returns:
      the geographic location.
      See Also:
    • getResolution

      public double getResolution(Point2D point)
      Calculates an approximate resolution in km/pixel.
      Parameters:
      point - the image point.
      Returns:
      the resolution in km/pixel at the image point.
    • isDiscontinuous

      public boolean isDiscontinuous(EarthLocation e1, EarthLocation e2, Point2D p1, Point2D p2)
      Determines if a segment running from one earth location to another is discontinuous in the image space. The calculation uses a heuristic, so in some extreme cases it may not return the correct answer.
      Parameters:
      e1 - the first earth location.
      e2 - the second earth location.
      p1 - the first image point (or null to calculate).
      p2 - the second image point (or null to calculate).
      Returns:
      true if the segment is discontinuous, or false if not or if the earth locations could not be resolved to image points.