Class 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.
  • Field Details

  • 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 interface org.opengis.referencing.operation.MathTransform
      Specified by:
      inverse in class AbstractMathTransform.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 specified ptSrc and stores the result in ptDst.
      Specified by:
      transform in interface org.opengis.referencing.operation.MathTransform
      Overrides:
      transform in class AbstractMathTransform
      Parameters:
      ptSrc - the coordinate tuple to be transformed.
      ptDst - the coordinate tuple that stores the result of transforming ptSrc, or null.
      Returns:
      the coordinate tuple after transforming ptSrc and storing the result in ptDst, or a newly created point if ptDst 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 interface org.opengis.referencing.operation.MathTransform
      Overrides:
      derivative in class AbstractMathTransform.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 class AbstractMathTransform
      Parameters:
      srcPts - the array containing the source coordinates (cannot be null).
      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 than srcPts. May be null 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, or false if not needed.
      Returns:
      the matrix of the transform derivative at the given source position, or null if the derivate argument is false.
      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 by SpecializableTransform parent class, except that SpecializableTransform.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 interface org.opengis.referencing.operation.MathTransform
      Overrides:
      transform in class AbstractMathTransform
      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 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.
      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 to this.
    • 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 temporary double[] buffer for testing SubArea inclusion with full precision before to cast to float values.
      Specified by:
      transform in interface org.opengis.referencing.operation.MathTransform
      Overrides:
      transform in class AbstractMathTransform
      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 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.
      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 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 to this.
    • 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 temporary double[] buffer for testing SubArea inclusion with full precision before to cast to float values.
      Specified by:
      transform in interface org.opengis.referencing.operation.MathTransform
      Overrides:
      transform in class AbstractMathTransform
      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 to this.
    • 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 interface org.opengis.referencing.operation.MathTransform
      Overrides:
      transform in class AbstractMathTransform
      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 to this.