Class CompoundTransform

All Implemented Interfaces:
Parameterized, LenientComparable, org.opengis.referencing.operation.MathTransform
Direct Known Subclasses:
CompoundTransformOf1D, RepeatedTransform

public abstract class CompoundTransform extends AbstractMathTransform
A transform composed of an arbitrary number of juxtaposed transforms. This implementation is sufficient for sis-feature purposes, but incomplete for sis-referencing purposes. See SIS-498.
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 org.opengis.referencing.operation.MathTransform
    The inverse, created when first needed.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new compound transforms.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) abstract org.opengis.referencing.operation.MathTransform[]
    Returns the component transforms that are juxtaposed in this compound transform.
    protected final int
    Computes a hash value for this transform.
    static org.opengis.referencing.operation.MathTransform
    create(org.opengis.referencing.operation.MathTransform[] components)
    Creates a new transform made of the given components.
    final boolean
    equals(Object object, ComparisonMode mode)
    Compares the specified object with this math transform for equality.
    int
    Returns the number of source dimensions of this compound transform.
    int
    Returns the number of target dimensions of this compound transform.
    final org.opengis.referencing.operation.MathTransform
    Returns the inverse transform of this transform.
    boolean
    Tests whether this transform does not move any points.
    protected final org.opengis.referencing.operation.MathTransform
    tryConcatenate(boolean applyOtherFirst, org.opengis.referencing.operation.MathTransform other, org.opengis.referencing.operation.MathTransformFactory factory)
    Concatenates or pre-concatenates in an optimized way this math transform with the given one, if possible.

    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

    • inverse

      private transient org.opengis.referencing.operation.MathTransform inverse
      The inverse, created when first needed.
  • Constructor Details

    • CompoundTransform

      CompoundTransform()
      Creates a new compound transforms.
  • Method Details

    • components

      abstract org.opengis.referencing.operation.MathTransform[] components()
      Returns the component transforms that are juxtaposed in this compound transform. This method may return a direct reference to an internal array; callers shall not modify that array.
    • create

      public static org.opengis.referencing.operation.MathTransform create(org.opengis.referencing.operation.MathTransform[] components)
      Creates a new transform made of the given components.
      Parameters:
      components - transforms to juxtapose for defining a new transform.
      Returns:
      compound transforms with the given components.
    • 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
      Specified by:
      getSourceDimensions in class AbstractMathTransform
      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
      Specified by:
      getTargetDimensions in class AbstractMathTransform
      Returns:
      the number of dimensions of output points.
      See Also:
    • isIdentity

      public boolean isIdentity()
      Tests whether this transform does not move any points.
      Specified by:
      isIdentity in interface org.opengis.referencing.operation.MathTransform
      Overrides:
      isIdentity in class AbstractMathTransform
      Returns:
      true if all transform components are identity.
    • inverse

      public final org.opengis.referencing.operation.MathTransform inverse() throws org.opengis.referencing.operation.NoninvertibleTransformException
      Returns the inverse transform of this transform.
      Specified by:
      inverse in interface org.opengis.referencing.operation.MathTransform
      Overrides:
      inverse in class AbstractMathTransform
      Returns:
      the inverse of this transform.
      Throws:
      org.opengis.referencing.operation.NoninvertibleTransformException - if at least one component transform cannot be inverted.
    • tryConcatenate

      protected final org.opengis.referencing.operation.MathTransform tryConcatenate(boolean applyOtherFirst, org.opengis.referencing.operation.MathTransform other, org.opengis.referencing.operation.MathTransformFactory factory) throws org.opengis.util.FactoryException
      Concatenates or pre-concatenates in an optimized way this math transform with the given one, if possible.
      Overrides:
      tryConcatenate in class AbstractMathTransform
      Parameters:
      applyOtherFirst - true if the transformation order is other followed by this, or false if the transformation order is this followed by other.
      other - the other math transform to (pre-)concatenate with this transform.
      factory - the factory which is (indirectly) invoking this method, or null if none.
      Returns:
      the math transforms combined in an optimized way, or null if no such optimization is available.
      Throws:
      org.opengis.util.FactoryException - if an error occurred while combining the transforms.
      See Also:
    • computeHashCode

      protected final int computeHashCode()
      Computes a hash value for this transform. This method is invoked by AbstractMathTransform.hashCode() when first needed.
      Overrides:
      computeHashCode in class AbstractMathTransform
      Returns:
      the hash code value. This value may change between different execution of the Apache SIS library.
    • equals

      public final boolean equals(Object object, ComparisonMode mode)
      Compares the specified object with this math transform for equality.
      Specified by:
      equals in interface LenientComparable
      Overrides:
      equals in class AbstractMathTransform
      Parameters:
      object - the object to compare with this transform.
      mode - the strictness level of the comparison. Default to STRICT.
      Returns:
      true if the given object is considered equals to this math transform.
      See Also: