|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFormattableObject
AbstractMathTransform
IdentityTransform
@Immutable public class IdentityTransform
The identity transform. The data are only copied without any transformation. Instance of this
class are created for identity transform of dimension greater than 2. For 1D and 2D identity
transforms, LinearTransform1D and AffineTransform2D already provide their own
optimizations.
| referencing/geotk-referencing (download) | View source code for this class |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class AbstractMathTransform |
|---|
AbstractMathTransform.Inverse |
| Field Summary |
|---|
| Fields inherited from class FormattableObject |
|---|
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE |
| Constructor Summary | |
|---|---|
protected |
IdentityTransform(int dimension)
Constructs an identity transform of the specified dimension. |
| Method Summary | |
|---|---|
static LinearTransform |
create(int dimension)
Returns an identity transform of the specified dimension. |
Matrix |
derivative(DirectPosition point)
Gets the derivative of this transform at a point. |
boolean |
equals(Object object,
ComparisonMode mode)
Compares the specified object with this math transform for equality. |
Matrix |
getMatrix()
Returns a copy of the identity matrix. |
ParameterDescriptorGroup |
getParameterDescriptors()
Returns the parameter descriptors for this math transform. |
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. |
MathTransform |
inverse()
Returns the inverse transform of this object, which is this transform itself |
boolean |
isIdentity()
Tests whether this transform does not move any points. |
boolean |
isIdentity(double tolerance)
Tests whether this transform does not move any points. |
DirectPosition |
transform(DirectPosition ptSrc,
DirectPosition ptDst)
Copies the values from ptSrc to ptDst. |
protected void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff)
Transforms a single coordinate in a list of ordinal values. |
void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms many coordinates in a list of ordinal values. |
void |
transform(double[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Transforms many coordinates in a list of ordinal values. |
void |
transform(float[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms many coordinates in a list of ordinal values. |
void |
transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Transforms many coordinates in a list of ordinal values. |
| Methods inherited from class AbstractMathTransform |
|---|
computeHashCode, createTransformedShape, derivative, ensureNonNull, equals, formatWKT, getName, hashCode, rollLongitude, transform |
| Methods inherited from class FormattableObject |
|---|
getDefaultIndentation, print, setDefaultIndentation, toString, toWKT, toWKT, toWKT |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface MathTransform |
|---|
toWKT |
| Methods inherited from interface LenientComparable |
|---|
equals |
| Constructor Detail |
|---|
protected IdentityTransform(int dimension)
dimension - The dimension of the transform to be created.create(int)| Method Detail |
|---|
public static LinearTransform create(int dimension)
LinearTransform1D or
AffineTransform2D respectively.
dimension - The dimension of the transform to be returned.
public boolean isIdentity()
true.
isIdentity in interface MathTransformisIdentity in class AbstractMathTransformpublic boolean isIdentity(double tolerance)
true.
isIdentity in interface LinearTransformtolerance - The tolerance factor.
true if this transform is the identity oneMatrixFactory.getMatrix(MathTransform),
XMatrix.isIdentity(double)public int getSourceDimensions()
getSourceDimensions in interface MathTransformgetSourceDimensions in class AbstractMathTransformpublic int getTargetDimensions()
getTargetDimensions in interface MathTransformgetTargetDimensions in class AbstractMathTransformpublic ParameterDescriptorGroup getParameterDescriptors()
getParameterDescriptors in interface ParameterizedgetParameterDescriptors in class AbstractMathTransformnull.OperationMethod.getParameters()public ParameterValueGroup getParameterValues()
getParameterValues in interface ParameterizedgetParameterValues in class AbstractMathTransformSingleOperation.getParameterValues()public Matrix getMatrix()
getMatrix in interface LinearTransformpublic Matrix derivative(DirectPosition point)
derivative in interface MathTransformderivative in class AbstractMathTransformpoint - The coordinate point where to evaluate the derivative.
null).
public DirectPosition transform(DirectPosition ptSrc,
DirectPosition ptDst)
ptSrc to ptDst.
Overrides the super-class method for performance reason.
transform in interface MathTransformtransform in class AbstractMathTransformptSrc - the coordinate point to be transformed.ptDst - the coordinate point that stores the result of transforming ptSrc,
or null.
ptSrc and storing the result
in ptDst, or a newly created point if ptDst was null.
protected void transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff)
transform in class AbstractMathTransformsrcPts - The array containing the source point coordinates.srcOff - The offset to the point to be transformed in the source array.dstPts - the array into which the transformed point coordinate are returned.
May be the same than srcPts.dstOff - The offset to the location of the transformed point that is
stored in the destination array.
public void transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
transform in interface 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.
May be the same than srcPts.dstOff - The offset to the location of the first transformed point that is
stored in the destination array.numPts - The number of point objects to be transformed.
public void transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
transform in interface 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.
May be the same than srcPts.dstOff - The offset to the location of the first transformed point that is
stored in the destination array.numPts - The number of point objects to be transformed.
public void transform(double[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
transform in interface 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.numPts - The number of point objects to be transformed.
public void transform(float[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
transform in interface 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.numPts - The number of point objects to be transformed.public MathTransform inverse()
inverse in interface MathTransforminverse in class AbstractMathTransform
public boolean equals(Object object,
ComparisonMode mode)
true if the following conditions are meet:
object is an instance of the same class than this. We require the
same class because there is no interface for the various kinds of transform.The parameter values are not compared because subclasses can typically compare those values more efficiently by accessing to their member fields.
equals in interface LinearTransformequals in interface LenientComparableequals in class AbstractMathTransformobject - The object to compare with this transform.mode - The strictness level of the comparison. Default to STRICT.
true if the given object is a transform of the same class and if, given
identical source position, the transformed position would be the equals.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||