Class AbstractMathTransform.Inverse
- Object
-
- Formattable
-
- AbstractMathTransform
-
- Inverse
-
- All Implemented Interfaces:
Serializable,MathTransform
- Enclosing class:
- AbstractMathTransform
protected abstract class AbstractMathTransform.Inverse extends AbstractMathTransform implements Serializable
Default implementation for inverse math transform. This inner class is the inverse of the enclosingMathTransform. It is serializable only if the enclosing math transform is also serializable.- Since:
- 2.0
- Author:
- Martin Desruisseaux (IRD)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class AbstractMathTransform
AbstractMathTransform.Inverse
-
-
Field Summary
-
Fields inherited from class Formattable
SINGLE_LINE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedInverse()Constructs an inverse math transform.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Matrixderivative(Point2D point)Gets the derivative of this transform at a point.Matrixderivative(Position point)Gets the derivative of this transform at a point.booleanequals(Object object)Compares the specified object with this inverse math transform for equality.protected StringformatWKT(Formatter formatter)Format the inner part of a Well Known Text (WKT) element.StringgetName()Returns a name for this math transform (nevernull).intgetSourceDimensions()Gets the dimension of input points.intgetTargetDimensions()Gets the dimension of output points.inthashCode()Returns a hash code value for this math transform.MathTransforminverse()Returns the inverse of this math transform, which is the enclosing math transform.booleanisIdentity()Tests whether this transform does not move any points.-
Methods inherited from class AbstractMathTransform
createTransformedShape, ensureNonNull, getParameterDescriptors, getParameterValues, needCopy, normalizeAngle, rollLongitude, transform, transform, transform, transform, transform
-
Methods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
-
Methods inherited from interface MathTransform
toWKT, transform
-
-
-
-
Method Detail
-
getName
public String getName()
Returns a name for this math transform (nevernull). The default implementation returns the direct transform name concatenated with localized flavor (when available) of "(Inverse transform)".- Overrides:
getNamein classAbstractMathTransform- Returns:
- A name for this math transform (never
null). - Since:
- 2.5
-
getSourceDimensions
public int getSourceDimensions()
Gets the dimension of input points. The default implementation returns the dimension of output points of the enclosing math transform.- Specified by:
getSourceDimensionsin interfaceMathTransform- Specified by:
getSourceDimensionsin classAbstractMathTransform- Returns:
- The dimension of input points.
-
getTargetDimensions
public int getTargetDimensions()
Gets the dimension of output points. The default implementation returns the dimension of input points of the enclosing math transform.- Specified by:
getTargetDimensionsin interfaceMathTransform- Specified by:
getTargetDimensionsin classAbstractMathTransform- Returns:
- The dimension of output points.
-
derivative
public Matrix derivative(Point2D point) throws TransformException
Gets the derivative of this transform at a point. The default implementation compute the inverse of the matrix returned by the enclosing math transform.- Overrides:
derivativein classAbstractMathTransform- Parameters:
point- The coordinate point where to evaluate the derivative.- Returns:
- The derivative at the specified point as a 2×2 matrix.
- Throws:
TransformException- if the derivative can't be evaluated at the specified point.- See Also:
MathTransform2D.derivative(Point2D)
-
derivative
public Matrix derivative(Position point) throws TransformException
Gets the derivative of this transform at a point. The default implementation compute the inverse of the matrix returned by the enclosing math transform.- Specified by:
derivativein interfaceMathTransform- Overrides:
derivativein classAbstractMathTransform- Parameters:
point- The coordinate point where to evaluate the derivative.- Returns:
- The derivative at the specified point (never
null). - Throws:
TransformException- if the derivative can't be evaluated at the specified point.
-
inverse
public MathTransform inverse()
Returns the inverse of this math transform, which is the enclosing math transform. This behavior should not be changed since some implementation assume that the inverse ofthisis alwaysAbstractMathTransform.this.- Specified by:
inversein interfaceMathTransform- Overrides:
inversein classAbstractMathTransform- Returns:
- The inverse transform.
-
isIdentity
public boolean isIdentity()
Tests whether this transform does not move any points. The default implementation delegate this tests to the enclosing math transform.- Specified by:
isIdentityin interfaceMathTransform- Overrides:
isIdentityin classAbstractMathTransform- Returns:
trueif thisMathTransformis an identity transform;falseotherwise.
-
hashCode
public int hashCode()
Returns a hash code value for this math transform.- Overrides:
hashCodein classAbstractMathTransform
-
equals
public boolean equals(Object object)
Compares the specified object with this inverse math transform for equality. The default implementation tests ifobjectin an instance of the same class thanthis, and then test their enclosing math transforms.- Overrides:
equalsin classAbstractMathTransform- Parameters:
object- The object to compare with this transform.- Returns:
trueif the given object is a transform of the same class and if, given identical source position, the transformed position would be the equals.
-
formatWKT
protected String formatWKT(Formatter formatter)
Format the inner part of a Well Known Text (WKT) element. If this inverse math transform has any parameter values, then this method format the WKT as in the super-class method. Otherwise this method format the math transform as an"INVERSE_MT"entity.- Overrides:
formatWKTin classAbstractMathTransform- Parameters:
formatter- The formatter to use.- Returns:
- The WKT element name, which is
"PARAM_MT"or"INVERSE_MT"in the default implementation. - See Also:
Formattable.toWKT(),Formattable.toString()
-
-