Class TransformWrapper2D

All Implemented Interfaces:
Serializable, org.opengis.metadata.Identifier, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.operation.CoordinateOperation, org.opengis.referencing.operation.MathTransform, org.opengis.referencing.operation.MathTransform2D, org.opengis.referencing.ReferenceIdentifier
Direct Known Subclasses:
ProjectionWrapper2D

class TransformWrapper2D extends TransformWrapper implements org.opengis.referencing.operation.MathTransform2D
Wraps a PROJ4J transform behind the equivalent GeoAPI interface for the two-dimensional case. The exact type of the operation (conversion, transformation or concatenated) is unknown.
  • Field Details

    • inverse

      private transient TransformWrapper2D inverse
      The inverse of this wrapper, computed when first requested.
      See Also:
  • Constructor Details

    • TransformWrapper2D

      TransformWrapper2D(CoordinateTransform impl)
      Creates a new wrapper for the given PROJ4J implementation.
  • Method Details

    • getSourceDimensions

      public final int getSourceDimensions()
      Returns the number of dimensions of input coordinates, which is 2.. This number of dimensions is implied by the MathTransform2D interface implemented by this class.
      Specified by:
      getSourceDimensions in interface org.opengis.referencing.operation.MathTransform
      Returns:
      the number of dimensions of input coordinates, which is 2
    • getTargetDimensions

      public final int getTargetDimensions()
      Returns the number of dimensions of output coordinates, which is 2.. This number of dimensions is implied by the MathTransform2D interface implemented by this class.
      Specified by:
      getTargetDimensions in interface org.opengis.referencing.operation.MathTransform
      Returns:
      the number of dimensions of output coordinates, which is 2
    • transform

      public Point2D transform(Point2D ptSrc, Point2D ptDst) throws org.opengis.referencing.operation.TransformException
      Transforms the specified ptSrc and stores the result in ptDst.
      Specified by:
      transform in interface org.opengis.referencing.operation.MathTransform2D
      Throws:
      org.opengis.referencing.operation.TransformException
    • transform

      public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.TransformException
      Transforms coordinate tuples in the given arrays in double precision. This is the most frequently used method.
      Specified by:
      transform in interface org.opengis.referencing.operation.MathTransform
      Throws:
      org.opengis.referencing.operation.TransformException
    • transform

      public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.TransformException
      Transforms coordinate tuples in the given arrays in single precision. This is a copy of the double-precision variant of this method with only cast added.
      Specified by:
      transform in interface org.opengis.referencing.operation.MathTransform
      Throws:
      org.opengis.referencing.operation.TransformException
    • transform

      public void transform(float[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.TransformException
      Transforms coordinate tuples in the given arrays, with source coordinates converted from single precision.
      Specified by:
      transform in interface org.opengis.referencing.operation.MathTransform
      Throws:
      org.opengis.referencing.operation.TransformException
    • transform

      public void transform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.TransformException
      Transforms coordinate tuples in the given arrays, with target coordinates converted to single precision.
      Specified by:
      transform in interface org.opengis.referencing.operation.MathTransform
      Throws:
      org.opengis.referencing.operation.TransformException
    • createTransformedShape

      public Shape createTransformedShape(Shape shape) throws org.opengis.referencing.operation.TransformException
      Transforms the given shape. This simple implementation transforms the control points. It does not check if some straight lines should be converted to curves.
      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) throws org.opengis.referencing.operation.TransformException
      Unsupported operation.
      Specified by:
      derivative in interface org.opengis.referencing.operation.MathTransform2D
      Throws:
      org.opengis.referencing.operation.TransformException
    • inverse

      public org.opengis.referencing.operation.MathTransform2D inverse()
      Returns the inverse of this coordinate operation..
      Specified by:
      inverse in interface org.opengis.referencing.operation.MathTransform
      Specified by:
      inverse in interface org.opengis.referencing.operation.MathTransform2D
      Returns:
      the inverse of this coordinate operation