public class IdentityTransform extends AbstractMathTransform implements LinearTransform, Serializable
LinearTransform1D
and AffineTransform
already provide their own
optimisations.AbstractMathTransform.Inverse
SINGLE_LINE
Modifier | Constructor and Description |
---|---|
protected |
IdentityTransform(int dimension)
Constructs an identity transform of the specified dimension.
|
Modifier and Type | Method and Description |
---|---|
static LinearTransform |
create(int dimension)
Constructs an identity transform of the specified dimension.
|
Matrix |
derivative(DirectPosition point)
Gets the derivative of this transform at a point.
|
boolean |
equals(Object object)
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.
|
int |
hashCode()
Returns a hash value for this transform.
|
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 . |
void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms an array of floating point coordinates by this transform.
|
void |
transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Transforms an array of floating point coordinates by this transform.
|
createTransformedShape, derivative, ensureNonNull, formatWKT, getName, needCopy, normalizeAngle, rollLongitude, transform, transform, transform
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
toWKT, transform, transform
protected IdentityTransform(int dimension)
public static LinearTransform create(int dimension)
public boolean isIdentity()
true
.isIdentity
in interface MathTransform
isIdentity
in class AbstractMathTransform
true
if this MathTransform
is an identity transform; false
otherwise.public boolean isIdentity(double tolerance)
true
.isIdentity
in interface LinearTransform
tolerance
- The tolerance factor.true
if this transform is the identity onepublic int getSourceDimensions()
getSourceDimensions
in interface MathTransform
getSourceDimensions
in class AbstractMathTransform
public int getTargetDimensions()
getTargetDimensions
in interface MathTransform
getTargetDimensions
in class AbstractMathTransform
public ParameterDescriptorGroup getParameterDescriptors()
getParameterDescriptors
in class AbstractMathTransform
null
.OperationMethod.getParameters()
public ParameterValueGroup getParameterValues()
getParameterValues
in class AbstractMathTransform
Operation.getParameterValues()
public Matrix getMatrix()
getMatrix
in interface LinearTransform
public Matrix derivative(DirectPosition point)
derivative
in interface MathTransform
derivative
in class AbstractMathTransform
point
- 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 MathTransform
transform
in class AbstractMathTransform
ptSrc
- the specified coordinate point to be transformed.ptDst
- the specified 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.public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
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. 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, double[] dstPts, int dstOff, int numPts)
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. 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 MathTransform inverse()
inverse
in interface MathTransform
inverse
in class AbstractMathTransform
public int hashCode()
hashCode
in class AbstractMathTransform
public boolean equals(Object object)
equals
in class AbstractMathTransform
object
- The object to compare with this transform.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.Copyright © 1996–2019 Geotools. All rights reserved.