Class PassThroughTransform

  • All Implemented Interfaces:
    Serializable, Parameterized, Lenient­Comparable, Math­Transform

    public class PassThroughTransform
    extends AbstractMathTransform
    implements Serializable
    Transform which passes through a subset of coordinates to another transform. This allows transforms to operate on a subset of coordinate values.
    Example: giving (latitude, longitude, height) coordinates, Pass­Through­Transform can convert the height values from feet to meters without affecting the latitude and longitude values. Such transform can be built as below:
    MathTransform feetToMetres = MathTransforms.linear(0.3048, 0);       // One-dimensional conversion.
    MathTransform tr = MathTransforms.passThrough(2, feetToMetres, 0);   // Three-dimensional conversion.
    Immutability and thread safety
    Pass­Through­Transform is immutable and thread-safe if its subTransform is also immutable and thread-safe.
    Serialized instances of this class are not guaranteed to be compatible with future SIS versions. Serialization should be used only for short term storage or RMI between applications running the same SIS version.
    See Also:
    Math­Transforms​.pass­Through(int, Math­Transform, int), Math­Transforms​.compound(Math­Transform...), Serialized Form

    Defined in the sis-referencing module

    • Constructor Detail

      • PassThroughTransform

        protected PassThroughTransform​(int firstAffectedCoordinate,
                                       MathTransform subTransform,
                                       int numTrailingCoordinates)
        Constructor for sub-classes. Users should invoke the static Math­Transforms​.pass­Through(int, Math­Transform, int) factory method instead, since the most optimal pass-through transform for the given sub­Transform is not necessarily a Pass­Through­Transform instance.
        first­Affected­Coordinate - index of the first affected coordinate.
        sub­Transform - the sub-transform to apply on modified coordinates.
        num­Trailing­Coordinates - number of trailing coordinates to pass through.
        See Also:
        Math­Transforms​.pass­Through(int, Math­Transform, int)