- All Superinterfaces:
public interface MathTransform2D extends MathTransformTransforms two-dimensional coordinate points.
CoordinateOperation.getMathTransform()may returns instance of this interface when source and destination coordinate systems are both two dimensional.
MathTransformby adding some methods for easier inter-operability with Java2D.
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 the
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
createTransformedShape(Shape shape)Transforms the specified shape.
derivative(Point2D point)Gets the derivative of this transform at a point.
inverse()Creates the inverse transform of this object.
transform(Point2D ptSrc, Point2D ptDst)Transforms the specified
ptSrcand stores the result in
Point2D transform(Point2D ptSrc, Point2D ptDst) throws TransformExceptionTransforms the specified
ptSrcand stores the result in
null, a new
Point2Dobject 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
ptDstare 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
nullif a new point shall be created.
- the coordinate point after transforming
ptSrcand storing the result in
ptDstor in a new point if
TransformException- if the point can not be transformed.
- See Also:
Shape createTransformedShape(Shape shape) throws TransformExceptionTransforms 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.
Matrix derivative(Point2D point) throws TransformExceptionGets the derivative of this transform at a point. The derivative is the matrix of the non-translating portion of the approximate affine map at the point.
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 non-null value.
- 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.
NullPointerException- if the derivative dependents on coordinate and
TransformException- if the derivative can not be evaluated at the specified point.
MathTransform2D inverse() throws NoninvertibleTransformExceptionCreates the inverse transform of this object.