public interface MathTransform2D extends MathTransform
CoordinateOperation.getMathTransform()
may
returns instance of this interface when source and destination coordinate systems are both two
dimensional. MathTransform2D
extends MathTransform
by adding some methods for
easier interoperability with Java2D.
If the transformation is affine, then MathTransform
shall be an
immutable instance of AffineTransform
.
Departure from OGC/ISO specification:
This interface is not part of OGC specification. It has been added in GeoAPI for close integration with the Java2D library. The API defined in this interface matches thejava.awt.geom.AffineTransform
API.
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()
Creates the inverse transform of this object.

Point2D 
transform(Point2D ptSrc,
Point2D ptDst)
Transforms the specified
ptSrc and stores the result in ptDst . 
derivative, getSourceDimensions, getTargetDimensions, isIdentity, toWKT, transform, transform, transform, transform, transform
Point2D transform(Point2D ptSrc, Point2D ptDst) throws TransformException
ptSrc
and stores the result in ptDst
.
If ptDst
is null
, a new Point2D
object is allocated
and then the result of the transformation is stored in this object. In either case,
ptDst
, which contains the transformed point, is returned for convenience.
If ptSrc
and ptDst
are the same object, the input point is
correctly overwritten with the transformed point.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.ptSrc
and storing the result
in ptDst
or in a new point if ptDst
was null.TransformException
 if the point can't be transformed.Shape createTransformedShape(Shape shape) throws TransformException
shape
 The Shape to transform.shape
unmodified if this transform is identity.TransformException
 if a transform failed.Matrix derivative(Point2D point) throws TransformException
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 nonnull
value.NullPointerException
 if the derivative dependents on coordinate
and point
is null
.TransformException
 if the derivative can't be evaluated at the
specified point.MathTransform2D inverse() throws NoninvertibleTransformException
inverse
in interface MathTransform
NoninvertibleTransformException
 if the transform can not be inverted.Copyright © 1994–2019 Open Geospatial Consortium. All rights reserved.