org.geotools.referencing.operation.transform
Class SimilarityTransformProvider

Object
  extended by Formattable
      extended by AbstractIdentifiedObject
          extended by DefaultOperationMethod
              extended by MathTransformProvider
                  extended by SimilarityTransformProvider
All Implemented Interfaces:
Serializable, IdentifiedObject, OperationMethod

public class SimilarityTransformProvider
extends MathTransformProvider

The provider for the "Similarity transformation" (EPSG 9621).

Note that similarity transform is a special case of an Affine transform 2D.

Author:
Oscar Fonts
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class MathTransformProvider
MathTransformProvider.Delegate
 
Field Summary
static ParameterDescriptor<Double> ROTATION
          "Rotation angle of source coordinate reference system axes" EPSG::8614
static ParameterDescriptor<Double> SCALE
          "Scale difference" EPSG::8611
static ParameterDescriptor<Double> TRANSLATION_1
          "Ordinate 1 of evaluation point in target CRS" EPSG::8621
static ParameterDescriptor<Double> TRANSLATION_2
          "Ordinate 2 of evaluation point in target CRS" EPSG::8622
 
Fields inherited from class DefaultOperationMethod
sourceDimensions, targetDimensions
 
Fields inherited from class AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
 
Fields inherited from class Formattable
SINGLE_LINE
 
Fields inherited from interface OperationMethod
FORMULA_KEY
 
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
Constructor Summary
SimilarityTransformProvider()
          Creates a two-dimensional similarity transform.
 
Method Summary
protected  MathTransform createMathTransform(ParameterValueGroup values)
          Constructs an AffineTransform2D math transform from the specified group of parameter values.
 
Methods inherited from class MathTransformProvider
createDescriptor, createDescriptorGroup, createOptionalDescriptor, doubleValue, ensureValidValues, formatWKT, getOperationType, getParameter, intValue, stringValue, toMap, value
 
Methods inherited from class DefaultOperationMethod
checkDimensions, equals, getFormula, getParameters, getSourceDimensions, getTargetDimensions, hashCode
 
Methods inherited from class AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches, nameMatches
 
Methods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, 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

TRANSLATION_1

public static final ParameterDescriptor<Double> TRANSLATION_1
"Ordinate 1 of evaluation point in target CRS" EPSG::8621


TRANSLATION_2

public static final ParameterDescriptor<Double> TRANSLATION_2
"Ordinate 2 of evaluation point in target CRS" EPSG::8622


SCALE

public static final ParameterDescriptor<Double> SCALE
"Scale difference" EPSG::8611


ROTATION

public static final ParameterDescriptor<Double> ROTATION
"Rotation angle of source coordinate reference system axes" EPSG::8614

Constructor Detail

SimilarityTransformProvider

public SimilarityTransformProvider()
Creates a two-dimensional similarity transform. EPSG defines explicitly this transform as 2D.

Method Detail

createMathTransform

protected MathTransform createMathTransform(ParameterValueGroup values)
                                     throws ParameterNotFoundException
Constructs an AffineTransform2D math transform from the specified group of parameter values. The similarity transform is a particular case of Affine Transform 2D where:
 m00 = SCALE * cos(ROTATION)
 m01 = SCALE * sin(ROTATION)
 m02 = TRANSLATION_1
 m10 = -m01
 m11 = m00
 m12 = TRANSLATION_2
 

Specified by:
createMathTransform in class MathTransformProvider
Parameters:
values - The group of parameter values PARAMETERS.
Returns:
an AffineTransform2D.
Throws:
ParameterNotFoundException - if a required parameter was not found.
See Also:
MathTransformProvider.Delegate


Copyright © 1996-2014 Geotools. All Rights Reserved.