|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectFormattable
AbstractMathTransform
PassThroughTransform
public class PassThroughTransform
Transform which passes through a subset of ordinates to another transform. This allows transforms to operate on a subset of ordinates. For example, if you have (latitude,longitude,height) coordinates, then you may wish to convert the height values from feet to meters without affecting the latitude and longitude values.
DimensionFilter
,
Serialized Form
Nested Class Summary |
---|
Nested classes/interfaces inherited from class AbstractMathTransform |
---|
AbstractMathTransform.Inverse |
Field Summary | |
---|---|
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. |
Fields inherited from class Formattable |
---|
SINGLE_LINE |
Constructor Summary | |
---|---|
protected |
PassThroughTransform(int firstAffectedOrdinate,
MathTransform subTransform,
int numTrailingOrdinates)
Create a pass through transform. |
Method Summary | |
---|---|
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. |
Methods inherited from class AbstractMathTransform |
---|
createTransformedShape, derivative, ensureNonNull, getName, getParameterDescriptors, getParameterValues, needCopy, rollLongitude, transform, transform, transform, transform |
Methods inherited from class Formattable |
---|
toString, toWKT, toWKT, toWKT |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface MathTransform |
---|
toWKT |
Field Detail |
---|
protected final int firstAffectedOrdinate
protected final int numTrailingOrdinates
protected final MathTransform subTransform
getSubTransform()
Constructor Detail |
---|
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.Method Detail |
---|
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
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws TransformException
transform
in interface MathTransform
transform
in class AbstractMathTransform
TransformException
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws TransformException
transform
in interface MathTransform
TransformException
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
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |