deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.model.csct.ct
Class CoordinateTransformation

java.lang.Object
  extended by org.deegree.model.csct.cs.Info
      extended by org.deegree.model.csct.ct.CoordinateTransformation
All Implemented Interfaces:
Serializable

public class CoordinateTransformation
extends Info

Describes a coordinate transformation. A coordinate transformation class establishes an association between a source and a target coordinate reference system, and provides a MathTransform for transforming coordinates in the source coordinate reference system to coordinates in the target coordinate reference system. These coordinate systems can be ground or image coordinates. In general mathematics, "transformation" is the general term for mappings between coordinate systems (see tensor analysis).

For a ground coordinate point, if the transformation depends only on mathematically derived parameters (as in a cartographic projection), then this is an ISO conversion. If the transformation depends on empirically derived parameters (as in datum transformations), then this is an ISO transformation.

Version:
1.00, $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
Author:
OpenGIS (www.opengis.org), Martin Desruisseaux, last edited by: $Author: bezema $
See Also:
"org.opengis.ct.CT_CoordinateTransformation", Serialized Form

Field Summary
(package private)  CoordinateTransformation inverse
          The inverse transform.
protected  MathTransform transform
          The underlying math transform, or null if it doesn't has been constructed yet.
 
Constructor Summary
CoordinateTransformation(String name, CoordinateSystem sourceCS, CoordinateSystem targetCS, TransformType type, MathTransform transform)
          Construct a coordinate transformation.
 
Method Summary
 boolean equals(Object object)
          Compares the specified object with this coordinate transformation for equality.
 MathTransform getMathTransform()
          Gets the math transform.
 String getName()
          Gets the name of this coordinate transformation.
 CoordinateSystem getSourceCS()
          Gets the source coordinate system.
 CoordinateSystem getTargetCS()
          Gets the target coordinate system.
 TransformType getTransformType()
          Gets the semantic type of transform.
 int hashCode()
          Returns a hash value for this coordinate transformation.
 CoordinateTransformation inverse()
          Returns the inverse transform of this object.
 
Methods inherited from class org.deegree.model.csct.cs.Info
ensureNonNull, getAbbreviation, getAlias, getAuthority, getAuthorityCode, getRemarks, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

transform

protected MathTransform transform
The underlying math transform, or null if it doesn't has been constructed yet. If null, then subclass must initialize this field the first time getMathTransform() is invoked.


inverse

transient CoordinateTransformation inverse
The inverse transform. This field will be computed only when needed.

Constructor Detail

CoordinateTransformation

public CoordinateTransformation(String name,
                                CoordinateSystem sourceCS,
                                CoordinateSystem targetCS,
                                TransformType type,
                                MathTransform transform)
Construct a coordinate transformation.

Parameters:
name - The coordinate transformation name, or null for an automatically generated name.
sourceCS - The source coordinate system.
targetCS - The destination coordinate system.
type - The transform type.
transform - The math transform. This argument is allowed to be null only if this constructor is invoked from within a subclass constructor. In this case, the subclass must construct a math transform no later than the first time getMathTransform() is invoked.
Method Detail

getName

public String getName()
Gets the name of this coordinate transformation.

Overrides:
getName in class Info
Parameters:
locale - The desired locale, or null for the default locale.
Returns:
the name of this coordinate transformation.
See Also:
"org.opengis.cs.CS_Info#getName()"

getSourceCS

public CoordinateSystem getSourceCS()
Gets the source coordinate system.

Returns:
the source coordinate system.
See Also:
"org.opengis.ct.CT_CoordinateTransformation#getSourceCS()"

getTargetCS

public CoordinateSystem getTargetCS()
Gets the target coordinate system.

Returns:
the target coordinate system.
See Also:
"org.opengis.ct.CT_CoordinateTransformation#getTargetCS()"

getTransformType

public TransformType getTransformType()
Gets the semantic type of transform. For example, a datum transformation or a coordinate conversion.

Returns:
the semantic type of transform.
See Also:
"org.opengis.ct.CT_CoordinateTransformation#getTransformType()"

getMathTransform

public MathTransform getMathTransform()
Gets the math transform. The math transform will transform positions in the source coordinate system into positions in the target coordinate system.

Returns:
the math transform. The math transform will transform positions in the source coordinate system into positions in the target coordinate system.
See Also:
"org.opengis.ct.CT_CoordinateTransformation#getMathTransform()"

inverse

public CoordinateTransformation inverse()
                                 throws NoninvertibleTransformException
Returns the inverse transform of this object.

Returns:
the inverse transform of this object.
Throws:
NoninvertibleTransformException

hashCode

public int hashCode()
Returns a hash value for this coordinate transformation.

Overrides:
hashCode in class Info
Returns:
a hash value for this coordinate transformation.

equals

public boolean equals(Object object)
Compares the specified object with this coordinate transformation for equality. The default implementation compare name, transform type, source and target coordinate systems. It doesn't compare the math transform, since it should be equivalents if the above mentionned parameters are equal.

Overrides:
equals in class Info
Parameters:
object -
Returns:

deegree 2.1 (2007/11/08 09:57 build-328-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net