Class SpecializableTransform.Inverse
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.operation.transform.AbstractMathTransform
org.apache.sis.referencing.operation.transform.AbstractMathTransform.Inverse
org.apache.sis.referencing.operation.transform.SpecializableTransform.Inverse
- All Implemented Interfaces:
Serializable
,Parameterized
,LenientComparable
,org.opengis.referencing.operation.MathTransform
- Direct Known Subclasses:
SpecializableTransform2D.Inverse
- Enclosing class:
- SpecializableTransform
static class SpecializableTransform.Inverse
extends AbstractMathTransform.Inverse
implements Serializable
The inverse of
SpecializableTransform
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
AbstractMathTransform.Inverse
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SpecializableTransform
The enclosing transform.private final org.opengis.referencing.operation.MathTransform
The inverse ofSpecializableTransform.global
.private static final long
For cross-version compatibility.Fields inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
MAXIMUM_BUFFER_SIZE, MAXIMUM_FAILURES
-
Constructor Summary
ConstructorsConstructorDescriptionInverse
(SpecializableTransform forward) Creates the inverse of a specialized transform having the given properties. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.opengis.referencing.operation.Matrix
derivative
(org.opengis.geometry.DirectPosition point) Gets the inverse derivative of this transform at a point.org.opengis.referencing.operation.MathTransform
inverse()
Returns the inverse of this math transform.final org.opengis.referencing.operation.Matrix
transform
(double[] srcPts, int srcOff, double[] dstPts, int dstOff, boolean derivate) Inverse transforms a single coordinate tuple in an array, and optionally computes the transform derivative at that location.void
transform
(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Inverse transforms a list of coordinate tuples.void
transform
(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Inverse transforms a list of coordinate tuples.void
transform
(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Inverse transforms a list of coordinate tuples.void
transform
(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Inverse transforms a list of coordinate tuples.private void
transform
(SpecializableTransform.TransformCall transform, double[] dstPts, int srcOff, int dstOff, int srcInc, int dstInc, int numPts) Invoked for transforming, then verifying if more appropriate transform exists for the result.final org.opengis.geometry.DirectPosition
transform
(org.opengis.geometry.DirectPosition ptSrc, org.opengis.geometry.DirectPosition ptDst) Inverse transforms the specifiedptSrc
and stores the result inptDst
.Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform.Inverse
beforeFormat, computeHashCode, equals, formatTo, getDomain, getSourceDimensions, getTargetDimensions, isIdentity
Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
equals, getContextualParameters, getParameterDescriptors, getParameterValues, hashCode, isInverseEquals, mismatchedDimension, tryConcatenate
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, 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 Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
forward
The enclosing transform. -
global
private final org.opengis.referencing.operation.MathTransform globalThe inverse ofSpecializableTransform.global
.
-
-
Constructor Details
-
Inverse
Inverse(SpecializableTransform forward) throws org.opengis.referencing.operation.NoninvertibleTransformException Creates the inverse of a specialized transform having the given properties.- Throws:
org.opengis.referencing.operation.NoninvertibleTransformException
-
-
Method Details
-
inverse
public org.opengis.referencing.operation.MathTransform inverse()Returns the inverse of this math transform.- Specified by:
inverse
in interfaceorg.opengis.referencing.operation.MathTransform
- Specified by:
inverse
in classAbstractMathTransform.Inverse
- Returns:
- the inverse of this transform.
-
transform
public final org.opengis.geometry.DirectPosition transform(org.opengis.geometry.DirectPosition ptSrc, org.opengis.geometry.DirectPosition ptDst) throws org.opengis.referencing.operation.TransformException Inverse transforms the specifiedptSrc
and stores the result inptDst
.- Specified by:
transform
in interfaceorg.opengis.referencing.operation.MathTransform
- Overrides:
transform
in classAbstractMathTransform
- Parameters:
ptSrc
- the coordinate tuple to be transformed.ptDst
- the coordinate tuple that stores the result of transformingptSrc
, ornull
.- Returns:
- the coordinate tuple after transforming
ptSrc
and storing the result inptDst
, or a newly created point ifptDst
was null. - Throws:
org.opengis.referencing.operation.TransformException
- if the point cannot be transformed.
-
derivative
public final org.opengis.referencing.operation.Matrix derivative(org.opengis.geometry.DirectPosition point) throws org.opengis.referencing.operation.TransformException Gets the inverse derivative of this transform at a point. This method is overridden for consistency.- Specified by:
derivative
in interfaceorg.opengis.referencing.operation.MathTransform
- Overrides:
derivative
in classAbstractMathTransform.Inverse
- Parameters:
point
- the coordinate tuple where to evaluate the derivative.- Returns:
- the derivative at the specified point (never
null
). - Throws:
org.opengis.referencing.operation.TransformException
- if the derivative cannot be evaluated at the specified point.
-
transform
public final org.opengis.referencing.operation.Matrix transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, boolean derivate) throws org.opengis.referencing.operation.TransformException Inverse transforms a single coordinate tuple in an array, and optionally computes the transform derivative at that location.- Specified by:
transform
in classAbstractMathTransform
- Parameters:
srcPts
- the array containing the source coordinates (cannot benull
).srcOff
- the offset to the point to be transformed in the source array.dstPts
- the array into which the transformed coordinates is returned. May be the same thansrcPts
. May benull
if only the derivative matrix is desired.dstOff
- the offset to the location of the transformed point that is stored in the destination array.derivate
-true
for computing the derivative, orfalse
if not needed.- Returns:
- the matrix of the transform derivative at the given source position,
or
null
if thederivate
argument isfalse
. - Throws:
org.opengis.referencing.operation.TransformException
- if the point cannot be transformed or if a problem occurred while calculating the derivative.- See Also:
-
transform
private void transform(SpecializableTransform.TransformCall transform, double[] dstPts, int srcOff, int dstOff, int srcInc, int dstInc, int numPts) throws org.opengis.referencing.operation.TransformException Invoked for transforming, then verifying if more appropriate transform exists for the result. This implementation is similar to the algorithm applied bySpecializableTransform
parent class, except thatSpecializableTransform.SubArea
is verified after transformations instead of before.- Throws:
org.opengis.referencing.operation.TransformException
-
transform
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.TransformException Inverse transforms a list of coordinate tuples. The transformed points are written directly in the destination array.- Specified by:
transform
in interfaceorg.opengis.referencing.operation.MathTransform
- Overrides:
transform
in classAbstractMathTransform
- Parameters:
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 thansrcPts
.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.- Throws:
org.opengis.referencing.operation.TransformException
- if a point cannot be transformed. Some implementations will stop at the first failure, wile some other implementations will fill the untransformable points with Double.NaN values, continue and throw the exception only at end. Implementations that fall in the latter case should set the last completed transform tothis
.
-
transform
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.TransformException Inverse transforms a list of coordinate tuples. This method uses an temporarydouble[]
buffer for testingSubArea
inclusion with full precision before to cast tofloat
values.- Specified by:
transform
in interfaceorg.opengis.referencing.operation.MathTransform
- Overrides:
transform
in classAbstractMathTransform
- Parameters:
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 thansrcPts
.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.- Throws:
org.opengis.referencing.operation.TransformException
- if a point cannot be transformed. Some implementations will stop at the first failure, wile some other implementations will fill the un-transformable points withFloat.NaN
values, continue and throw the exception only at end. Implementations that fall in the latter case should set the last completed transform tothis
.
-
transform
public void transform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.TransformException Inverse transforms a list of coordinate tuples. This method uses an temporarydouble[]
buffer for testingSubArea
inclusion with full precision before to cast tofloat
values.- Specified by:
transform
in interfaceorg.opengis.referencing.operation.MathTransform
- Overrides:
transform
in classAbstractMathTransform
- Parameters:
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.- Throws:
org.opengis.referencing.operation.TransformException
- if a point cannot be transformed. Some implementations will stop at the first failure, wile some other implementations will fill the untransformable points with Float.NaN values, continue and throw the exception only at end. Implementations that fall in the latter case should set the last completed transform tothis
.
-
transform
public void transform(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.TransformException Inverse transforms a list of coordinate tuples. The transformed points are written directly in the destination array.- Specified by:
transform
in interfaceorg.opengis.referencing.operation.MathTransform
- Overrides:
transform
in classAbstractMathTransform
- Parameters:
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.- Throws:
org.opengis.referencing.operation.TransformException
- if a point cannot be transformed. Some implementations will stop at the first failure, wile some other implementations will fill the untransformable points with Double.NaN values, continue and throw the exception only at end. Implementations that fall in the latter case should set the last completed transform tothis
.
-