Class CompoundTransformOf1D

All Implemented Interfaces:
Parameterized, LenientComparable, org.opengis.referencing.operation.MathTransform

final class CompoundTransformOf1D extends CompoundTransform
A transform composed of an arbitrary number of juxtaposed one-dimensional transforms. This is an optimization for a common case when using transforms as transfer functions in grid coverages.
Since:
1.1
Version:
1.1
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform

    AbstractMathTransform.Inverse
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.opengis.referencing.operation.MathTransform1D[]
    The transforms to juxtapose for defining a new transform.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CompoundTransformOf1D(org.opengis.referencing.operation.MathTransform1D[] components)
    Creates a new compound transforms with the given components.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) final org.opengis.referencing.operation.MathTransform[]
    Returns the components of this compound transform.
    int
    Returns the number of source dimensions of this compound transform.
    int
    Returns the number of target dimensions of this compound transform.
    org.opengis.referencing.operation.Matrix
    transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, boolean derivate)
    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)
    Transforms a list of coordinate tuples.
    void
    transform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
    Transforms a list of coordinate tuples.
    void
    transform(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
    Transforms a list of coordinate tuples.
    void
    transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
    Transforms a list of coordinate tuples.

    Methods inherited from class org.apache.sis.internal.coverage.CompoundTransform

    computeHashCode, create, equals, inverse, isIdentity, tryConcatenate

    Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform

    derivative, equals, formatTo, getContextualParameters, getDomain, getParameterDescriptors, getParameterValues, hashCode, transform

    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

    • components

      private final org.opengis.referencing.operation.MathTransform1D[] components
      The transforms to juxtapose for defining a new transform. The length of this array should be greater then 1.
  • Constructor Details

    • CompoundTransformOf1D

      CompoundTransformOf1D(org.opengis.referencing.operation.MathTransform1D[] components)
      Creates a new compound transforms with the given components.
  • Method Details

    • components

      final org.opengis.referencing.operation.MathTransform[] components()
      Returns the components of this compound transform. This is a direct reference to internal array; callers shall not modify.
      Specified by:
      components in class CompoundTransform
    • getSourceDimensions

      public int getSourceDimensions()
      Returns the number of source dimensions of this compound transform. This is the sum of the number of source dimensions of all components.
      Specified by:
      getSourceDimensions in interface org.opengis.referencing.operation.MathTransform
      Overrides:
      getSourceDimensions in class CompoundTransform
      Returns:
      the number of dimensions of input points.
      See Also:
    • getTargetDimensions

      public int getTargetDimensions()
      Returns the number of target dimensions of this compound transform. This is the sum of the number of target dimensions of all components.
      Specified by:
      getTargetDimensions in interface org.opengis.referencing.operation.MathTransform
      Overrides:
      getTargetDimensions in class CompoundTransform
      Returns:
      the number of dimensions of output points.
      See Also:
    • transform

      public org.opengis.referencing.operation.Matrix transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, boolean derivate) throws org.opengis.referencing.operation.TransformException
      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

      public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.TransformException
      Transforms a list of coordinate tuples.
      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
      Transforms a list of coordinate tuples.
      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
      Transforms a list of coordinate tuples.
      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
      Transforms a list of coordinate tuples.
      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.