|
deegree 2.1 (2007/11/08 09:57 build-328-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.model.csct.ct.AbstractMathTransform
public abstract class AbstractMathTransform
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
Default implementation for inverse math transform. |
Constructor Summary | |
---|---|
AbstractMathTransform()
Construct a math transform. |
Method Summary | |
---|---|
(package private) static void |
addParameter(StringBuffer buffer,
String key,
double value)
Add the ", PARAMETER[" string
to the specified string buffer. |
(package private) static void |
addParameter(StringBuffer buffer,
String key,
int value)
Add the ", PARAMETER[" string
to the specified string buffer. |
Shape |
createTransformedShape(Shape shape)
Transform the specified shape. |
(package private) Shape |
createTransformedShape(Shape shape,
AffineTransform preTr,
AffineTransform postTr,
int quadDir)
Transforme une forme g�om�trique. |
Matrix |
derivative(CoordinatePoint point)
Gets the derivative of this transform at a point. |
Matrix |
derivative(Point2D point)
Gets the derivative of this transform at a point. |
boolean |
equals(Object object)
Compares the specified object with this math transform for equality. |
protected String |
getName()
Returns a human readable name, if available. |
int |
hashCode()
Returns a hash value for this transform. |
MathTransform |
inverse()
Creates the inverse transform of this object. |
(package private) static StringBuffer |
paramMT(String classification)
Returns a string buffer initialized with "PARAM_MT" and a classification name. |
String |
toString()
Returns a string repr�sentation of this transform. |
CoordinatePoint |
transform(CoordinatePoint ptSrc,
CoordinatePoint ptDst)
Transforms the specified ptSrc and stores the result
in ptDst . |
void |
transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Transforms a list of coordinate point ordinal values. |
Point2D |
transform(Point2D ptSrc,
Point2D ptDst)
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.deegree.model.csct.ct.MathTransform |
---|
getDimSource, getDimTarget, isIdentity, transform |
Constructor Detail |
---|
public AbstractMathTransform()
Method Detail |
---|
protected String getName()
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 Point2D transform(Point2D ptSrc, Point2D ptDst) throws 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
.
MismatchedDimensionException
- if this transform
doesn't map two-dimensional coordinate systems.
TransformException
- if the point can't be transformed.MathTransform2D.transform(Point2D,Point2D)
public CoordinatePoint transform(CoordinatePoint ptSrc, CoordinatePoint ptDst) throws 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.
TransformException
- if the point can't be transformed.public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws 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.
TransformException
- if a point can't be transformed.public Shape createTransformedShape(Shape shape) throws TransformException
shape
- Shape to transform.
shape
if
this transform is the identity transform.
IllegalStateException
- if this transform doesn't map 2D coordinate systems.
TransformException
- if a transform failed.MathTransform2D.createTransformedShape(Shape)
final Shape createTransformedShape(Shape shape, AffineTransform preTr, AffineTransform postTr, int quadDir) throws TransformException
GeneralPath
. Elle peut aussi retourner des objets Line2D
ou
QuadCurve2D
si une telle simplification est possible.
shape
- Forme g�om�trique � transformer.preTr
- Transformation affine � appliquer avant de transformer la forme
shape
, ou null
pour ne pas en appliquer.
Cet argument sera surtout utile lors des transformations inverses.postTr
- Transformation affine � appliquer apr�s avoir transform�e la
forme shape
, ou null
pour ne pas en appliquer.
Cet argument sera surtout utile lors des transformations directes.quadDir
- Direction des courbes quadratiques (Geometry.HORIZONTAL
ou Geometry.PARALLEL
).
MismatchedDimensionException
- if this transform
doesn't map two-dimensional coordinate systems.
TransformException
- Si une transformation a �chou�.public Matrix derivative(Point2D point) throws TransformException
derivative(CoordinatePoint)
.
point
- The coordinate point where to evaluate the derivative.
MismatchedDimensionException
- if the input dimension is not 2.
TransformException
- if the derivative can't be evaluated at the specified point.MathTransform2D.derivative(Point2D)
public Matrix derivative(CoordinatePoint point) throws TransformException
UnsupportedOperationException
(note: this default implementation may change in a future
version).
derivative
in interface MathTransform
point
- The coordinate point where to evaluate the derivative.
null
).
TransformException
- if the derivative can't be evaluated at the specified point.public MathTransform inverse() throws NoninvertibleTransformException
this
if this transform is an identity
transform, and throws a NoninvertibleTransformException
otherwise. Subclasses
should override this method.
inverse
in interface MathTransform
NoninvertibleTransformException
- if the transform can't be inversed.public int hashCode()
hashCode
in class Object
public boolean equals(Object object)
object
is an instance
of the same class than this
. Subclasses should override
this method in order to compare internal fields.
equals
in class Object
public String toString()
toString
in class Object
static StringBuffer paramMT(String classification)
static void addParameter(StringBuffer buffer, String key, double value)
", PARAMETER["", ]"
string
to the specified string buffer. This is a convenience method
for constructing WKT for "PARAM_MT".
static void addParameter(StringBuffer buffer, String key, int value)
", PARAMETER["", ]"
string
to the specified string buffer. This is a convenience method
for constructing WKT for "PARAM_MT".
|
deegree 2.1 (2007/11/08 09:57 build-328-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net