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 enclosing
MathTransform. It is serializable only if the enclosing math transform is also serializable.- Since:
- 2.0
- Author:
- Martin Desruisseaux (IRD)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMathTransform
AbstractMathTransform.Inverse -
Field Summary
Fields inherited from class Formattable
SINGLE_LINE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionderivative(Point2D point) Gets the derivative of this transform at a point.derivative(Position point) Gets the derivative of this transform at a point.booleanCompares the specified object with this inverse math transform for equality.protected StringFormat the inner part of a Well Known Text (WKT) element.getName()Returns a name for this math transform (nevernull).intGets the dimension of input points.intGets the dimension of output points.inthashCode()Returns a hash code value for this math transform.inverse()Returns the inverse of this math transform, which is the enclosing math transform.booleanTests whether this transform does not move any points.Methods inherited from class AbstractMathTransform
createTransformedShape, ensureNonNull, getParameterDescriptors, getParameterValues, needCopy, normalizeAngle, rollLongitude, transform, transform, transform, transform, transformMethods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKTMethods inherited from interface MathTransform
toWKT, transform
-
Constructor Details
-
Inverse
protected Inverse()Constructs an inverse math transform.
-
-
Method Details
-
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
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:
-
derivative
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
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
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
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:
-