deegree 2.2 (2008/12/22 11:33 build-3038-official)

org.deegree.crs.transformations
Class ConcatenatedTransform

java.lang.Object
  extended by org.deegree.crs.Identifiable
      extended by org.deegree.crs.transformations.CRSTransformation
          extended by org.deegree.crs.transformations.ConcatenatedTransform

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:$, $Date:$
Author:
Rutger Bezema, last edited by: $Author:$

Field Summary
(package private)  boolean isIdentitiy
           
 
Fields inherited from class org.deegree.crs.transformations.CRSTransformation
isInverse
 
Constructor Summary
ConcatenatedTransform(CRSTransformation first, CRSTransformation second)
          Creates a transformation by concatenating two existing transforms.
ConcatenatedTransform(CRSTransformation first, CRSTransformation second, String identifier)
          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 comes from the sourceCRS and must be transformed to the targetCRS.
 CRSTransformation getFirstTransform()
           
 CRSTransformation getSecondTransform()
           
 void inverse()
          Call this method to indicate the transform should be inverse (or not).
 boolean isIdentity()
           
 
Methods inherited from class org.deegree.crs.transformations.CRSTransformation
areInverse, createFromTo, doTransform, doTransform, getSourceCRS, getSourceDimension, getTargetCRS, getTargetDimension, getTransformationName, getTransformationPath, isInverseTransform
 
Methods inherited from class org.deegree.crs.Identifiable
checkForNullObject, checkForNullObject, getAreaOfUse, getAreasOfUse, getDescription, getDescriptions, getIdAndName, getIdentifier, getIdentifiers, getName, getNames, getVersion, getVersions, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isIdentitiy

boolean isIdentitiy
Constructor Detail

ConcatenatedTransform

public ConcatenatedTransform(CRSTransformation first,
                             CRSTransformation second,
                             String identifier)
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.
identifier -

ConcatenatedTransform

public ConcatenatedTransform(CRSTransformation first,
                             CRSTransformation second)
Creates a transformation 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. This constructor creates an identifier with following form: FROM_id1_TO_id2. The name will be generated the same way (with getName() instead).

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

doTransform

public List<javax.vecmath.Point3d> doTransform(List<javax.vecmath.Point3d> srcPts)
Description copied from class: CRSTransformation
Do a transformation, e.g. the incoming data comes from the sourceCRS and must be transformed to the targetCRS.

Specified by:
doTransform in class CRSTransformation
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

inverse

public void inverse()
Description copied from class: CRSTransformation
Call this method to indicate the transform should be inverse (or not).

Overrides:
inverse in class CRSTransformation

isIdentity

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

getFirstTransform

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

getSecondTransform

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

deegree 2.2 (2008/12/22 11:33 build-3038-official)

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