Package noaa.coastwatch.util.trans
Class MapProjectionFactory
java.lang.Object
noaa.coastwatch.util.trans.MapProjectionFactory
- All Implemented Interfaces:
ProjectionConstants
The
MapProjectionFactory
class creates instances
of map projections.- Since:
- 3.2.1
- Author:
- Peter Hollemans
-
Field Summary
Fields inherited from interface noaa.coastwatch.util.trans.ProjectionConstants
ALASKA, ALBERS, AZMEQD, EQRECT, EQUIDC, GEO, GNOMON, GOOD, GVNSP, HAMMER, HOM, IMOLL, LAMAZ, LAMCC, MAX_PROJECTIONS, MERCAT, MILLER, MOLL, OBEQA, ORTHO, POLYC, PROJECTION_NAMES, PS, ROBIN, SNSOID, SOM, SPCS, STEREO, TM, USDEF, UTM, VGRINT, WAGIV, WAGVII
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a new map projection factory with no GCTP forcing. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(int system, int zone, double[] parameters, int spheroid, int[] dimensions, AffineTransform affine) Creates a new map projection from the specified GCTP-style projection and data parameters.create
(int system, int zone, double[] parameters, int spheroid, int[] dimensions, EarthLocation centerLoc, double[] pixelDims) Creates a new map projection from the specified GCTP-style projection and data parameters.static MapProjectionFactory
Gets an instance of this factory with no GCTP forcing.
-
Constructor Details
-
MapProjectionFactory
protected MapProjectionFactory()Creates a new map projection factory with no GCTP forcing.
-
-
Method Details
-
getInstance
Gets an instance of this factory with no GCTP forcing. This is the main method that most classes should use to create aMapProjection
because it allows the factory to possibly return a performance-enhanced pure Java version of aGCTPStyleProjection
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. TheSpheroidConstants
andProjectionConstants
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. TheSpheroidConstants
andProjectionConstants
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.
-