Class OrthographicProjection

All Implemented Interfaces:
Cloneable, ProjectionConstants

public class OrthographicProjection extends GCTPCStyleProjection
The OrthographicProjection class performs Orthographic map projection calculations.
Since:
3.3.0
Author:
Peter Hollemans
  • Constructor Details

    • OrthographicProjection

      public OrthographicProjection(double rMajor, int[] dimensions, AffineTransform affine, double center_lon, double center_lat, double falseEast, double falseNorth) throws NoninvertibleTransformException
      Constructs a map projection from the specified projection and affine transform. The SpheroidConstants and ProjectionConstants class should be consulted for valid parameter constants.
      Parameters:
      rMajor - the semi-major axis in meters.
      dimensions - the dimensions of the data grid as [rows, columns].
      affine - the affine transform for translating data [row, column] to map [x, y].
      center_lon - the center longitude.
      center_lat - the center latitude.
      falseEast - the false easting value.
      falseNorth - the false northing value.
      Throws:
      NoninvertibleTransformException - if the map projection to data coordinate affine transform is not invertible.
      IllegalArgumentException - if the paramaters have an inconsistency.
    • OrthographicProjection

      public OrthographicProjection(EarthLocation projCenter, int[] dimensions, EarthLocation centerLoc, double[] pixelDims) throws NoninvertibleTransformException
      Constructs a new orthographic projection using the specified projection center point. The Earth is assumed to be a sphere of radius 6370.997 km.
      Parameters:
      projCenter - the earth location at the projection center.
      dimensions - the dimensions of the data grid as [rows, columns].
      centerLoc - the earth location at the map center.
      pixelDims - the pixel dimensions in meters at the projection reference point as [height, width].
      Throws:
      NoninvertibleTransformException - if the map projection to data coordinate affine transform is not invertible.
      IllegalArgumentException - if the paramaters have an inconsistency.
  • Method Details

    • projfor

      protected long projfor(double lat, double lon, double[] x, double[] y)
      Description copied from class: GCTPCStyleProjection
      Performs the actual forward calculation as specified in the GCTP C code. This method is as close as possible to the native C function signature.
      Specified by:
      projfor in class GCTPCStyleProjection
      Parameters:
      lat - the latitude to convert.
      lon - the longitude to convert.
      x - the map coordinate x value (modified).
      y - the map coordinate y value (modified).
      Returns:
      OK on success, or not OK on failure.
    • projinv

      protected long projinv(double x, double y, double[] lon, double[] lat)
      Description copied from class: GCTPCStyleProjection
      Performs the actual inverse calculation as specified in the GCTP C code. This method is as close as possible to the native C function signature.
      Specified by:
      projinv in class GCTPCStyleProjection
      Parameters:
      x - the map coordinate x value (modified).
      y - the map coordinate y value (modified).
      lon - the longitude to convert.
      lat - the latitude to convert.
      Returns:
      OK on success, or not OK on failure.