Module org.opengis.geoapi.pending
Interface MathTransform2D

 All Superinterfaces:
MathTransform
public interface MathTransform2D extends MathTransform
Transforms twodimensional coordinate points.CoordinateOperation.getMathTransform()
may returns instance of this interface when source and destination coordinate systems are both two dimensional.MathTransform2D
extendsMathTransform
by adding some methods for easier interoperability with Java2D. Since:
 1.0
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.


Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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 specifiedptSrc
and stores the result inptDst
.
Methods inherited from interface MathTransform
derivative, getSourceDimensions, getTargetDimensions, isIdentity, toWKT, transform, transform, transform, transform, transform




Method Detail

transform
Point2D transform(Point2D ptSrc, Point2D ptDst) throws TransformException
Transforms the specifiedptSrc
and stores the result inptDst
. IfptDst
isnull
, a newPoint2D
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. IfptSrc
andptDst
are the same object, the input point is correctly overwritten with the transformed point. Parameters:
ptSrc
 the coordinate point to be transformed.ptDst
 the coordinate point that stores the result of transformingptSrc
, ornull
if a new point shall be created. Returns:
 the coordinate point after transforming
ptSrc
and storing the result inptDst
or in a new point ifptDst
was null.  Throws:
TransformException
 if the point can not be transformed. See Also:
AffineTransform.transform(Point2D, Point2D)

createTransformedShape
Shape createTransformedShape(Shape shape) throws TransformException
Transforms the specified shape. This method may replace straight lines by quadratic curves when applicable. It may also do the opposite (replace curves by straight lines). The returned shape doesn't need to have the same number of points than the original shape. Parameters:
shape
 the Shape to transform. Returns:
 the transformed shape. Some implementations may returns
shape
unmodified if this transform is identity.  Throws:
TransformException
 if a transform failed. See Also:
AffineTransform.createTransformedShape(Shape)

derivative
Matrix derivative(Point2D point) throws TransformException
Gets the derivative of this transform at a point. The derivative is the matrix of the nontranslating portion of the approximate affine map at the point. Parameters:
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. Returns:
 the derivative at the specified point as a 2×2 matrix. This method never returns an internal object: changing the matrix will not change the state of this math transform.
 Throws:
NullPointerException
 if the derivative dependents on coordinate andpoint
isnull
.TransformException
 if the derivative can not be evaluated at the specified point.

inverse
MathTransform2D inverse() throws NoninvertibleTransformException
Creates the inverse transform of this object. Specified by:
inverse
in interfaceMathTransform
 Returns:
 the inverse transform.
 Throws:
NoninvertibleTransformException
 if the transform can not be inverted. Since:
 2.2
 See Also:
AffineTransform.createInverse()

