Class AffineTransform2D

    • 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

      • getParameterValues

        public ParameterValueGroup getParameterValues()
        Returns the matrix elements as a group of parameters values. The number of parameters depends on the matrix size. Only matrix elements different from their default value will be included in this group.
        Returns:
        A copy of the parameter values for this math transform.
      • getSourceDimensions

        public final int getSourceDimensions()
        Gets the dimension of input points, which is fixed to 2.
        Specified by:
        getSourceDimensions in interface MathTransform
        Returns:
        The dimension of input points.
      • getTargetDimensions

        public final int getTargetDimensions()
        Gets the dimension of output points, which is fixed to 2.
        Specified by:
        getTargetDimensions in interface MathTransform
        Returns:
        The dimension of output points.
      • transform

        public Position transform​(Position ptSrc,
                                  Position ptDst)
        Transforms the specified ptSrc and stores the result in ptDst.
        Specified by:
        transform in interface MathTransform
        Parameters:
        ptSrc - the specified coordinate point to be transformed.
        ptDst - the specified coordinate point that stores the result of transforming ptSrc, or null.
        Returns:
        the coordinate point after transforming ptSrc and storing the result in ptDst, or a newly created point if ptDst was null.
      • getMatrix

        public Matrix getMatrix()
        Returns this transform as an affine transform matrix.
        Specified by:
        getMatrix in interface LinearTransform
        Returns:
        A copy of the underlying matrix.
      • derivative

        public Matrix derivative​(Point2D point)
        Gets the derivative of this transform at a point. For an affine transform, the derivative is the same everywhere.
        Specified by:
        derivative in interface MathTransform2D
        Parameters:
        point - The coordinate point where to evaluate the derivative. Null value is accepted only if the derivative is the same everywhere. For example affine transform accept null value since they produces identical derivative no matter the coordinate value. But most map projection will requires a non-null value.
        Returns:
        The derivative at the specified point as a 2×2 matrix. This method never returns an internal object: changing the matrix will not change the state of this math transform.
      • derivative

        public Matrix derivative​(Position point)
        Gets the derivative of this transform at a point. For an affine transform, the derivative is the same everywhere.
        Specified by:
        derivative in interface MathTransform
        Parameters:
        point - The coordinate point where to evaluate the derivative. Null value is accepted only if the derivative is the same everywhere. For example affine transform accept null value since they produces identical derivative no matter the coordinate value. But most map projection will requires a non-null value.
        Returns:
        The derivative at the specified point (never null). This method never returns an internal object: changing the matrix will not change the state of this math transform.
      • clone

        public AffineTransform clone()
        Returns a new affine transform which is a modifiable copy of this transform. We override this method because it is defined in the super-class. However this implementation do not returns a new AffineTransform2D instance because the later is unmodifiable, which make exact cloning useless.
        Specified by:
        clone in interface Cloneable
        Overrides:
        clone in class AffineTransform
        Returns:
        A copy of this object.
        See Also:
        Object.clone()