org.geotoolkit.referencing.operation.provider
Class MapProjection

Object
  extended by FormattableObject
      extended by AbstractIdentifiedObject
          extended by DefaultOperationMethod
              extended by MathTransformProvider
                  extended by MapProjection
All Implemented Interfaces:
Serializable, Formattable, LenientComparable, IdentifiedObject, OperationMethod
Direct Known Subclasses:
AlbersEqualArea, CassiniSoldner, EquidistantCylindrical, Krovak, LambertAzimuthalEqualArea, LambertConformal1SP, LambertConformal2SP, Mercator1SP, Mercator2SP, MillerCylindrical, NewZealandMapGrid, ObliqueMercator, Orthographic, Polyconic, PseudoMercator, Stereographic, TransverseMercator

@Immutable
public abstract class MapProjection
extends MathTransformProvider

The base provider for map projections. This base class defines the descriptors for the most commonly used parameters. Subclasses will declare the parameters they use in a descriptor group named PARAMETERS.

Since:
2.0
Version:
3.00
Author:
Martin Desruisseaux (IRD)
See Also:
Map projections on MathWorld, Map projections on the atlas of Canada, Serialized Form
Module:
referencing/geotk-referencing (download)    View source code for this class

Field Summary
static ParameterDescriptor<Boolean> ROLL_LONGITUDE
          The operation parameter descriptor for whatever the projection should roll longitude.
static ParameterDescriptor<Double> SEMI_MAJOR
          The operation parameter descriptor for the semi major parameter value.
static ParameterDescriptor<Double> SEMI_MINOR
          The operation parameter descriptor for the semi minor parameter value.
static ParameterDescriptor<Double> X_SCALE
          The operation parameter descriptor for the ESRI "X_Scale" parameter value.
static ParameterDescriptor<Double> XY_PLANE_ROTATION
          The operation parameter descriptor for the ESRI "XY_Plane_Rotation" parameter value.
static ParameterDescriptor<Double> Y_SCALE
          The operation parameter descriptor for the ESRI "Y_Scale" parameter value.
 
Fields inherited from class DefaultOperationMethod
sourceDimension, targetDimension
 
Fields inherited from class FormattableObject
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE
 
Fields inherited from interface OperationMethod
FORMULA_KEY
 
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
Constructor Summary
protected MapProjection(ParameterDescriptorGroup parameters)
          Constructs a math transform provider from a set of parameters.
 
Method Summary
protected abstract  MathTransform2D createMathTransform(ParameterValueGroup values)
          Creates a map projection from the specified group of parameter values.
 Class<? extends Projection> getOperationType()
          Returns the operation type for this map projection.
 
Methods inherited from class MathTransformProvider
ensureValidValues, formatWKT
 
Methods inherited from class DefaultOperationMethod
checkDimensions, computeHashCode, equals, getFormula, getParameters, getSourceDimensions, getTargetDimensions
 
Methods inherited from class AbstractIdentifiedObject
equals, getAlias, getIdentifier, getIdentifiers, getName, getName, getRemarks, hashCode, nameMatches
 
Methods inherited from class FormattableObject
getDefaultIndentation, print, setDefaultIndentation, toString, toWKT, toWKT, toWKT
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
 

Field Detail

SEMI_MAJOR

public static final ParameterDescriptor<Double> SEMI_MAJOR
The operation parameter descriptor for the semi major parameter value. Valid values range is (0 … ∞). This parameter is mandatory and has no default value.


SEMI_MINOR

public static final ParameterDescriptor<Double> SEMI_MINOR
The operation parameter descriptor for the semi minor parameter value. Valid values range is (0 … ∞). This parameter is mandatory and has no default value.


ROLL_LONGITUDE

public static final ParameterDescriptor<Boolean> ROLL_LONGITUDE
The operation parameter descriptor for whatever the projection should roll longitude. If true, then the value of (longitude - central meridian) will be rolled to the [-180 … 180)° range before the projection is applied. If false, then longitude rolling is never applied. If not provided, then the default behavior is to roll longitude only if the central meridian is different than zero.

This is a Geotk-specific parameter.

Since:
3.00

X_SCALE

public static final ParameterDescriptor<Double> X_SCALE
The operation parameter descriptor for the ESRI "X_Scale" parameter value. Valid values range is unrestricted. This parameter is optional and its default value is 1.

This is an ESRI-specific parameter, but its usage could be extended to any projection. The choice to allow this parameter or not is taken on a projection-by-projection basis.

Since:
3.00

Y_SCALE

public static final ParameterDescriptor<Double> Y_SCALE
The operation parameter descriptor for the ESRI "Y_Scale" parameter value. Valid values range is unrestricted. This parameter is optional and its default value is 1.

This is an ESRI-specific parameter, but its usage could be extended to any projection. The choice to allow this parameter or not is taken on a projection-by-projection basis.

Since:
3.00

XY_PLANE_ROTATION

public static final ParameterDescriptor<Double> XY_PLANE_ROTATION
The operation parameter descriptor for the ESRI "XY_Plane_Rotation" parameter value. The rotation is applied before the false easting and false northing translation, if any. Valid values range is [-360 … 360]°. This parameter is optional and its default value is 0°.

This is an ESRI-specific parameter, but its usage could be extended to any projections. The choice to allow this parameter or not is taken on a projection-by-projection basis.

Since:
3.00
Constructor Detail

MapProjection

protected MapProjection(ParameterDescriptorGroup parameters)
Constructs a math transform provider from a set of parameters. The provider identifiers will be the same than the parameter ones.

Parameters:
parameters - The set of parameters (never null).
Method Detail

getOperationType

public Class<? extends Projection> getOperationType()
Returns the operation type for this map projection.

Overrides:
getOperationType in class MathTransformProvider
Returns:
The GeoAPI interface implemented by this operation.

createMathTransform

protected abstract MathTransform2D createMathTransform(ParameterValueGroup values)
                                                throws ParameterNotFoundException
Creates a map projection from the specified group of parameter values.

Specified by:
createMathTransform in class MathTransformProvider
Parameters:
values - The group of parameter values.
Returns:
The created map projection.
Throws:
ParameterNotFoundException - if a required parameter was not found.


Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.