org.apache.sis.referencing.operation.transform

## Class AbstractMathTransform2D.Inverse

- Object
- - FormattableObject
  - - AbstractMathTransform
    - - AbstractMathTransform.Inverse
      - - AbstractMathTransform2D.Inverse

- All Implemented Interfaces:
    Serializable, Parameterized, LenientComparable, MathTransform, MathTransform2D
  Enclosing class:
    AbstractMathTransform2D

      protected abstract class AbstractMathTransform2D.Inverse
      extends AbstractMathTransform.Inverse
      implements MathTransform2D

  Base class for implementation of inverse math transforms. This inner class is the inverse of the enclosing `AbstractMathTransform2D`.
  Serialization
  Instances of this class are serializable only if the enclosing math transform is also serializable. Serialized math transforms are not guaranteed to be compatible with future SIS versions. Serialization, if allowed, should be used only for short term storage or RMI between applications running the same SIS version.
  Since:
    0.5
  See Also:
    Serialized Form

  Defined in the `sis-referencing` module

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class AbstractMathTransform

      `AbstractMathTransform​.Inverse`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Inverse()` Constructs an inverse math transform.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Shape` | `createTransformedShape(Shape shape)` Transforms the specified shape.
    `Matrix` | `derivative(Point2D point)` Gets the derivative of this transform at a point.
    `MathTransform2D` | `inverse()` Returns the enclosing math transform.
    `Point2D` | `transform(Point2D ptSrc, Point2D ptDst)` Transforms the specified `ptSrc` and stores the result in `ptDst`.

    - ### Methods inherited from class AbstractMathTransform.Inverse

      `computeHashCode, derivative, equals, formatTo, getSourceDimensions, getTargetDimensions, isIdentity`

    - ### Methods inherited from class AbstractMathTransform

      `equals, getContextualParameters, getParameterDescriptors, getParameterValues, hashCode, transform, transform, transform, transform, transform, transform, tryConcatenate`

    - ### Methods inherited from class FormattableObject

      `print, toString, toString, toWKT`

    - ### Methods inherited from class Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface MathTransform

      `derivative, getSourceDimensions, getTargetDimensions, isIdentity, toWKT, transform, transform, transform, transform, transform`

- - ### Constructor Detail

    - #### Inverse

          protected Inverse()

      Constructs an inverse math transform.

  - ### Method Detail

    - #### inverse

          public MathTransform2D inverse()

      Returns the enclosing math transform.
      Specified by:
        `inverse` in interface `MathTransform`
      Specified by:
        `inverse` in interface `MathTransform2D`
      Overrides:
        `inverse` in class `AbstractMathTransform​.Inverse`
      Returns:
        the enclosing math transform.

    - #### transform

          public Point2D transform(Point2D ptSrc,
                                   Point2D ptDst)
                            throws TransformException

      Transforms the specified `ptSrc` and stores the result in `ptDst`. The default implementation invokes `AbstractMathTransform​.transform(double[], int, double[], int, boolean)` using a temporary array of doubles.
      Specified by:
        `transform` in interface `MathTransform2D`
      Parameters:
        `ptSrc` - the coordinate point to be transformed.
        `ptDst` - the coordinate point that stores the result of transforming `ptSrc`, or `null` if a new point shall be created.
      Returns:
        the coordinate point after transforming `ptSrc` and storing the result in `ptDst`, or in a new point if `ptDst` was null.
      Throws:
        `TransformException` - if the point can not be transformed.
      See Also:
        `MathTransform2D​.transform(Point2D, Point2D)`

    - #### createTransformedShape

          public Shape createTransformedShape(Shape shape)
                                       throws TransformException

      Transforms the specified shape. The default implementation computes quadratic curves using three points for each line segment in the shape. The returned object is often a `Path2D`, but may also be a `Line2D` or a `QuadCurve2D` if such simplification is possible.
      Specified by:
        `createTransformedShape` in interface `MathTransform2D`
      Parameters:
        `shape` - shape to transform.
      Returns:
        transformed shape, or `shape` if this transform is the identity transform.
      Throws:
        `TransformException` - if a transform failed.

    - #### derivative

          public Matrix derivative(Point2D point)
                            throws TransformException

      Gets the derivative of this transform at a point. The default implementation performs the following steps:
      - Copy the coordinate in a temporary array and pass that array to the `AbstractMathTransform​.transform(double[], int, double[], int, boolean)` method, with the `derivate` boolean argument set to `true`.
      - If the later method returned a non-null matrix, returns that matrix. Otherwise throws `TransformException`.
      Specified by:
        `derivative` in interface `MathTransform2D`
      Parameters:
        `point` - the coordinate point where to evaluate the derivative.
      Returns:
        the derivative at the specified point as a 2×2 matrix.
      Throws:
        `TransformException` - if the derivative can not be evaluated at the specified point.

Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.