|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAffineTransform
AffineTransform2D
public class AffineTransform2D
A MathTransform2D backed by the Java2D AffineTransform.
Affine transforms are very commons in GIS - they can be used for scaling, flipping the y axis, applying unit conversions, etc.. The standard Java2D library provides an efficient general-purpose implementation of affine transform. This class extends the Java2D class for efficiency and for inter-operability with Java2D.
This affine transform is a special case of ProjectiveTransform restricted to
the following cases:
| Field Summary |
|---|
| Fields inherited from class 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 | |
|---|---|
AffineTransform2D()
Creates a new transform initialized to the identity transform. |
|
AffineTransform2D(AffineTransform tr)
Creates a new transform initialized to the values of the given transform. |
|
| Method Summary | |
|---|---|
Matrix |
derivative(DirectPosition point)
Gets the derivative of this transform at a point. |
Matrix |
derivative(Point2D point)
Gets the derivative of this transform at a point. |
int |
getSourceDimensions()
Returns the source dimension, which is 2. |
int |
getTargetDimensions()
Returns the target dimension, which is 2. |
MathTransform2D |
inverse()
Returns the inverse of this affine transform. |
void |
setTransform(Matrix matrix)
Sets this affine transform to the values of the given matrix. |
String |
toWKT()
Unsupported operation. |
DirectPosition |
transform(DirectPosition ptSrc,
DirectPosition ptDst)
Transforms the specified ptSrc and stores the result in ptDst. |
| Methods inherited from class Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface MathTransform2D |
|---|
createTransformedShape, transform |
| Methods inherited from interface MathTransform |
|---|
isIdentity, transform, transform, transform, transform |
| Constructor Detail |
|---|
public AffineTransform2D()
public AffineTransform2D(AffineTransform tr)
tr - The transform to copy.| Method Detail |
|---|
public void setTransform(Matrix matrix)
throws IllegalArgumentException
matrix - The matrix to copy in this affine transform.
IllegalArgumentException - If the matrix size is not 3×3, or the transform is not affine.public final int getSourceDimensions()
getSourceDimensions in interface MathTransformpublic final int getTargetDimensions()
getTargetDimensions in interface MathTransform
public DirectPosition transform(DirectPosition ptSrc,
DirectPosition ptDst)
throws MismatchedDimensionException
ptSrc and stores the result in ptDst.
This method delegates its work to AffineTransform.transform(Point2D, Point2D).
transform in interface MathTransformptSrc - the coordinate point to be transformed.ptDst - the coordinate point that stores the transform result, or null.
ptSrc and storing the result
in ptDst, or a newly created point if ptDst was null.
MismatchedDimensionException - if ptSrc or ptDst doesn't have
exactly 2 dimensions.
public Matrix derivative(DirectPosition point)
throws MismatchedDimensionException
derivative(Point2D).
derivative in interface MathTransformpoint - Ignored (except for the dimension, which is checked as a matter of principle).
null).
MismatchedDimensionException - if point doesn't have the expected dimension.public Matrix derivative(Point2D point)
derivative in interface MathTransform2Dpoint - Ignored - may be null.
null).
public MathTransform2D inverse()
throws NoninvertibleTransformException
inverse in interface MathTransforminverse in interface MathTransform2DNoninvertibleTransformException
public String toWKT()
throws UnsupportedOperationException
toWKT in interface MathTransformUnsupportedOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||