Class ProjectiveTransform2D

All Implemented Interfaces:
Serializable, ExtendedPrecisionMatrix, LinearTransform2D, Parameterized, LinearTransform, LenientComparable, org.opengis.referencing.operation.MathTransform, org.opengis.referencing.operation.MathTransform2D, org.opengis.referencing.operation.Matrix

final class ProjectiveTransform2D extends ProjectiveTransform implements LinearTransform2D
Projective transform in 2D case. This class is used only if the transform is not affine, i.e. the last row in the 3×3 matrix is not [0 0 1]. Otherwise AffineTransform2D should be used instead (unless AffineTransform is not available on the target platform).
Since:
0.5
Version:
0.7
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
  • Constructor Details

    • ProjectiveTransform2D

      ProjectiveTransform2D(org.opengis.referencing.operation.Matrix matrix)
      Creates projective transform from a matrix.
  • Method Details

    • transform

      public Point2D transform(Point2D ptSrc, Point2D ptDst)
      Transforms the specified ptSrc and stores the result in ptDst. Implementation is similar but not identical to AbstractMathTransform2D.transform(Point2D, Point2D). The difference is in the transform(…) method invoked.
      Specified by:
      transform in interface org.opengis.referencing.operation.MathTransform2D
    • createTransformedShape

      public Shape createTransformedShape(Shape shape) throws org.opengis.referencing.operation.TransformException
      Transforms the specified shape.
      Specified by:
      createTransformedShape in interface org.opengis.referencing.operation.MathTransform2D
      Throws:
      org.opengis.referencing.operation.TransformException
    • derivative

      public org.opengis.referencing.operation.Matrix derivative(Point2D point)
      Gets the derivative of this transform at a point.
      Specified by:
      derivative in interface org.opengis.referencing.operation.MathTransform2D
      Parameters:
      point - ignored, since derivative of a linear transform is the same everywhere.
      Returns:
      the derivative at the specified point as a 2×2 matrix.
    • inverse

      public LinearTransform2D inverse() throws org.opengis.referencing.operation.NoninvertibleTransformException
      Creates the inverse transform of this object. The inverse shall be linear and two-dimensional.
      Specified by:
      inverse in interface LinearTransform
      Specified by:
      inverse in interface LinearTransform2D
      Specified by:
      inverse in interface org.opengis.referencing.operation.MathTransform
      Specified by:
      inverse in interface org.opengis.referencing.operation.MathTransform2D
      Overrides:
      inverse in class AbstractLinearTransform
      Returns:
      the inverse transform.
      Throws:
      org.opengis.referencing.operation.NoninvertibleTransformException - if the transform cannot be inverted.
      See Also: