public class MathTransformProxy extends Object implements MathTransform, Serializable
This class is serializable if the underlying transform is serializable too.
Modifier and Type | Field and Description |
---|---|
MathTransform |
transform
The math transform on which to delegate the work.
|
Modifier | Constructor and Description |
---|---|
protected |
MathTransformProxy(MathTransform transform)
Creates a new proxy which delegates its work to the specified math transform.
|
Modifier and Type | Method and Description |
---|---|
Matrix |
derivative(DirectPosition point)
Gets the derivative of this transform at a point.
|
boolean |
equals(Object object)
Compares the specified object with this inverse math transform for equality.
|
int |
getSourceDimensions()
Gets the dimension of input points.
|
int |
getTargetDimensions()
Gets the dimension of output points.
|
int |
hashCode()
Returns a hash code value for this math transform.
|
MathTransform |
inverse()
Returns the inverse of this math transform.
|
boolean |
isIdentity()
Tests whether this transform does not move any points.
|
String |
toString()
Returns a string representation for this transform.
|
String |
toWKT()
Returns a Well Known Text (WKT) for this transform.
|
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(double[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Transforms a list of coordinate point ordinal values.
|
void |
transform(float[] 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.
|
public final MathTransform transform
protected MathTransformProxy(MathTransform transform)
transform
- The transform on which to delegate the work.public int getSourceDimensions()
getSourceDimensions
in interface MathTransform
public int getTargetDimensions()
getTargetDimensions
in interface MathTransform
public DirectPosition transform(DirectPosition ptSrc, DirectPosition ptDst) throws MismatchedDimensionException, TransformException
ptSrc
and stores the result in ptDst
.transform
in interface MathTransform
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.MismatchedDimensionException
- if ptSrc
or ptDst
doesn't have the
expected dimension.TransformException
- if the point can't be transformed.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 void transform(float[] srcPts, int srcOff, float[] 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 void transform(float[] 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.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, float[] 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.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
point
- The coordinate point where to evaluate the derivative. Null value is accepted
only if the derivative is the same everywhere. For example affine transform accept null
value since they produces identical derivative no matter the coordinate value. But most
map projection will requires a non-null value.null
). This method never returns
an internal object: changing the matrix will not change the state of this math transform.TransformException
- if the derivative can't be evaluated at the specified point.public MathTransform inverse() throws NoninvertibleTransformException
inverse
in interface MathTransform
NoninvertibleTransformException
- if the transform can't be inversed.public boolean isIdentity()
isIdentity
in interface MathTransform
true
if this MathTransform
is an identity transform; false
otherwise.public String toWKT() throws UnsupportedOperationException
toWKT
in interface MathTransform
UnsupportedOperationException
- If this object can't be formatted as WKT.public String toString()
public boolean equals(Object object)
Copyright © 1996–2019 Geotools. All rights reserved.