|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.ct.AbstractMathTransform
AbstractMathTransform
in the org.geotools.referencing.operation.transform
package.
Provides a default implementations for most methods required by the
MathTransform
interface. AbstractMathTransform
provides a convenient base class from which other transform classes
can be easily derived. In addition, AbstractMathTransform
implements methods required by the MathTransform2D
interface,
but does not implements MathTransform2D
.
Subclasses must declare implements MathTransform2D
themself if they know to maps two-dimensional coordinate systems.
Nested Class Summary | |
protected class |
AbstractMathTransform.Inverse
Deprecated. Default implementation for inverse math transform. |
Constructor Summary | |
AbstractMathTransform()
Deprecated. Construct a math transform. |
Method Summary | |
java.awt.Shape |
createTransformedShape(java.awt.Shape shape)
Deprecated. Transform the specified shape. |
Matrix |
derivative(CoordinatePoint point)
Deprecated. Gets the derivative of this transform at a point. |
Matrix |
derivative(java.awt.geom.Point2D point)
Deprecated. Gets the derivative of this transform at a point. |
boolean |
equals(java.lang.Object object)
Deprecated. Compares the specified object with this math transform for equality. |
static MathTransform |
fromGeoAPI(org.opengis.referencing.operation.MathTransform mt)
Deprecated. Mimic a GeoAPI interface as a legacy implementation. |
protected java.lang.String |
getName(java.util.Locale locale)
Deprecated. Returns a human readable name, if available. |
int |
hashCode()
Deprecated. Returns a hash value for this transform. |
MathTransform |
inverse()
Deprecated. Creates the inverse transform of this object. |
boolean |
isIdentity()
Deprecated. Tests whether this transform does not move any points. |
java.lang.String |
toString()
Deprecated. Returns a string repr?sentation of this transform. |
CoordinatePoint |
transform(CoordinatePoint ptSrc,
CoordinatePoint ptDst)
Deprecated. Transforms the specified ptSrc and stores the result
in ptDst . |
void |
transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Deprecated. Transforms a list of coordinate point ordinal values. |
java.awt.geom.Point2D |
transform(java.awt.geom.Point2D ptSrc,
java.awt.geom.Point2D ptDst)
Deprecated. Transforms the specified ptSrc and stores the result in ptDst .
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.geotools.ct.MathTransform |
getDimSource, getDimTarget, transform |
Constructor Detail |
public AbstractMathTransform()
Method Detail |
protected java.lang.String getName(java.util.Locale locale)
null
. The default implementation always returns null
.
locale
- The desired locale, or null
for a default locale.
null
if no name is available in any locale.public boolean isIdentity()
false
.
isIdentity
in interface MathTransform
true
if this MathTransform
is
an identity transform; false
otherwise.CT_MathTransform.isIdentity()
public java.awt.geom.Point2D transform(java.awt.geom.Point2D ptSrc, java.awt.geom.Point2D ptDst) throws org.opengis.referencing.operation.TransformException
ptSrc
and stores the result in ptDst
.
The default implementation invokes MathTransform.transform(double[],int,double[],int,int)
using a temporary array of doubles.
ptSrc
- the specified coordinate point to be transformed.ptDst
- the specified coordinate point that stores the
result of transforming ptSrc
, or
null
.
ptSrc
and stroring the result in ptDst
.
org.opengis.spatialschema.geometry.MismatchedDimensionException
- if this transform
doesn't map two-dimensional coordinate systems.
org.opengis.referencing.operation.TransformException
- if the point can't be transformed.MathTransform2D.transform(Point2D,Point2D)
public CoordinatePoint transform(CoordinatePoint ptSrc, CoordinatePoint ptDst) throws org.opengis.referencing.operation.TransformException
ptSrc
and stores the result
in ptDst
. The default implementation invokes
MathTransform.transform(double[],int,double[],int,int)
.
transform
in interface MathTransform
ptSrc
- the specified coordinate point to be transformed.ptDst
- the specified coordinate point that stores the
result of transforming ptSrc
, or
null
.
ptSrc
and storing the result in ptDst
, or a newly
created point if ptDst
was null.
org.opengis.referencing.operation.TransformException
- if the point can't be transformed.CT_MathTransform.transform(org.opengis.pt.PT_CoordinatePoint)
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws org.opengis.referencing.operation.TransformException
MathTransform.transform(double[],int,double[],int,int)
using a temporary array
of doubles.
transform
in interface MathTransform
srcPts
- the array containing the source point coordinates.srcOff
- the offset to the first point to be transformed
in the source array.dstPts
- the array into which the transformed point
coordinates are returned. May be the same
than srcPts
.dstOff
- the offset to the location of the first
transformed point that is stored in the
destination array.numPts
- the number of point objects to be transformed.
org.opengis.referencing.operation.TransformException
- if a point can't be transformed.public java.awt.Shape createTransformedShape(java.awt.Shape shape) throws org.opengis.referencing.operation.TransformException
shape
- Shape to transform.
shape
if
this transform is the identity transform.
java.lang.IllegalStateException
- if this transform doesn't map 2D coordinate systems.
org.opengis.referencing.operation.TransformException
- if a transform failed.MathTransform2D.createTransformedShape(Shape)
public Matrix derivative(java.awt.geom.Point2D point) throws org.opengis.referencing.operation.TransformException
MathTransform2D
interface
should override this method. Other subclasses should override
derivative(CoordinatePoint)
instead.
point
- The coordinate point where to evaluate the derivative.
org.opengis.spatialschema.geometry.MismatchedDimensionException
- if the input dimension is not 2.
org.opengis.referencing.operation.TransformException
- if the derivative can't be evaluated at the specified point.MathTransform2D.derivative(Point2D)
public Matrix derivative(CoordinatePoint point) throws org.opengis.referencing.operation.TransformException
point
has a valid dimension. Next, it try to delegate
the work to an other method:
derivative(Point2D)
.MathTransform1D
, then this
method delegates the work to derivative(double)
.TransformException
is thrown.
derivative
in interface MathTransform
point
- The coordinate point where to evaluate the derivative.
null
).
java.lang.NullPointerException
- if the derivative dependents on coordinate
and point
is null
.
org.opengis.spatialschema.geometry.MismatchedDimensionException
- if point
doesn't have
the expected dimension.
org.opengis.referencing.operation.TransformException
- if the derivative can't be evaluated at the
specified point.CT_MathTransform.derivative(org.opengis.pt.PT_CoordinatePoint)
public MathTransform inverse() throws org.opengis.referencing.operation.NoninvertibleTransformException
this
if this transform is an identity
transform, and throws a NoninvertibleTransformException
otherwise. Subclasses
should override this method.
inverse
in interface MathTransform
org.opengis.referencing.operation.NoninvertibleTransformException
- if the transform can't be inversed.CT_MathTransform.inverse()
public int hashCode()
public boolean equals(java.lang.Object object)
object
is an instance
of the same class than this
. Subclasses should override
this method in order to compare internal fields.
public java.lang.String toString()
public static MathTransform fromGeoAPI(org.opengis.referencing.operation.MathTransform mt) throws UnsupportedImplementationException
UnsupportedImplementationException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |