Class AbstractMathTransform2D.Inverse
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.operation.transform.AbstractMathTransform
org.apache.sis.referencing.operation.transform.AbstractMathTransform.Inverse
org.apache.sis.referencing.operation.transform.AbstractMathTransform2D.Inverse
- All Implemented Interfaces:
Parameterized
,LenientComparable
,org.opengis.referencing.operation.MathTransform
,org.opengis.referencing.operation.MathTransform2D
- Direct Known Subclasses:
LongitudeWraparound.Inverse
,NormalizedProjection.Inverse
,ZonedGridSystem.Inverse
- Enclosing class:
AbstractMathTransform2D
protected abstract static class AbstractMathTransform2D.Inverse
extends AbstractMathTransform.Inverse
implements org.opengis.referencing.operation.MathTransform2D
Base class for implementation of inverse math transforms.
This inner class is the inverse of the enclosing
AbstractMathTransform2D
.
Serialization
This object may or may not be serializable, at implementation choices. Most Apache SIS implementations are serializable, but the serialized objects are not guaranteed to be compatible with future SIS versions. Serialization should be used only for short term storage or RMI between applications running the same SIS version.- Since:
- 0.5
- Version:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
AbstractMathTransform.Inverse
-
Field Summary
Fields inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
MAXIMUM_BUFFER_SIZE, MAXIMUM_FAILURES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTransformedShape
(Shape shape) Transforms the specified shape.org.opengis.referencing.operation.Matrix
derivative
(Point2D point) Gets the derivative of this transform at a point.abstract org.opengis.referencing.operation.MathTransform2D
inverse()
Returns the inverse of this math transform.Transforms the specifiedptSrc
and stores the result inptDst
.Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform.Inverse
beforeFormat, computeHashCode, derivative, equals, formatTo, getDomain, getSourceDimensions, getTargetDimensions, isIdentity
Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
equals, getContextualParameters, getParameterDescriptors, getParameterValues, hashCode, isInverseEquals, mismatchedDimension, transform, transform, transform, transform, transform, transform, tryConcatenate
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKT
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.referencing.operation.MathTransform
derivative, getSourceDimensions, getTargetDimensions, isIdentity, toWKT, transform, transform, transform, transform, transform
-
Constructor Details
-
Inverse
protected Inverse()Constructs an inverse math transform.
-
-
Method Details
-
inverse
public abstract org.opengis.referencing.operation.MathTransform2D inverse()Returns the inverse of this math transform. The returned transform should be the enclosing math transform.- Specified by:
inverse
in interfaceorg.opengis.referencing.operation.MathTransform
- Specified by:
inverse
in interfaceorg.opengis.referencing.operation.MathTransform2D
- Specified by:
inverse
in classAbstractMathTransform.Inverse
- Returns:
- the inverse of this transform.
-
transform
public Point2D transform(Point2D ptSrc, Point2D ptDst) throws org.opengis.referencing.operation.TransformException Transforms the specifiedptSrc
and stores the result inptDst
. The default implementation invokesAbstractMathTransform.transform(double[], int, double[], int, boolean)
using a temporary array of doubles.- Specified by:
transform
in interfaceorg.opengis.referencing.operation.MathTransform2D
- Parameters:
ptSrc
- the coordinate tuple to be transformed.ptDst
- the coordinate tuple that stores the result of transformingptSrc
, ornull
if a new point shall be created.- Returns:
- the coordinate tuple after transforming
ptSrc
and storing the result inptDst
, or in a new point ifptDst
was null. - Throws:
org.opengis.referencing.operation.TransformException
- if the point cannot be transformed.- See Also:
-
createTransformedShape
public Shape createTransformedShape(Shape shape) throws org.opengis.referencing.operation.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 aPath2D
, but may also be aLine2D
or aQuadCurve2D
if such simplification is possible.- Specified by:
createTransformedShape
in interfaceorg.opengis.referencing.operation.MathTransform2D
- Parameters:
shape
- shape to transform.- Returns:
- transformed shape, or
shape
if this transform is the identity transform. - Throws:
org.opengis.referencing.operation.TransformException
- if a transform failed.
-
derivative
public org.opengis.referencing.operation.Matrix derivative(Point2D point) throws org.opengis.referencing.operation.TransformException Gets the derivative of this transform at a point. The default implementation performs the following steps:- Copy the coordinates in a temporary array and pass that array to the
AbstractMathTransform.transform(double[], int, double[], int, boolean)
method, with thederivate
boolean argument set totrue
. - If the latter method returned a non-null matrix, returns that matrix.
Otherwise throws
TransformException
.
- Specified by:
derivative
in interfaceorg.opengis.referencing.operation.MathTransform2D
- Parameters:
point
- the coordinate tuple where to evaluate the derivative.- Returns:
- the derivative at the specified point as a 2×2 matrix.
- Throws:
org.opengis.referencing.operation.TransformException
- if the derivative cannot be evaluated at the specified point.
- Copy the coordinates in a temporary array and pass that array to the
-