org.geotools.referencing.operation.transform
Class AbstractMathTransform.Inverse

java.lang.Object
  extended byorg.geotools.referencing.wkt.Formattable
      extended byorg.geotools.referencing.operation.transform.AbstractMathTransform
          extended byorg.geotools.referencing.operation.transform.AbstractMathTransform.Inverse
All Implemented Interfaces:
org.opengis.referencing.operation.MathTransform, java.io.Serializable
Enclosing class:
AbstractMathTransform

protected abstract class AbstractMathTransform.Inverse
extends AbstractMathTransform
implements java.io.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
Version:
$Id: AbstractMathTransform.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.geotools.referencing.operation.transform.AbstractMathTransform
AbstractMathTransform.Inverse
 
Constructor Summary
protected AbstractMathTransform.Inverse()
          Constructs an inverse math transform.
 
Method Summary
 org.opengis.referencing.operation.Matrix derivative(org.opengis.spatialschema.geometry.DirectPosition point)
          Gets the derivative of this transform at a point.
 org.opengis.referencing.operation.Matrix derivative(java.awt.geom.Point2D point)
          Gets the derivative of this transform at a point.
 boolean equals(java.lang.Object object)
          Compares the specified object with this inverse math transform for equality.
protected  java.lang.String formatWKT(Formatter formatter)
          Format the inner part of a Well Known Text (WKT) element.
 int getSourceDimensions()
          Gets the dimension of input points.
 int getTargetDimensions()
          Gets the dimension of output points.
 int hashCode()
          Returns a hash code value for this math transform.
 org.opengis.referencing.operation.MathTransform inverse()
          Returns the inverse of this math transform, which is the enclosing math transform.
 boolean isIdentity()
          Tests whether this transform does not move any points.
 
Methods inherited from class org.geotools.referencing.operation.transform.AbstractMathTransform
createTransformedShape, ensureNonNull, getDimSource, getDimTarget, getParameterDescriptors, getParameterValues, needCopy, rollLongitude, transform, transform, transform
 
Methods inherited from class org.geotools.referencing.wkt.Formattable
toString, toWKT, toWKT, toWKT
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.referencing.operation.MathTransform
toWKT, transform
 

Constructor Detail

AbstractMathTransform.Inverse

protected AbstractMathTransform.Inverse()
Constructs an inverse math transform.

Method Detail

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 interface org.opengis.referencing.operation.MathTransform
Specified by:
getSourceDimensions in class AbstractMathTransform

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 interface org.opengis.referencing.operation.MathTransform
Specified by:
getTargetDimensions in class AbstractMathTransform

derivative

public org.opengis.referencing.operation.Matrix derivative(java.awt.geom.Point2D point)
                                                    throws org.opengis.referencing.operation.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:
derivative in class AbstractMathTransform
Parameters:
point - The coordinate point where to evaluate the derivative.
Returns:
The derivative at the specified point as a 2×2 matrix.
Throws:
org.opengis.referencing.operation.TransformException - if the derivative can't be evaluated at the specified point.
See Also:
MathTransform2D.derivative(Point2D)

derivative

public org.opengis.referencing.operation.Matrix derivative(org.opengis.spatialschema.geometry.DirectPosition point)
                                                    throws org.opengis.referencing.operation.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:
derivative in interface org.opengis.referencing.operation.MathTransform
Overrides:
derivative in class AbstractMathTransform
Parameters:
point - The coordinate point where to evaluate the derivative.
Returns:
The derivative at the specified point (never ).
Throws:
org.opengis.referencing.operation.TransformException - if the derivative can't be evaluated at the specified point.

inverse

public final org.opengis.referencing.operation.MathTransform inverse()
Returns the inverse of this math transform, which is the enclosing math transform. This method is declared final because some implementation assume that the inverse of is always .

Specified by:
inverse in interface org.opengis.referencing.operation.MathTransform
Overrides:
inverse in class AbstractMathTransform

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 interface org.opengis.referencing.operation.MathTransform
Overrides:
isIdentity in class AbstractMathTransform

hashCode

public int hashCode()
Returns a hash code value for this math transform.

Overrides:
hashCode in class AbstractMathTransform

equals

public boolean equals(java.lang.Object object)
Compares the specified object with this inverse math transform for equality. The default implementation tests if in an instance of the same class than , and then test their enclosing math transforms.

Overrides:
equals in class AbstractMathTransform

formatWKT

protected java.lang.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:
formatWKT in class AbstractMathTransform
Parameters:
formatter - The formatter to use.
Returns:
The WKT element name, which is "PARAM_MT" or "INVERSE_MT" in the default implementation.


Copyright © GeoTools. All Rights Reserved.