|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.vecmath.GMatrix org.geotools.referencing.operation.matrix.GeneralMatrix
A two dimensional array of numbers. Row and column numbering begins with zero.
GMatrix
,
AffineTransform
,
PerspectiveTransform
,
javax.media.j3d.Transform3D
,
Jama matrix,
JSR-83 Multiarray package,
Serialized FormConstructor Summary | |
GeneralMatrix(java.awt.geom.AffineTransform transform)
Constructs a 3×3 matrix from the specified affine transform. |
|
GeneralMatrix(org.opengis.referencing.cs.AxisDirection[] srcAxis,
org.opengis.referencing.cs.AxisDirection[] dstAxis)
Constructs a transform changing axis order and/or direction. |
|
GeneralMatrix(double[][] matrix)
Constructs a new matrix from a two-dimensional array of doubles. |
|
GeneralMatrix(org.opengis.spatialschema.geometry.Envelope srcRegion,
org.opengis.referencing.cs.AxisDirection[] srcAxis,
org.opengis.spatialschema.geometry.Envelope dstRegion,
org.opengis.referencing.cs.AxisDirection[] dstAxis)
Constructs a transform mapping a source region to a destination region. |
|
GeneralMatrix(org.opengis.spatialschema.geometry.Envelope srcRegion,
org.opengis.spatialschema.geometry.Envelope dstRegion)
Constructs a transform that maps a source region to a destination region. |
|
GeneralMatrix(javax.vecmath.GMatrix matrix)
Constructs a new matrix and copies the initial values from the parameter matrix. |
|
GeneralMatrix(int size)
Constructs a square identity matrix of size × . |
|
GeneralMatrix(int numRow,
int numCol)
Creates a matrix of size × . |
|
GeneralMatrix(int numRow,
int numCol,
double[] matrix)
Constructs a × matrix initialized to the values in the array. |
|
GeneralMatrix(org.opengis.referencing.operation.Matrix matrix)
Constructs a new matrix and copies the initial values from the parameter matrix. |
Method Summary | |
double[][] |
getElements()
Retrieves the specifiable values in the transformation matrix into a 2-dimensional array of double precision values. |
static double[][] |
getElements(org.opengis.referencing.operation.Matrix matrix)
Retrieves the specifiable values in the transformation matrix into a 2-dimensional array of double precision values. |
boolean |
isAffine()
Returns if this matrix is an affine transform. A transform is affine if the matrix is square and last row contains only zeros, except in the last column which contains 1. |
boolean |
isIdentity()
Returns if this matrix is an identity matrix. |
static GeneralMatrix |
load(java.io.BufferedReader in,
java.util.Locale locale)
Loads data from the specified streal until the first blank line or end of stream. |
static GeneralMatrix |
load(java.io.File file)
Loads data from the specified file until the first blank line or end of file. |
void |
multiply(org.opengis.referencing.operation.Matrix matrix)
Sets the value of this matrix to the result of multiplying itself with the specified matrix. In other words, performs = × . In the context of coordinate transformations, this is equivalent to AffineTransform.concatenate :
first transforms by the supplied transform and then transform the result by the original
transform. |
java.awt.geom.AffineTransform |
toAffineTransform2D()
Returns an affine transform for this matrix. |
java.lang.String |
toString()
Returns a string representation of this matrix. |
Methods inherited from class javax.vecmath.GMatrix |
add, add, clone, copySubMatrix, epsilonEquals, epsilonEquals, equals, equals, get, get, get, get, get, getColumn, getColumn, getElement, getNumCol, getNumRow, getRow, getRow, hashCode, identityMinus, invert, invert, LUD, mul, mul, mul, mulTransposeBoth, mulTransposeLeft, mulTransposeRight, negate, negate, set, set, set, set, set, set, setColumn, setColumn, setElement, setIdentity, setRow, setRow, setScale, setSize, setZero, sub, sub, SVD, trace, transpose, transpose |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.geotools.referencing.operation.matrix.XMatrix |
invert, negate, setIdentity, setZero, transpose |
Methods inherited from interface org.opengis.referencing.operation.Matrix |
clone, getElement, getNumCol, getNumRow, setElement |
Constructor Detail |
public GeneralMatrix(int size)
public GeneralMatrix(int numRow, int numCol)
public GeneralMatrix(int numRow, int numCol, double[] matrix)
numRow*numCol
in length. Note that because row and column
numbering begins with zero, and will be
one larger than the maximum possible matrix index values.
public GeneralMatrix(double[][] matrix) throws java.lang.IllegalArgumentException
matrix
- Array of rows. Each row must have the same length.
java.lang.IllegalArgumentException
- if the specified matrix is not regular
(i.e. if all rows doesn't have the same length).public GeneralMatrix(org.opengis.referencing.operation.Matrix matrix)
public GeneralMatrix(javax.vecmath.GMatrix matrix)
public GeneralMatrix(java.awt.geom.AffineTransform transform)
public GeneralMatrix(org.opengis.spatialschema.geometry.Envelope srcRegion, org.opengis.spatialschema.geometry.Envelope dstRegion)
If the source dimension is equals to the destination dimension, then the transform is affine. However, the following special cases are also handled:
srcRegion
- The source region.dstRegion
- The destination region.public GeneralMatrix(org.opengis.referencing.cs.AxisDirection[] srcAxis, org.opengis.referencing.cs.AxisDirection[] dstAxis)
If the source dimension is equals to the destination dimension, then the transform is affine. However, the following special cases are also handled:
srcAxis
- The set of axis direction for source coordinate system.dstAxis
- The set of axis direction for destination coordinate system.
java.lang.IllegalArgumentException
- If contains some axis
not found in , or if some colinear axis were found.public GeneralMatrix(org.opengis.spatialschema.geometry.Envelope srcRegion, org.opengis.referencing.cs.AxisDirection[] srcAxis, org.opengis.spatialschema.geometry.Envelope dstRegion, org.opengis.referencing.cs.AxisDirection[] dstAxis)
If the source dimension is equals to the destination dimension, then the transform is affine. However, the following special cases are also handled:
srcRegion
- The source region.srcAxis
- Axis direction for each dimension of the source region.dstRegion
- The destination region.dstAxis
- Axis direction for each dimension of the destination region.
org.opengis.spatialschema.geometry.MismatchedDimensionException
- if the envelope dimension doesn't
matches the axis direction array length.
java.lang.IllegalArgumentException
- If contains some axis
not found in , or if some colinear axis were found.Method Detail |
public static double[][] getElements(org.opengis.referencing.operation.Matrix matrix)
public final double[][] getElements()
public final boolean isAffine()
isAffine
in interface XMatrix
public final boolean isIdentity()
isIdentity
in interface org.opengis.referencing.operation.Matrix
public final void multiply(org.opengis.referencing.operation.Matrix matrix)
AffineTransform.concatenate
:
first transforms by the supplied transform and then transform the result by the original
transform.
multiply
in interface XMatrix
public final java.awt.geom.AffineTransform toAffineTransform2D() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if this matrix is not 3×3,
or if the last row is not .public static GeneralMatrix load(java.io.File file) throws java.io.IOException
file
- The file to read.
java.io.IOException
- if an error occured while reading the file.public static GeneralMatrix load(java.io.BufferedReader in, java.util.Locale locale) throws java.io.IOException
in
- The stream to read.locale
- The locale for the numbers to be parsed.
java.io.IOException
- if an error occured while reading the stream.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |