org.geotools.referencing.operation.transform
Class MathTransformProxy

java.lang.Object
  extended by org.geotools.referencing.operation.transform.MathTransformProxy
All Implemented Interfaces:
java.io.Serializable, org.opengis.referencing.operation.MathTransform
Direct Known Subclasses:
MathTransformProvider.Delegate

public class MathTransformProxy
extends java.lang.Object
implements org.opengis.referencing.operation.MathTransform, java.io.Serializable

A math transform which delegates part of its work to an other math transform. This is used as a starting point for subclass wanting to modifies only some aspect of an existing math transform, or to attach additional informations to it. The default implementation delegates all method calls to the underlying transform. Subclasses typically override some of those methods.

This class is serializable if the underlying transform is serializable too.

Since:
2.2
Version:
$Id: MathTransformProxy.java 31549 2008-09-18 13:25:07Z desruisseaux $
Author:
Martin Desruisseaux (IRD)
See Also:
Serialized Form

Field Summary
 org.opengis.referencing.operation.MathTransform transform
          The math transform on which to delegate the work.
 
Constructor Summary
protected MathTransformProxy(org.opengis.referencing.operation.MathTransform transform)
          Creates a new proxy which delegates its work to the specified math transform.
 
Method Summary
 org.opengis.referencing.operation.Matrix derivative(org.opengis.geometry.DirectPosition 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.
 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.
 boolean isIdentity()
          Tests whether this transform does not move any points.
 java.lang.String toString()
          Returns a string representation for this transform.
 java.lang.String toWKT()
          Returns a Well Known Text (WKT) for this transform.
 org.opengis.geometry.DirectPosition transform(org.opengis.geometry.DirectPosition ptSrc, org.opengis.geometry.DirectPosition ptDst)
          Transforms the specified ptSrc and stores the result in ptDst.
 void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
          Transforms a list of coordinate point ordinal values.
 void transform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
          Transforms a list of coordinate point ordinal values.
 void transform(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
          Transforms a list of coordinate point ordinal values.
 void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
          Transforms a list of coordinate point ordinal values.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

transform

public final org.opengis.referencing.operation.MathTransform transform
The math transform on which to delegate the work.

Constructor Detail

MathTransformProxy

protected MathTransformProxy(org.opengis.referencing.operation.MathTransform transform)
Creates a new proxy which delegates its work to the specified math transform.

Parameters:
transform - The transform on which to delegate the work.
Method Detail

getSourceDimensions

public int getSourceDimensions()
Gets the dimension of input points.

Specified by:
getSourceDimensions in interface org.opengis.referencing.operation.MathTransform

getTargetDimensions

public int getTargetDimensions()
Gets the dimension of output points.

Specified by:
getTargetDimensions in interface org.opengis.referencing.operation.MathTransform

transform

public org.opengis.geometry.DirectPosition transform(org.opengis.geometry.DirectPosition ptSrc,
                                                     org.opengis.geometry.DirectPosition ptDst)
                                              throws org.opengis.geometry.MismatchedDimensionException,
                                                     org.opengis.referencing.operation.TransformException
Transforms the specified ptSrc and stores the result in ptDst.

Specified by:
transform in interface org.opengis.referencing.operation.MathTransform
Throws:
org.opengis.geometry.MismatchedDimensionException - if ptSrc or ptDst doesn't have the expected dimension.
org.opengis.referencing.operation.TransformException - if the point can't be transformed.

transform

public void transform(double[] srcPts,
                      int srcOff,
                      double[] dstPts,
                      int dstOff,
                      int numPts)
               throws org.opengis.referencing.operation.TransformException
Transforms a list of coordinate point ordinal values.

Specified by:
transform in interface org.opengis.referencing.operation.MathTransform
Throws:
org.opengis.referencing.operation.TransformException

transform

public void transform(float[] srcPts,
                      int srcOff,
                      float[] dstPts,
                      int dstOff,
                      int numPts)
               throws org.opengis.referencing.operation.TransformException
Transforms a list of coordinate point ordinal values.

Specified by:
transform in interface org.opengis.referencing.operation.MathTransform
Throws:
org.opengis.referencing.operation.TransformException

transform

public void transform(float[] srcPts,
                      int srcOff,
                      double[] dstPts,
                      int dstOff,
                      int numPts)
               throws org.opengis.referencing.operation.TransformException
Transforms a list of coordinate point ordinal values.

Specified by:
transform in interface org.opengis.referencing.operation.MathTransform
Throws:
org.opengis.referencing.operation.TransformException

transform

public void transform(double[] srcPts,
                      int srcOff,
                      float[] dstPts,
                      int dstOff,
                      int numPts)
               throws org.opengis.referencing.operation.TransformException
Transforms a list of coordinate point ordinal values.

Specified by:
transform in interface org.opengis.referencing.operation.MathTransform
Throws:
org.opengis.referencing.operation.TransformException

derivative

public org.opengis.referencing.operation.Matrix derivative(org.opengis.geometry.DirectPosition point)
                                                    throws org.opengis.referencing.operation.TransformException
Gets the derivative of this transform at a point.

Specified by:
derivative in interface org.opengis.referencing.operation.MathTransform
Throws:
org.opengis.referencing.operation.TransformException

inverse

public org.opengis.referencing.operation.MathTransform inverse()
                                                        throws org.opengis.referencing.operation.NoninvertibleTransformException
Returns the inverse of this math transform.

Specified by:
inverse in interface org.opengis.referencing.operation.MathTransform
Throws:
org.opengis.referencing.operation.NoninvertibleTransformException

isIdentity

public boolean isIdentity()
Tests whether this transform does not move any points.

Specified by:
isIdentity in interface org.opengis.referencing.operation.MathTransform

toWKT

public java.lang.String toWKT()
                       throws java.lang.UnsupportedOperationException
Returns a Well Known Text (WKT) for this transform.

Specified by:
toWKT in interface org.opengis.referencing.operation.MathTransform
Throws:
java.lang.UnsupportedOperationException - If this object can't be formatted as WKT.

toString

public java.lang.String toString()
Returns a string representation for this transform.

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Compares the specified object with this inverse math transform for equality.

Overrides:
equals in class java.lang.Object
Parameters:
object - The object to compare with this transform.
Returns:
true if the given object is of the same class and if the wrapped transforms are equal.

hashCode

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

Overrides:
hashCode in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.