|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.referencing.wkt.Formattable
org.geotools.referencing.operation.transform.AbstractMathTransform
org.geotools.referencing.operation.transform.ProjectiveTransform
A usually affine, or otherwise a projective transform. A projective transform is capable of mapping an arbitrary quadrilateral into another arbitrary quadrilateral, while preserving the straightness of lines. In the special case where the transform is affine, the parallelism of lines in the source is preserved in the output.
Such a coordinate transformation can be represented by a square matrix
of an arbitrary size. Point coordinates must have a dimension equals to
Matrix.getNumCol()-1. For example, for square matrix of size 4×4,
coordinate points are three-dimensional. The transformed points (x',y',z') are
computed as below (note that this computation is similar to
PerspectiveTransform in Java Advanced Imaging):
In the special case of an affine transform, the last row contains only zero values except in the last column, which contains 1.[ u ] [ m00 m01 m02 m03 ] [ x ] [ v ] = [ m10 m11 m12 m13 ] [ y ] [ w ] [ m20 m21 m22 m23 ] [ z ] [ t ] [ m30 m31 m32 m33 ] [ 1 ] x' = u/t y' = v/t y' = w/t
PerspectiveTransform,
AffineTransform,
Affine transformation on MathWorld,
Serialized Form| Nested Class Summary | |
static class |
ProjectiveTransform.ProviderAffine
The provider for the "Affine general parametric transformation" (EPSG 9624). |
static class |
ProjectiveTransform.ProviderLongitudeRotation
The provider for the "Longitude rotation" (EPSG 9601). |
| Nested classes inherited from class org.geotools.referencing.operation.transform.AbstractMathTransform |
AbstractMathTransform.Inverse |
| Constructor Summary | |
protected |
ProjectiveTransform(org.opengis.referencing.operation.Matrix matrix)
Constructs a transform from the specified matrix. |
| Method Summary | |
static LinearTransform |
create(java.awt.geom.AffineTransform matrix)
Creates a transform for the specified matrix as a Java2D object. |
static LinearTransform |
create(org.opengis.referencing.operation.Matrix matrix)
Creates a transform for the specified matrix. |
static org.opengis.referencing.operation.Matrix |
createSelectMatrix(int sourceDim,
int[] toKeep)
Creates a matrix that keep only a subset of the ordinate values. |
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 math transform for equality. |
org.opengis.referencing.operation.Matrix |
getMatrix()
Returns a copy of the matrix. |
org.opengis.parameter.ParameterDescriptorGroup |
getParameterDescriptors()
Returns the parameter descriptors for this math transform. |
org.opengis.parameter.ParameterValueGroup |
getParameterValues()
Returns the matrix elements as a group of parameters values. |
int |
getSourceDimensions()
Gets the dimension of input points. |
int |
getTargetDimensions()
Gets the dimension of output points. |
int |
hashCode()
Returns a hash value for this transform. |
org.opengis.referencing.operation.MathTransform |
inverse()
Creates the inverse transform of this object. |
boolean |
isIdentity()
Tests whether this transform does not move any points. |
void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms an array of floating point coordinates by this matrix. |
void |
transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Transforms an array of floating point coordinates by this matrix. |
| Methods inherited from class org.geotools.referencing.operation.transform.AbstractMathTransform |
createTransformedShape, ensureNonNull, formatWKT, getDimSource, getDimTarget, needCopy, rollLongitude, 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 |
protected ProjectiveTransform(org.opengis.referencing.operation.Matrix matrix)
matrix - The matrix.| Method Detail |
public static LinearTransform create(org.opengis.referencing.operation.Matrix matrix)
public static LinearTransform create(java.awt.geom.AffineTransform matrix)
public static org.opengis.referencing.operation.Matrix createSelectMatrix(int sourceDim,
int[] toKeep)
throws java.lang.IndexOutOfBoundsException
sourceDim - the dimension of source coordinates.toKeep - the indices of ordinate values to keep.
create(Matrix)
method in order to create the transform.
java.lang.IndexOutOfBoundsException - if a value of
is lower than 0 or not smaller than .public org.opengis.parameter.ParameterDescriptorGroup getParameterDescriptors()
getParameterDescriptors in class AbstractMathTransformOperationMethod.getParameters()public org.opengis.parameter.ParameterValueGroup getParameterValues()
getParameterValues in class AbstractMathTransformOperation.getParameterValues()
public void transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Matrix.getNumCol()-1. For example,
for square matrix of size 4×4, coordinate points are three-dimensional and
stored in the arrays starting at the specified offset () in the order
[x0, y0, z0,
x1, y1, z1...,
xn, yn, zn].
transform in interface org.opengis.referencing.operation.MathTransformtransform in class AbstractMathTransformsrcPts - The array containing the source point coordinates.srcOff - The offset to the first point to be transformed in the source array.dstPts - The array into which the transformed point coordinates are returned.dstOff - The offset to the location of the first transformed point that is stored
in the destination array. The source and destination array sections can
be overlaps.numPts - The number of points to be transformed
public void transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Matrix.getNumCol()-1. For example,
for square matrix of size 4×4, coordinate points are three-dimensional and
stored in the arrays starting at the specified offset () in the order
[x0, y0, z0,
x1, y1, z1...,
xn, yn, zn].
transform in interface org.opengis.referencing.operation.MathTransformsrcPts - The array containing the source point coordinates.srcOff - The offset to the first point to be transformed in the source array.dstPts - The array into which the transformed point coordinates are returned.dstOff - The offset to the location of the first transformed point that is stored
in the destination array. The source and destination array sections can
be overlaps.numPts - The number of points to be transformedpublic org.opengis.referencing.operation.Matrix derivative(java.awt.geom.Point2D point)
derivative in class AbstractMathTransformpoint - The coordinate point where to evaluate the derivative.
MathTransform2D.derivative(Point2D)public org.opengis.referencing.operation.Matrix derivative(org.opengis.spatialschema.geometry.DirectPosition point)
derivative in interface org.opengis.referencing.operation.MathTransformderivative in class AbstractMathTransformpoint - The coordinate point where to evaluate the derivative.
public org.opengis.referencing.operation.Matrix getMatrix()
getMatrix in interface LinearTransformpublic int getSourceDimensions()
getSourceDimensions in interface org.opengis.referencing.operation.MathTransformgetSourceDimensions in class AbstractMathTransformpublic int getTargetDimensions()
getTargetDimensions in interface org.opengis.referencing.operation.MathTransformgetTargetDimensions in class AbstractMathTransformpublic boolean isIdentity()
isIdentity in interface org.opengis.referencing.operation.MathTransformisIdentity in class AbstractMathTransform
public org.opengis.referencing.operation.MathTransform inverse()
throws org.opengis.referencing.operation.NoninvertibleTransformException
inverse in interface org.opengis.referencing.operation.MathTransforminverse in class AbstractMathTransformorg.opengis.referencing.operation.NoninvertibleTransformExceptionpublic int hashCode()
hashCode in class AbstractMathTransformpublic boolean equals(java.lang.Object object)
equals in class AbstractMathTransform
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||