Class AffineTransform2D

  • All Implemented Interfaces:
    Serializable, Cloneable, MathTransform2D, org.geotools.referencing.operation.LinearTransform, org.geotools.referencing.util.Formattable, org.opengis.referencing.operation.MathTransform, org.opengis.referencing.operation.MathTransform2D, org.opengis.util.Cloneable

    public class AffineTransform2D
    extends org.geotools.referencing.operation.transform.AffineTransform2D
    implements MathTransform2D
    A wrapper class for an affine transform where a MathTransform2D is required.
    See Also:
    Serialized Form
    • Constructor Detail

      • AffineTransform2D

        public AffineTransform2D​(AffineTransform transform)
        Constructs a new affine transform with the same coefficient than the specified transform.
      • AffineTransform2D

        public AffineTransform2D​(double m00,
                                 double m10,
                                 double m01,
                                 double m11,
                                 double m02,
                                 double m12)
        Constructs a new AffineTransform2D from 6 values representing the 6 specifiable entries of the 3×3 transformation matrix. Those values are given unchanged to the super class constructor.
        Since:
        2.5
    • Method Detail

      • inverse

        public MathTransform2D inverse()
                                throws org.opengis.referencing.operation.NoninvertibleTransformException
        Creates the inverse transform of this object.
        Specified by:
        inverse in interface org.opengis.referencing.operation.MathTransform
        Specified by:
        inverse in interface MathTransform2D
        Specified by:
        inverse in interface org.opengis.referencing.operation.MathTransform2D
        Overrides:
        inverse in class org.geotools.referencing.operation.transform.AffineTransform2D
        Returns:
        The inverse transform.
        Throws:
        org.opengis.referencing.operation.NoninvertibleTransformException - if this transform can't be inverted.
      • equals

        public boolean equals​(Object object)
        Description copied from interface: MathTransform2D
        Indicates whether some other object is "equal to" this one.

        The equals method implements an equivalence relation on non-null object references:

        • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
        • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
        • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
        • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
        • For any non-null reference value x, x.equals(null) should return false.

        The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any non-null reference values x and y, this method returns true if and only if x and y refer to the same object (x == y has the value true).

        Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.

        Specified by:
        equals in interface MathTransform2D
        Overrides:
        equals in class org.geotools.referencing.operation.transform.AffineTransform2D
        Parameters:
        object - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
        See Also:
        MathTransform2D.hashCode(), HashMap