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.boolean
Compares the specified object with this inverse math transform for equality.protected String
Format the inner part of a Well Known Text (WKT) element.getName()
Returns a name for this math transform (nevernull
).int
Gets the dimension of input points.int
Gets the dimension of output points.int
hashCode()
Returns a hash code value for this math transform.inverse()
Returns the inverse of this math transform, which is the enclosing math transform.boolean
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
-
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:
getName
in 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:
getSourceDimensions
in interfaceMathTransform
- Specified by:
getSourceDimensions
in 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:
getTargetDimensions
in interfaceMathTransform
- Specified by:
getTargetDimensions
in 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:
derivative
in 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:
derivative
in interfaceMathTransform
- Overrides:
derivative
in 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 ofthis
is alwaysAbstractMathTransform.this
.- Specified by:
inverse
in interfaceMathTransform
- Overrides:
inverse
in 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:
isIdentity
in interfaceMathTransform
- Overrides:
isIdentity
in classAbstractMathTransform
- Returns:
true
if thisMathTransform
is an identity transform;false
otherwise.
-
hashCode
public int hashCode()Returns a hash code value for this math transform.- Overrides:
hashCode
in classAbstractMathTransform
-
equals
Compares the specified object with this inverse math transform for equality. The default implementation tests ifobject
in an instance of the same class thanthis
, and then test their enclosing math transforms.- Overrides:
equals
in classAbstractMathTransform
- Parameters:
object
- The object to compare with this transform.- Returns:
true
if 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:
formatWKT
in 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:
-