|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.model.ct.AbstractMathTransform
org.deegree_impl.model.ct.MatrixTransform
Transforms multi-dimensional coordinate points using a Matrix
.
Nested Class Summary | |
(package private) static class |
MatrixTransform.Provider
The provider for MatrixTransform . |
Nested classes inherited from class org.deegree_impl.model.ct.AbstractMathTransform |
AbstractMathTransform.Inverse |
Field Summary | |
private double[] |
elt
Elements of the matrix. |
private int |
numCol
the number of columns. |
private int |
numRow
the number of rows. |
private static long |
serialVersionUID
Serial number for interoperability with different versions. |
Constructor Summary | |
protected |
MatrixTransform(GMatrix matrix)
Construct a transform. |
Method Summary | |
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. |
boolean |
equals(java.lang.Object object)
Compares the specified object with this math transform for equality. |
int |
getDimSource()
Gets the dimension of input points. |
int |
getDimTarget()
Gets the dimension of output points. |
Matrix |
getMatrix()
Returns a copy of the matrix. |
int |
hashCode()
Returns a hash value for this transform. |
MathTransform |
inverse()
Creates the inverse transform of this object. |
boolean |
isIdentity()
Tests whether this transform does not move any points. |
java.lang.String |
toString()
Returns the WKT for this math transform. |
(package private) static java.lang.String |
toString(Matrix matrix)
Returns the WKT for an affine transform using the specified matrix. |
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.deegree_impl.model.ct.AbstractMathTransform |
addParameter, addParameter, createTransformedShape, createTransformedShape, getName, paramMT, toOpenGIS, transform, transform |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
private final int numRow
private final int numCol
private final double[] elt
Constructor Detail |
protected MatrixTransform(GMatrix matrix)
Method Detail |
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 (srcOff
) in the order
[x0, y0, z0,
x1, y1, z1...,
xn, yn, zn]
.
The transformed points (x',y',z')
are computed as below
(note that this computation is similar to PerspectiveTransform
):
[ 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
transform
in interface MathTransform
transform
in class AbstractMathTransform
srcPts
- 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 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 (srcOff
) in the order
[x0, y0, z0,
x1, y1, z1...,
xn, yn, zn]
.
The transformed points (x',y',z')
are computed as below
(note that this computation is similar to PerspectiveTransform
):
[ 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
transform
in interface MathTransform
srcPts
- 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 Matrix derivative(java.awt.geom.Point2D point)
derivative
in class AbstractMathTransform
point
- The coordinate point where to evaluate the derivative.
MathTransform2D.derivative(Point2D)
public Matrix derivative(CoordinatePoint point)
derivative
in interface MathTransform
derivative
in class AbstractMathTransform
point
- The coordinate point where to evaluate the derivative.
null
).public Matrix getMatrix()
public int getDimSource()
getDimSource
in interface MathTransform
CT_MathTransform.getDimSource()
public int getDimTarget()
getDimTarget
in interface MathTransform
CT_MathTransform.getDimTarget()
public boolean isIdentity()
isIdentity
in interface MathTransform
true
if this MathTransform
is
an identity transform; false
otherwise.public MathTransform inverse() throws NoninvertibleTransformException
inverse
in interface MathTransform
inverse
in class AbstractMathTransform
NoninvertibleTransformException
public int hashCode()
hashCode
in class AbstractMathTransform
public boolean equals(java.lang.Object object)
equals
in class AbstractMathTransform
public java.lang.String toString()
toString
in class AbstractMathTransform
static java.lang.String toString(Matrix matrix)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |