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 SpecializableTransformThe enclosing transform.private final org.opengis.referencing.operation.MathTransformThe inverse ofSpecializableTransform.global.private static final longFor 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.Matrixderivative(org.opengis.geometry.DirectPosition point) Gets the inverse derivative of this transform at a point.org.opengis.referencing.operation.MathTransforminverse()Returns the inverse of this math transform.final org.opengis.referencing.operation.Matrixtransform(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.voidtransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Inverse transforms a list of coordinate tuples.voidtransform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Inverse transforms a list of coordinate tuples.voidtransform(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Inverse transforms a list of coordinate tuples.voidtransform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Inverse transforms a list of coordinate tuples.private voidtransform(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.DirectPositiontransform(org.opengis.geometry.DirectPosition ptSrc, org.opengis.geometry.DirectPosition ptDst) Inverse transforms the specifiedptSrcand stores the result inptDst.Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform.Inverse
beforeFormat, computeHashCode, equals, formatTo, getDomain, getSourceDimensions, getTargetDimensions, isIdentityMethods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
equals, getContextualParameters, getParameterDescriptors, getParameterValues, hashCode, isInverseEquals, mismatchedDimension, tryConcatenateMethods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKTMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
inversein interfaceorg.opengis.referencing.operation.MathTransform- Specified by:
inversein 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 specifiedptSrcand stores the result inptDst.- Specified by:
transformin interfaceorg.opengis.referencing.operation.MathTransform- Overrides:
transformin 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
ptSrcand storing the result inptDst, or a newly created point ifptDstwas 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:
derivativein interfaceorg.opengis.referencing.operation.MathTransform- Overrides:
derivativein 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:
transformin 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 benullif only the derivative matrix is desired.dstOff- the offset to the location of the transformed point that is stored in the destination array.derivate-truefor computing the derivative, orfalseif not needed.- Returns:
- the matrix of the transform derivative at the given source position,
or
nullif thederivateargument 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 bySpecializableTransformparent class, except thatSpecializableTransform.SubAreais 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:
transformin interfaceorg.opengis.referencing.operation.MathTransform- Overrides:
transformin 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 testingSubAreainclusion with full precision before to cast tofloatvalues.- Specified by:
transformin interfaceorg.opengis.referencing.operation.MathTransform- Overrides:
transformin 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.NaNvalues, 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 testingSubAreainclusion with full precision before to cast tofloatvalues.- Specified by:
transformin interfaceorg.opengis.referencing.operation.MathTransform- Overrides:
transformin 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:
transformin interfaceorg.opengis.referencing.operation.MathTransform- Overrides:
transformin 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.
-