deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.crs.transformations.coordinate
Class ConcatenatedTransform

java.lang.Object
  extended by org.deegree.crs.Identifiable
      extended by org.deegree.crs.transformations.Transformation
          extended by org.deegree.crs.transformations.coordinate.CRSTransformation
              extended by org.deegree.crs.transformations.coordinate.ConcatenatedTransform
All Implemented Interfaces:
Serializable

public class ConcatenatedTransform
extends CRSTransformation

The ConcatenatedTransform class allows the connection of two transformations.

Calling inverse on this transformation will invert the whole underlying transformation chain. For example, if A * (B *C)=D and D is this transformation calling D.inverse() will result in (C.inverse * B.inverse) * A.inverse.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $
See Also:
Serialized Form

Constructor Summary
ConcatenatedTransform(Transformation first, Transformation second)
          Creates a transform by concatenating two existing transforms.
ConcatenatedTransform(Transformation first, Transformation second, Identifiable id)
          Creates a transform by concatenating two existing transforms.
 
Method Summary
 List<javax.vecmath.Point3d> doTransform(List<javax.vecmath.Point3d> srcPts)
          Do a transformation, e.g. the incoming data will be transformed into other coordinates.
 Transformation getFirstTransform()
           
 String getImplementationName()
           
 Transformation getSecondTransform()
           
 void inverse()
          This method flags the transformation about it's state.
 boolean isIdentity()
           
 
Methods inherited from class org.deegree.crs.transformations.Transformation
areInverse, createFromTo, doTransform, doTransform, getSourceCRS, getSourceDimension, getTargetCRS, getTargetDimension, getTransformationName, getTransformationPath, isInverseTransform, setSourceCRS
 
Methods inherited from class org.deegree.crs.Identifiable
checkForNullObject, checkForNullObject, checkForNullObject, equals, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getDescription, getDescriptions, getIdAndName, getIdentifier, getIdentifiers, getName, getNames, getVersion, getVersions, hasID, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConcatenatedTransform

public ConcatenatedTransform(Transformation first,
                             Transformation second,
                             Identifiable id)
Creates a transform by concatenating two existing transforms. A concatenated transform applies two transforms, one after the other. The dimension of the output space of the first transform must match the dimension of the input space in the second transform.

Parameters:
first - The first transformation to apply to given points.
second - The second transformation to apply to given points.
id - an identifiable instance containing information about this transformation

ConcatenatedTransform

public ConcatenatedTransform(Transformation first,
                             Transformation second)
Creates a transform by concatenating two existing transforms. A concatenated transform applies two transforms, one after the other. The dimension of the output space of the first transform must match the dimension of the input space in the second transform. Creates an Identifiable using the Transformation.createFromTo(String, String) method.

Parameters:
first - The first transformation to apply to given points.
second - The second transformation to apply to given points.
Method Detail

doTransform

public List<javax.vecmath.Point3d> doTransform(List<javax.vecmath.Point3d> srcPts)
                                        throws TransformationException
Description copied from class: Transformation
Do a transformation, e.g. the incoming data will be transformed into other coordinates.

Specified by:
doTransform in class Transformation
Parameters:
srcPts - the points which must be transformed, expected are following values either, long_1, lat_1, height_1, long_2, lat_2, height_2. or long_1, lat_1, long_2, lat_2
Returns:
the transformed points
Throws:
TransformationException - if a transform could not be calculated.

inverse

public void inverse()
Description copied from class: Transformation
This method flags the transformation about it's state. If this transformation was inverse calling this method will result in a forward transformation and vice versa.

Overrides:
inverse in class Transformation

isIdentity

public boolean isIdentity()
Specified by:
isIdentity in class Transformation
Returns:
true if this transformation doesn't transform the incoming points. (e.g. is the id. matrix)

getFirstTransform

public final Transformation getFirstTransform()
Returns:
the firstTransform, which is the second transformation if this transform is inverse.

getSecondTransform

public final Transformation getSecondTransform()
Returns:
the secondTransform, which is the first transformation if this transform is inverse.

getImplementationName

public String getImplementationName()
Specified by:
getImplementationName in class Transformation
Returns:
the name of the transformation.

deegree 2.3 (2010/04/09 10:10 build-4-official)

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