public class PassThroughTransform extends AbstractMathTransform implements Serializable
DimensionFilter
,
Serialized FormAbstractMathTransform.Inverse
Modifier and Type | Field and Description |
---|---|
protected int |
firstAffectedOrdinate
Index of the first affected ordinate.
|
protected int |
numTrailingOrdinates
Number of unaffected ordinates after the affected ones.
|
protected MathTransform |
subTransform
The sub transform.
|
SINGLE_LINE
Modifier | Constructor and Description |
---|---|
protected |
PassThroughTransform(int firstAffectedOrdinate,
MathTransform subTransform,
int numTrailingOrdinates)
Create a pass through transform.
|
Modifier and Type | Method and Description |
---|---|
static MathTransform |
create(int firstAffectedOrdinate,
MathTransform subTransform,
int numTrailingOrdinates)
Creates a transform which passes through a subset of ordinates to another transform.
|
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.
|
protected String |
formatWKT(Formatter formatter)
Format the inner part of a Well
Known Text (WKT) element.
|
int[] |
getModifiedCoordinates()
Ordered sequence of positive integers defining the positions in a coordinate tuple of the
coordinates affected by this pass-through transform.
|
int |
getSourceDimensions()
Gets the dimension of input points.
|
MathTransform |
getSubTransform()
Returns the sub transform.
|
int |
getTargetDimensions()
Gets the dimension of output points.
|
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.
|
void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms a list of coordinate point ordinal values.
|
void |
transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Transforms a list of coordinate point ordinal values.
|
createTransformedShape, derivative, ensureNonNull, getName, getParameterDescriptors, getParameterValues, needCopy, normalizeAngle, rollLongitude, transform, transform, transform, transform
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
toWKT
protected final int firstAffectedOrdinate
protected final int numTrailingOrdinates
protected final MathTransform subTransform
getSubTransform()
protected PassThroughTransform(int firstAffectedOrdinate, MathTransform subTransform, int numTrailingOrdinates)
firstAffectedOrdinate
- Index of the first affected ordinate.subTransform
- The sub transform.numTrailingOrdinates
- Number of trailing ordinates to pass through. Affected ordinates
will range from firstAffectedOrdinate
inclusive to dimTarget-numTrailingOrdinates
exclusive.public static MathTransform create(int firstAffectedOrdinate, MathTransform subTransform, int numTrailingOrdinates)
firstAffectedOrdinate
- Index of the first affected ordinate.subTransform
- The sub transform.numTrailingOrdinates
- Number of trailing ordinates to pass through. Affected ordinates
will range from firstAffectedOrdinate
inclusive to dimTarget-numTrailingOrdinates
exclusive.Source: firstAffectedOrdinate + subTransform.getSourceDimensions() + numTrailingOrdinates Target: firstAffectedOrdinate + subTransform.getTargetDimensions() + numTrailingOrdinates
public MathTransform getSubTransform()
public int[] getModifiedCoordinates()
public int getSourceDimensions()
getSourceDimensions
in interface MathTransform
getSourceDimensions
in class AbstractMathTransform
public int getTargetDimensions()
getTargetDimensions
in interface MathTransform
getTargetDimensions
in class AbstractMathTransform
public boolean isIdentity()
isIdentity
in interface MathTransform
isIdentity
in class AbstractMathTransform
true
if this MathTransform
is an identity transform; false
otherwise.public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws TransformException
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.TransformException
- if a point can't be transformed. Some implementations will stop at
the first failure, wile some other implementations will fill the untransformable points
with NaN values, continue and throw the exception only at end.
Implementations that fall in the later case should set the last completed transform to this
.public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws TransformException
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.TransformException
- if a point can't be transformed. Some implementations will stop at
the first failure, wile some other implementations will fill the untransformable points
with NaN values, continue and throw the exception only at end.
Implementations that fall in the later case should set the last completed transform to this
.public Matrix derivative(DirectPosition point) throws TransformException
derivative
in interface MathTransform
derivative
in class AbstractMathTransform
point
- The coordinate point where to evaluate the derivative.null
).TransformException
- if the derivative can't be evaluated at the specified point.public MathTransform inverse() throws NoninvertibleTransformException
inverse
in interface MathTransform
inverse
in class AbstractMathTransform
NoninvertibleTransformException
- if the transform can't be inversed.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.protected String formatWKT(Formatter formatter)
formatWKT
in class AbstractMathTransform
formatter
- The formatter to use.Formattable.toWKT()
,
Formattable.toString()
Copyright © 1996–2019 Geotools. All rights reserved.