Interface MathTransform2D
- All Superinterfaces:
MathTransform
- All Known Implementing Classes:
AffineTransform2D
,AlbersEqualArea
,AzimuthalEquidistant.Abstract
,AzimuthalEquidistant.Ellipsoidal
,AzimuthalEquidistant.Spherical
,CassiniSoldner
,CylindricalEqualArea
,EckertIV
,EqualArea
,EquatorialOrthographic
,EquatorialStereographic
,EquidistantConic
,EquidistantCylindrical
,GeneralOblique
,GeostationarySatellite
,GeostationarySatellite.Ellipsoidal
,GeostationarySatellite.Spherical
,Gnomonic
,Homolosine
,HotineObliqueMercator
,Krovak
,LambertAzimuthalEqualArea
,LambertConformal
,LambertConformal1SP
,LambertConformal2SP
,LambertConformalBelgium
,MapProjection
,Mercator
,Mercator1SP
,Mercator2SP
,MeteosatSG
,Mollweide
,NADCONTransform
,NewZealandMapGrid
,NTv2Transform
,ObliqueMercator
,ObliqueOrthographic
,ObliqueStereographic
,Orthographic
,PlateCarree
,PolarOrthographic
,PolarStereographic
,Polyconic.Abstract
,Polyconic.Ellipsoidal
,Polyconic.Spherical
,Robinson
,RotatedPole
,Sinusoidal
,Stereographic
,TransverseMercator
,WarpTransform2D
,WinkelTripel
,WorldVanDerGrintenI
Transforms two-dimensional coordinate points.
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
.
- Since:
- GeoAPI 1.0
- Author:
- Martin Desruisseaux (IRD)
-
Method Summary
Modifier and TypeMethodDescriptioncreateTransformedShape
(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.Transforms the specifiedptSrc
and stores the result inptDst
.Methods inherited from interface MathTransform
derivative, getSourceDimensions, getTargetDimensions, isIdentity, toWKT, transform, transform, transform, transform, transform
-
Method Details
-
transform
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 should be created.- Returns:
- the coordinate point after transforming
ptSrc
and stroring the result inptDst
or in a new point ifptDst
was null. - Throws:
TransformException
- if the point can't be transformed.
-
createTransformedShape
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.
-
derivative
Gets 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.- 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 non-null 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't be evaluated at the specified point.
-
inverse
Creates the inverse transform of this object.- Specified by:
inverse
in interfaceMathTransform
- Returns:
- The inverse transform.
- Throws:
NoninvertibleTransformException
- if the transform can't be inversed.- Since:
- GeoAPI 2.2
-