|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectFormattable
AbstractMathTransform
ConcatenatedTransform
public class ConcatenatedTransform
Base class for concatenated transform. Concatenated transforms are serializable if all their step transforms are serializables.
modules/library/referencing (gt-referencing.jar)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class AbstractMathTransform |
---|
AbstractMathTransform.Inverse |
Field Summary | |
---|---|
MathTransform |
transform1
The first math transform. |
MathTransform |
transform2
The second math transform. |
Fields inherited from class Formattable |
---|
SINGLE_LINE |
Constructor Summary | |
---|---|
protected |
ConcatenatedTransform(MathTransform transform1,
MathTransform transform2)
Constructs a concatenated transform. |
Method Summary | |
---|---|
static MathTransform |
create(MathTransform tr1,
MathTransform tr2)
Constructs a concatenated transform. |
Matrix |
derivative(DirectPosition point)
Gets the derivative of this transform at a point. |
Matrix |
derivative(Point2D 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 |
getSourceDimensions()
Gets the dimension of input points. |
int |
getStepCount()
Returns the number of math transform steps performed by this concatenated 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. |
DirectPosition |
transform(DirectPosition ptSrc,
DirectPosition ptDst)
Transforms the specified ptSrc and stores the result in ptDst . |
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, ensureNonNull, getName, getParameterDescriptors, getParameterValues, needCopy, rollLongitude, transform, transform, transform |
Methods inherited from class Formattable |
---|
cleanupThreadLocals, 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 |
---|
public final MathTransform transform1
public final MathTransform transform2
Constructor Detail |
---|
protected ConcatenatedTransform(MathTransform transform1, MathTransform transform2)
create(org.opengis.referencing.operation.MathTransform, org.opengis.referencing.operation.MathTransform)
instead.
transform1
- The first math transform.transform2
- The second math transform.Method Detail |
---|
public static MathTransform create(MathTransform tr1, MathTransform tr2)
MathTransform2D
if source and
target dimensions are equal to 2. Likewise, it will implements MathTransform1D
if source and target dimensions are equal to 1. MathTransform
implementations
are available in two version: direct and non-direct. The "non-direct" version use an
intermediate buffer when performing transformations; they are slower and consume more
memory. They are used only as a fallback when a "direct" version can't be created.
tr1
- The first math transform.tr2
- The second math transform.
public final int getSourceDimensions()
getSourceDimensions
in interface MathTransform
getSourceDimensions
in class AbstractMathTransform
public final int getTargetDimensions()
getTargetDimensions
in interface MathTransform
getTargetDimensions
in class AbstractMathTransform
public final int getStepCount()
public DirectPosition transform(DirectPosition ptSrc, DirectPosition ptDst) throws TransformException
ptSrc
and stores the result in ptDst
.
transform
in interface MathTransform
transform
in class AbstractMathTransform
TransformException
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws TransformException
transform1
, then the intermediate points are transformed
by transform2
. The transformations are performed without intermediate
buffer if it can be avoided.
transform
in interface MathTransform
TransformException
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws TransformException
double[]
, transformed by transform1
first,
then by transform2
and finally the result is casted to float
primitive
type and stored in the destination array. The use of double
primitive type for
intermediate results is necesssary for reducing rounding errors.
transform
in interface MathTransform
transform
in class AbstractMathTransform
TransformException
public MathTransform inverse() throws NoninvertibleTransformException
inverse
in interface MathTransform
inverse
in class AbstractMathTransform
NoninvertibleTransformException
public Matrix derivative(Point2D point) throws TransformException
derivative(DirectPosition)
method because the transformation steps
transform1
and transform2
may not be instances of
MathTransform2D
.
derivative
in class AbstractMathTransform
point
- The coordinate point where to evaluate the derivative.
TransformException
- if the derivative can't be evaluated at the specified point.MathTransform2D.derivative(Point2D)
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 final boolean isIdentity()
isIdentity
in interface MathTransform
isIdentity
in class AbstractMathTransform
public final int hashCode()
hashCode
in class AbstractMathTransform
public final 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 |