@UML(identifier="CT_MathTransform", specification=OGC_01009) public interface MathTransform
CoordinateOperation interface,
and use the contained math transform object whenever it wishes to perform a transform.AffineTransform,
PerspectiveTransform,
Transform3D,
MathTransformFactory,
CoordinateOperation.getMathTransform()| Modifier and Type | Method and Description |
|---|---|
Matrix |
derivative(DirectPosition point)
Gets the derivative of this transform at a point.
|
int |
getSourceDimensions()
Gets the dimension of input points.
|
int |
getTargetDimensions()
Gets the dimension of output points.
|
MathTransform |
inverse()
Creates the inverse transform of this object.
|
boolean |
isIdentity()
Tests whether this transform does not move any points.
|
String |
toWKT()
Returns a Well Known Text (WKT) for this object.
|
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.
|
@UML(identifier="getDimSource", specification=OGC_01009) int getSourceDimensions()
@UML(identifier="getDimTarget", specification=OGC_01009) int getTargetDimensions()
@UML(identifier="transform", specification=OGC_01009) DirectPosition transform(DirectPosition ptSrc, DirectPosition ptDst) throws MismatchedDimensionException, TransformException
ptSrc and stores the result in
ptDst. If ptDst is null, a new
DirectPosition object is allocated and then the result of the
transformation is stored in this object. In either case, ptDst,
which contains the transformed point, is returned for convenience.
If ptSrc and ptDst are the same object,
the input point is correctly overwritten with the transformed point.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.@UML(identifier="transformList", specification=OGC_01009) void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws TransformException
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.void transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
throws TransformException
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.void transform(float[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
throws TransformException
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.void transform(double[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
throws TransformException
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.@UML(identifier="derivative", specification=OGC_01009) Matrix derivative(DirectPosition point) throws MismatchedDimensionException, TransformException
N×M. The elements of the matrix
{en,m : n=0..(N-1)}
form a vector in the output space which is parallel to the displacement
caused by a small change in the m'th ordinate in the input space.
For example, if the input dimension is 4 and the
output dimension is 3, then a small displacement
(x₀, x₁, x₂, x₃)
in the input space will result in a displacement
(y₀, y₁, y₂)
in the output space computed as below (en,m
are the matrix elements):
┌ ┐ ┌ ┐ ┌ ┐
│ y₀ │ │ e₀₀ e₀₁ e₀₂ e₀₃ │ │ x₀ │
│ y₁ │ = │ e₁₀ e₁₁ e₁₂ e₁₃ │ │ x₁ │
│ y₂ │ │ e₂₀ e₂₁ e₂₂ e₂₃ │ │ x₂ │
└ ┘ └ ┘ │ x₃ │
└ ┘
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.NullPointerException - if the derivative dependents on coordinate
and point is null.MismatchedDimensionException - if point doesn't have
the expected dimension.TransformException - if the derivative can't be evaluated at the
specified point.@UML(identifier="inverse", specification=OGC_01009) MathTransform inverse() throws NoninvertibleTransformException
NoninvertibleTransformException - if the transform can't be inverted.@UML(identifier="isIdentity", specification=OGC_01009) boolean isIdentity()
true if this MathTransform is
an identity transform; false otherwise.@UML(identifier="getWKT", specification=OGC_01009) String toWKT() throws UnsupportedOperationException
UnsupportedOperationException - If this object can't be formatted as WKT.Copyright © 1994–2019 Open Geospatial Consortium. All rights reserved.