org.deegree_impl.model.ct
Class AffineTransform2D

java.lang.Object
  extended byjava.awt.geom.AffineTransform
      extended byorg.deegree_impl.model.resources.XAffineTransform
          extended byorg.deegree_impl.model.ct.AffineTransform2D
All Implemented Interfaces:
java.lang.Cloneable, MathTransform, MathTransform2D, java.io.Serializable

final class AffineTransform2D
extends XAffineTransform
implements MathTransform2D

Transforms two-dimensional coordinate points using an AffineTransform.

Version:
1.00
Author:
Martin Desruisseaux

Field Summary
private  AffineTransform2D inverse
          The inverse transform.
private static long serialVersionUID
          Serial number for interoperability with different versions.
 
Fields inherited from class org.deegree_impl.model.resources.XAffineTransform
 
Fields inherited from class java.awt.geom.AffineTransform
TYPE_FLIP, TYPE_GENERAL_ROTATION, TYPE_GENERAL_SCALE, TYPE_GENERAL_TRANSFORM, TYPE_IDENTITY, TYPE_MASK_ROTATION, TYPE_MASK_SCALE, TYPE_QUADRANT_ROTATION, TYPE_TRANSLATION, TYPE_UNIFORM_SCALE
 
Constructor Summary
protected AffineTransform2D(java.awt.geom.AffineTransform transform)
          Construct an affine transform.
 
Method Summary
protected  void checkPermission()
          Throws an UnsupportedOperationException when a mutable method is invoked, since AffineTransform2D must be immutable.
 Matrix derivative(CoordinatePoint point)
          Gets the derivative of this transform at a point.
 Matrix derivative(java.awt.geom.Point2D point)
          Gets the derivative of this transform at a point.
 int getDimSource()
          Gets the dimension of input points.
 int getDimTarget()
          Gets the dimension of output points.
 MathTransform inverse()
          Creates the inverse transform of this object.
 java.lang.String toString()
          Returns the WKT for this affine transform.
 CoordinatePoint transform(CoordinatePoint ptSrc, CoordinatePoint ptDst)
          Transforms the specified ptSrc and stores the result in ptDst.
 
Methods inherited from class org.deegree_impl.model.resources.XAffineTransform
concatenate, getScaleInstance, getScaleX0, getScaleY0, inverseDeltaTransform, inverseTransform, preConcatenate, rotate, rotate, round, scale, setToIdentity, setToRotation, setToRotation, setToScale, setToShear, setToTranslation, setTransform, setTransform, shear, transform, translate
 
Methods inherited from class java.awt.geom.AffineTransform
clone, createInverse, createTransformedShape, deltaTransform, deltaTransform, equals, getDeterminant, getMatrix, getRotateInstance, getRotateInstance, getScaleInstance, getScaleX, getScaleY, getShearInstance, getShearX, getShearY, getTranslateInstance, getTranslateX, getTranslateY, getType, hashCode, inverseTransform, inverseTransform, isIdentity, transform, transform, transform, transform, transform, transform
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree_impl.model.ct.MathTransform2D
createTransformedShape, transform
 
Methods inherited from interface org.deegree_impl.model.ct.MathTransform
isIdentity, transform, transform
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial number for interoperability with different versions.

See Also:
Constant Field Values

inverse

private transient AffineTransform2D inverse
The inverse transform. This field will be computed only when needed.

Constructor Detail

AffineTransform2D

protected AffineTransform2D(java.awt.geom.AffineTransform transform)
Construct an affine transform.

Method Detail

checkPermission

protected void checkPermission()
Throws an UnsupportedOperationException when a mutable method is invoked, since AffineTransform2D must be immutable.

Specified by:
checkPermission in class XAffineTransform

getDimSource

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

Specified by:
getDimSource in interface MathTransform
See Also:
CT_MathTransform.getDimSource()

getDimTarget

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

Specified by:
getDimTarget in interface MathTransform
See Also:
CT_MathTransform.getDimTarget()

transform

public CoordinatePoint transform(CoordinatePoint ptSrc,
                                 CoordinatePoint ptDst)
Transforms the specified ptSrc and stores the result in ptDst.

Specified by:
transform in interface MathTransform
Parameters:
ptSrc - the specified coordinate point to be transformed.
ptDst - the specified coordinate point that stores the result of transforming ptSrc, or null.
Returns:
the coordinate point after transforming ptSrc and storing the result in ptDst, or a newly created point if ptDst was null.

derivative

public Matrix derivative(java.awt.geom.Point2D point)
Gets the derivative of this transform at a point. For an affine transform, the derivative is the same everywhere.

Specified by:
derivative in interface MathTransform2D
Parameters:
point - The coordinate point where to evaluate the derivative. Null value is accepted only if the derivative is the same everywhere. For example affine transform accept null value since they produces identical derivative no matter the coordinate value. But most map projection will requires a non-null value.
Returns:
The derivative at the specified point as a 2×2 matrix. This method never returns an internal object: changing the matrix will not change the state of this math transform.

derivative

public Matrix derivative(CoordinatePoint point)
Gets the derivative of this transform at a point. For an affine transform, the derivative is the same everywhere.

Specified by:
derivative in interface MathTransform
Parameters:
point - The coordinate point where to evaluate the derivative. Null value is accepted only if the derivative is the same everywhere. For example affine transform accept null value since they produces identical derivative no matter the coordinate value. But most map projection will requires a non-null value.
Returns:
The derivative at the specified point (never null). This method never returns an internal object: changing the matrix will not change the state of this math transform.

inverse

public MathTransform inverse()
                      throws NoninvertibleTransformException
Creates the inverse transform of this object.

Specified by:
inverse in interface MathTransform
Returns:
The inverse transform.
Throws:
NoninvertibleTransformException - if the transform can't be inversed.

toString

public java.lang.String toString()
Returns the WKT for this affine transform.