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

org.deegree.crs.transformations
Class MatrixTransform

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

public class MatrixTransform
extends CRSTransformation

The MatrixTransform class allows transformations using matrices. Although technically n × m matrices are possible, at the moment only 2 × 2, 3 × 3 and 4 × 4 matrices are supported.

Version:
$Revision:$, $Date:$
Author:
Rutger Bezema, last edited by: $Author:$

Field Summary
 
Fields inherited from class org.deegree.crs.transformations.CRSTransformation
isInverse
 
Constructor Summary
MatrixTransform(CoordinateSystem source, CoordinateSystem target, javax.vecmath.GMatrix matrix)
          Construct a transform with id set to CRSTransformation.createFromTo(String, String) and name to 'Matrix-Transform'.
MatrixTransform(CoordinateSystem source, CoordinateSystem target, javax.vecmath.GMatrix matrix, String identifier)
          Construct a transform with name set to 'Matrix-Transform'.
MatrixTransform(CoordinateSystem source, CoordinateSystem target, javax.vecmath.GMatrix matrix, String identifier, String name)
          Construct a transform.
MatrixTransform(CoordinateSystem source, CoordinateSystem target, javax.vecmath.Matrix3d matrix)
          Construct a 3d transform with id set to CRSTransformation.createFromTo(String, String) and name to 'Matrix-Transform'.
MatrixTransform(CoordinateSystem source, CoordinateSystem target, javax.vecmath.Matrix3d matrix, String identifier)
          Construct a 3d transform with name set to 'Matrix-Transform'.
MatrixTransform(CoordinateSystem source, CoordinateSystem target, javax.vecmath.Matrix3d matrix, String identifier, String name)
          Construct a 3d transform.
MatrixTransform(CoordinateSystem source, CoordinateSystem target, javax.vecmath.Matrix4d matrix)
          Construct a 4d transform with id set to CRSTransformation.createFromTo(String, String) and name to 'Matrix-Transform'.
MatrixTransform(CoordinateSystem source, CoordinateSystem target, javax.vecmath.Matrix4d matrix, String identifier)
          Construct a 4d transform with name set to 'Matrix-Transform'.
MatrixTransform(CoordinateSystem source, CoordinateSystem target, javax.vecmath.Matrix4d matrix, String identifier, String name)
          Construct a 4d transform.
 
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.
 boolean equals(Object object)
           
 int getDimSource()
           
 int getDimTarget()
           
 javax.vecmath.GMatrix getMatrix()
           
 boolean isIdentity()
           
 
Methods inherited from class org.deegree.crs.transformations.CRSTransformation
areInverse, createFromTo, doTransform, doTransform, getSourceCRS, getSourceDimension, getTargetCRS, getTargetDimension, getTransformationName, getTransformationPath, inverse, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MatrixTransform

public MatrixTransform(CoordinateSystem source,
                       CoordinateSystem target,
                       javax.vecmath.GMatrix matrix,
                       String identifier,
                       String name)
Construct a transform.

Parameters:
source - the source coordinate system
target - the target coordinate system.
matrix -
identifier -
name - of the transformation

MatrixTransform

public MatrixTransform(CoordinateSystem source,
                       CoordinateSystem target,
                       javax.vecmath.GMatrix matrix,
                       String identifier)
Construct a transform with name set to 'Matrix-Transform'.

Parameters:
source - the source coordinate system
target - the target coordinate system.
matrix -
identifier -

MatrixTransform

public MatrixTransform(CoordinateSystem source,
                       CoordinateSystem target,
                       javax.vecmath.GMatrix matrix)
Construct a transform with id set to CRSTransformation.createFromTo(String, String) and name to 'Matrix-Transform'.

Parameters:
source - the source coordinate system
target - the target coordinate system.
matrix -

MatrixTransform

public MatrixTransform(CoordinateSystem source,
                       CoordinateSystem target,
                       javax.vecmath.Matrix3d matrix,
                       String identifier,
                       String name)
Construct a 3d transform.

Parameters:
source - the source coordinate system
target - the target coordinate system.
matrix -
identifier -
name - of the transformation

MatrixTransform

public MatrixTransform(CoordinateSystem source,
                       CoordinateSystem target,
                       javax.vecmath.Matrix3d matrix,
                       String identifier)
Construct a 3d transform with name set to 'Matrix-Transform'.

Parameters:
source - the source coordinate system
target - the target coordinate system.
matrix -
identifier -

MatrixTransform

public MatrixTransform(CoordinateSystem source,
                       CoordinateSystem target,
                       javax.vecmath.Matrix3d matrix)
Construct a 3d transform with id set to CRSTransformation.createFromTo(String, String) and name to 'Matrix-Transform'.

Parameters:
source - the source coordinate system
target - the target coordinate system.
matrix -

MatrixTransform

public MatrixTransform(CoordinateSystem source,
                       CoordinateSystem target,
                       javax.vecmath.Matrix4d matrix,
                       String identifier,
                       String name)
Construct a 4d transform.

Parameters:
source - the source coordinate system
target - the target coordinate system.
matrix -
identifier -
name - of this transform

MatrixTransform

public MatrixTransform(CoordinateSystem source,
                       CoordinateSystem target,
                       javax.vecmath.Matrix4d matrix,
                       String identifier)
Construct a 4d transform with name set to 'Matrix-Transform'.

Parameters:
source - the source coordinate system
target - the target coordinate system.
matrix -
identifier -

MatrixTransform

public MatrixTransform(CoordinateSystem source,
                       CoordinateSystem target,
                       javax.vecmath.Matrix4d matrix)
Construct a 4d transform with id set to CRSTransformation.createFromTo(String, String) and name to 'Matrix-Transform'.

Parameters:
source - the source coordinate system
target - the target coordinate system.
matrix -
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

getDimSource

public int getDimSource()
Returns:
the dimension of input points.

getDimTarget

public int getDimTarget()
Returns:
the dimension of output points.

isIdentity

public boolean isIdentity()
Specified by:
isIdentity in class CRSTransformation
Returns:
true if this transformation holds an identiy matrix (e.g. doesn't transform at all).

equals

public boolean equals(Object object)
Overrides:
equals in class Object

getMatrix

public final javax.vecmath.GMatrix getMatrix()
Returns:
the matrix.

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