|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.referencing.wkt.Formattable
org.geotools.referencing.operation.transform.AbstractMathTransform
org.geotools.referencing.operation.transform.ConcatenatedTransform
public class ConcatenatedTransform
Base class for concatenated transform. Concatenated transforms are serializable if all their step transforms are serializables.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.geotools.referencing.operation.transform.AbstractMathTransform |
---|
AbstractMathTransform.Inverse |
Field Summary | |
---|---|
org.opengis.referencing.operation.MathTransform |
transform1
The first math transform. |
org.opengis.referencing.operation.MathTransform |
transform2
The second math transform. |
Fields inherited from class org.geotools.referencing.wkt.Formattable |
---|
SINGLE_LINE |
Constructor Summary | |
---|---|
protected |
ConcatenatedTransform(org.opengis.referencing.operation.MathTransform transform1,
org.opengis.referencing.operation.MathTransform transform2)
Constructs a concatenated transform. |
Method Summary | |
---|---|
static org.opengis.referencing.operation.MathTransform |
create(org.opengis.referencing.operation.MathTransform tr1,
org.opengis.referencing.operation.MathTransform tr2)
Constructs a concatenated transform. |
org.opengis.referencing.operation.Matrix |
derivative(org.opengis.geometry.DirectPosition point)
Gets the derivative of this transform at a point. |
org.opengis.referencing.operation.Matrix |
derivative(java.awt.geom.Point2D point)
Gets the derivative of this transform at a point. |
boolean |
equals(java.lang.Object object)
Compares the specified object with this math transform for equality. |
protected java.lang.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. |
org.opengis.referencing.operation.MathTransform |
inverse()
Creates the inverse transform of this object. |
boolean |
isIdentity()
Tests whether this transform does not move any points. |
org.opengis.geometry.DirectPosition |
transform(org.opengis.geometry.DirectPosition ptSrc,
org.opengis.geometry.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 org.geotools.referencing.operation.transform.AbstractMathTransform |
---|
createTransformedShape, ensureNonNull, getName, getParameterDescriptors, getParameterValues, needCopy, rollLongitude, transform, transform, transform |
Methods inherited from class org.geotools.referencing.wkt.Formattable |
---|
cleanupThreadLocals, toString, toWKT, toWKT, toWKT |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opengis.referencing.operation.MathTransform |
---|
toWKT |
Field Detail |
---|
public final org.opengis.referencing.operation.MathTransform transform1
public final org.opengis.referencing.operation.MathTransform transform2
Constructor Detail |
---|
protected ConcatenatedTransform(org.opengis.referencing.operation.MathTransform transform1, org.opengis.referencing.operation.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 org.opengis.referencing.operation.MathTransform create(org.opengis.referencing.operation.MathTransform tr1, org.opengis.referencing.operation.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 org.opengis.referencing.operation.MathTransform
getSourceDimensions
in class AbstractMathTransform
public final int getTargetDimensions()
getTargetDimensions
in interface org.opengis.referencing.operation.MathTransform
getTargetDimensions
in class AbstractMathTransform
public final int getStepCount()
public org.opengis.geometry.DirectPosition transform(org.opengis.geometry.DirectPosition ptSrc, org.opengis.geometry.DirectPosition ptDst) throws org.opengis.referencing.operation.TransformException
ptSrc
and stores the result in ptDst
.
transform
in interface org.opengis.referencing.operation.MathTransform
transform
in class AbstractMathTransform
org.opengis.referencing.operation.TransformException
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.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 org.opengis.referencing.operation.MathTransform
org.opengis.referencing.operation.TransformException
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.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 org.opengis.referencing.operation.MathTransform
transform
in class AbstractMathTransform
org.opengis.referencing.operation.TransformException
public org.opengis.referencing.operation.MathTransform inverse() throws org.opengis.referencing.operation.NoninvertibleTransformException
inverse
in interface org.opengis.referencing.operation.MathTransform
inverse
in class AbstractMathTransform
org.opengis.referencing.operation.NoninvertibleTransformException
public org.opengis.referencing.operation.Matrix derivative(java.awt.geom.Point2D point) throws org.opengis.referencing.operation.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.
org.opengis.referencing.operation.TransformException
- if the derivative can't be evaluated at the specified point.MathTransform2D.derivative(Point2D)
public org.opengis.referencing.operation.Matrix derivative(org.opengis.geometry.DirectPosition point) throws org.opengis.referencing.operation.TransformException
derivative
in interface org.opengis.referencing.operation.MathTransform
derivative
in class AbstractMathTransform
point
- The coordinate point where to evaluate the derivative.
null
).
org.opengis.referencing.operation.TransformException
- if the derivative can't be evaluated at the specified point.public final boolean isIdentity()
isIdentity
in interface org.opengis.referencing.operation.MathTransform
isIdentity
in class AbstractMathTransform
public final int hashCode()
hashCode
in class AbstractMathTransform
public final boolean equals(java.lang.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 java.lang.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 |