Class MapProjectionFactory

java.lang.Object
noaa.coastwatch.util.trans.MapProjectionFactory
All Implemented Interfaces:
ProjectionConstants

public class MapProjectionFactory extends Object implements ProjectionConstants
The MapProjectionFactory class creates instances of map projections.
Since:
3.2.1
Author:
Peter Hollemans
  • Constructor Details

    • MapProjectionFactory

      protected MapProjectionFactory()
      Creates a new map projection factory with no GCTP forcing.
  • Method Details

    • getInstance

      public static MapProjectionFactory getInstance()
      Gets an instance of this factory with no GCTP forcing. This is the main method that most classes should use to create a MapProjection because it allows the factory to possibly return a performance-enhanced pure Java version of a GCTPStyleProjection object.
    • create

      public MapProjection create(int system, int zone, double[] parameters, int spheroid, int[] dimensions, EarthLocation centerLoc, double[] pixelDims) throws NoninvertibleTransformException
      Creates a new map projection from the specified GCTP-style projection and data parameters. The SpheroidConstants and ProjectionConstants class should be consulted for valid parameter constants.
      Parameters:
      system - the map projection system.
      zone - the map projection zone for State Plane and UTM projections.
      parameters - an array of 15 GCTP projection parameters.
      spheroid - the spheroid code or -1 for custom spheroid.
      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].
      Returns:
      the new map projection.
      Throws:
      NoninvertibleTransformException - if the map projection to data coordinate affine transform is not invertible.
      IllegalArgumentException - if the projection system and spheroid are incompatible or projection parameters are inconsistent.
    • create

      public MapProjection create(int system, int zone, double[] parameters, int spheroid, int[] dimensions, AffineTransform affine) throws NoninvertibleTransformException
      Creates a new map projection from the specified GCTP-style projection and data parameters. The SpheroidConstants and ProjectionConstants class should be consulted for valid parameter constants.
      Parameters:
      system - the map projection system.
      zone - the map projection zone for State Plane and UTM projections.
      parameters - an array of 15 GCTP projection parameters.
      spheroid - the spheroid code or -1 for custom spheroid.
      dimensions - the dimensions of the data grid as [rows, columns].
      affine - the affine transform for translating data [row, column] to map [x, y].
      Returns:
      the new map projection.
      Throws:
      NoninvertibleTransformException - if the map projection to data coordinate affine transform is not invertible.
      IllegalArgumentException - if the projection system and spheroid are incompatible or projection parameters are inconsistent.