Package org.apache.sis.internal.coverage
Class CompoundTransform
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.operation.transform.AbstractMathTransform
org.apache.sis.internal.coverage.CompoundTransform
- All Implemented Interfaces:
Parameterized,LenientComparable,org.opengis.referencing.operation.MathTransform
- Direct Known Subclasses:
CompoundTransformOf1D,RepeatedTransform
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
FieldsModifier and TypeFieldDescriptionprivate org.opengis.referencing.operation.MathTransformThe inverse, created when first needed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract org.opengis.referencing.operation.MathTransform[]Returns the component transforms that are juxtaposed in this compound transform.protected final intComputes a hash value for this transform.static org.opengis.referencing.operation.MathTransformcreate(org.opengis.referencing.operation.MathTransform[] components) Creates a new transform made of the given components.final booleanequals(Object object, ComparisonMode mode) Compares the specified object with this math transform for equality.intReturns the number of source dimensions of this compound transform.intReturns the number of target dimensions of this compound transform.final org.opengis.referencing.operation.MathTransforminverse()Returns the inverse transform of this transform.booleanTests whether this transform does not move any points.protected final org.opengis.referencing.operation.MathTransformtryConcatenate(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.referencing.operation.transform.AbstractMathTransform
derivative, equals, formatTo, getContextualParameters, getDomain, getParameterDescriptors, getParameterValues, hashCode, transform, transform, transform, transform, transform, transformMethods 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
-
inverse
private transient org.opengis.referencing.operation.MathTransform inverseThe 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:
getSourceDimensionsin interfaceorg.opengis.referencing.operation.MathTransform- Specified by:
getSourceDimensionsin classAbstractMathTransform- 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:
getTargetDimensionsin interfaceorg.opengis.referencing.operation.MathTransform- Specified by:
getTargetDimensionsin classAbstractMathTransform- 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:
isIdentityin interfaceorg.opengis.referencing.operation.MathTransform- Overrides:
isIdentityin classAbstractMathTransform- Returns:
trueif all transform components are identity.
-
inverse
public final org.opengis.referencing.operation.MathTransform inverse() throws org.opengis.referencing.operation.NoninvertibleTransformExceptionReturns the inverse transform of this transform.- Specified by:
inversein interfaceorg.opengis.referencing.operation.MathTransform- Overrides:
inversein classAbstractMathTransform- 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:
tryConcatenatein classAbstractMathTransform- Parameters:
applyOtherFirst-trueif the transformation order isotherfollowed bythis, orfalseif the transformation order isthisfollowed byother.other- the other math transform to (pre-)concatenate with this transform.factory- the factory which is (indirectly) invoking this method, ornullif none.- Returns:
- the math transforms combined in an optimized way, or
nullif 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 byAbstractMathTransform.hashCode()when first needed.- Overrides:
computeHashCodein classAbstractMathTransform- Returns:
- the hash code value. This value may change between different execution of the Apache SIS library.
-
equals
Compares the specified object with this math transform for equality.- Specified by:
equalsin interfaceLenientComparable- Overrides:
equalsin classAbstractMathTransform- Parameters:
object- the object to compare with this transform.mode- the strictness level of the comparison. Default toSTRICT.- Returns:
trueif the given object is considered equals to this math transform.- See Also:
-