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

org.deegree.model.csct.ct
Class CoordinateTransformationFactory

java.lang.Object
  extended by org.deegree.model.csct.ct.CoordinateTransformationFactory

public class CoordinateTransformationFactory
extends Object

Creates coordinate transformations.

Version:
1.0
Author:
OpenGIS (www.opengis.org), Martin Desruisseaux
See Also:
org.opengis.ct.CT_CoordinateTransformationFactory

Constructor Summary
CoordinateTransformationFactory(MathTransformFactory factory)
          Construct a coordinate transformation factory.
 
Method Summary
 CoordinateTransformation createFromCoordinateSystems(CoordinateSystem sourceCS, CoordinateSystem targetCS)
          Creates a transformation between two coordinate systems.
protected  CoordinateTransformation createTransformationStep(CompoundCoordinateSystem sourceCS, CompoundCoordinateSystem targetCS)
          Creates a transformation between two compound coordinate systems.
protected  CoordinateTransformation createTransformationStep(CompoundCoordinateSystem sourceCS, GeocentricCoordinateSystem targetCS)
          Creates a transformation between a compound and a geocentric coordinate systems.
protected  CoordinateTransformation createTransformationStep(GeocentricCoordinateSystem sourceCS, GeocentricCoordinateSystem targetCS)
          Creates a transformation between two geocentric coordinate systems.
protected  CoordinateTransformation createTransformationStep(GeographicCoordinateSystem sourceCS, GeocentricCoordinateSystem targetCS)
          Creates a transformation between a geographic and a geocentric coordinate systems.
protected  CoordinateTransformation createTransformationStep(GeographicCoordinateSystem sourceCS, GeographicCoordinateSystem targetCS)
          Creates a transformation between two geographic coordinate systems.
protected  CoordinateTransformation createTransformationStep(GeographicCoordinateSystem sourceCS, ProjectedCoordinateSystem targetCS)
          Creates a transformation between a geographic and a projected coordinate systems.
protected  CoordinateTransformation createTransformationStep(ProjectedCoordinateSystem sourceCS, GeographicCoordinateSystem targetCS)
          Creates a transformation between a projected and a geographic coordinate systems.
protected  CoordinateTransformation createTransformationStep(ProjectedCoordinateSystem sourceCS, ProjectedCoordinateSystem targetCS)
          Creates a transformation between two projected coordinate systems.
protected  CoordinateTransformation createTransformationStep(TemporalCoordinateSystem sourceCS, TemporalCoordinateSystem targetCS)
          Creates a transformation between two temporal coordinate systems.
protected  CoordinateTransformation createTransformationStep(VerticalCoordinateSystem sourceCS, VerticalCoordinateSystem targetCS)
          Creates a transformation between two vertical coordinate systems.
static CoordinateTransformationFactory getDefault()
          Returns the default coordinate transformation factory.
 MathTransformFactory getMathTransformFactory()
          Returns the underlying math transform factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoordinateTransformationFactory

public CoordinateTransformationFactory(MathTransformFactory factory)
Construct a coordinate transformation factory.

Parameters:
factory - The math transform factory to use.
Method Detail

getDefault

public static CoordinateTransformationFactory getDefault()
Returns the default coordinate transformation factory.


getMathTransformFactory

public final MathTransformFactory getMathTransformFactory()
Returns the underlying math transform factory. This factory is used for constructing MathTransform objects for all CoordinateTransformation.


createFromCoordinateSystems

public CoordinateTransformation createFromCoordinateSystems(CoordinateSystem sourceCS,
                                                            CoordinateSystem targetCS)
                                                     throws CannotCreateTransformException
Creates a transformation between two coordinate systems. This method will examine the coordinate systems in order to construct a transformation between them. This method may fail if no path between the coordinate systems is found.

Parameters:
sourceCS - Input coordinate system.
targetCS - Output coordinate system.
Returns:
A coordinate transformation from sourceCS to targetCS.
Throws:
CannotCreateTransformException - if no transformation path has been found.

createTransformationStep

protected CoordinateTransformation createTransformationStep(TemporalCoordinateSystem sourceCS,
                                                            TemporalCoordinateSystem targetCS)
                                                     throws CannotCreateTransformException
Creates a transformation between two temporal coordinate systems. This method is automatically invoked by createFromCoordinateSystems(...). The default implementation checks if both coordinate systems use the same datum, and then adjusts for axis orientation, units and epoch.

Parameters:
sourceCS - Input coordinate system.
targetCS - Output coordinate system.
Returns:
A coordinate transformation from sourceCS to targetCS.
Throws:
CannotCreateTransformException - if no transformation path has been found.

createTransformationStep

protected CoordinateTransformation createTransformationStep(VerticalCoordinateSystem sourceCS,
                                                            VerticalCoordinateSystem targetCS)
                                                     throws CannotCreateTransformException
Creates a transformation between two vertical coordinate systems. This method is automatically invoked by createFromCoordinateSystems(...). The default implementation checks if both coordinate systems use the same datum, and then adjusts for axis orientation and units.

Parameters:
sourceCS - Input coordinate system.
targetCS - Output coordinate system.
Returns:
A coordinate transformation from sourceCS to targetCS.
Throws:
CannotCreateTransformException - if no transformation path has been found.

createTransformationStep

protected CoordinateTransformation createTransformationStep(GeographicCoordinateSystem sourceCS,
                                                            GeographicCoordinateSystem targetCS)
                                                     throws CannotCreateTransformException
Creates a transformation between two geographic coordinate systems. This method is automatically invoked by createFromCoordinateSystems(...). The default implementation can adjust axis order and orientation (e.g. transforming from (NORTH,WEST) to (EAST,NORTH)), performs units conversion and apply Bursa Wolf transformation if needed.

Parameters:
sourceCS - Input coordinate system.
targetCS - Output coordinate system.
Returns:
A coordinate transformation from sourceCS to targetCS.
Throws:
CannotCreateTransformException - if no transformation path has been found.

createTransformationStep

protected CoordinateTransformation createTransformationStep(ProjectedCoordinateSystem sourceCS,
                                                            ProjectedCoordinateSystem targetCS)
                                                     throws CannotCreateTransformException
Creates a transformation between two projected coordinate systems. This method is automatically invoked by createFromCoordinateSystems(...). The default implementation can adjust axis order and orientation. It also performs units conversion if it is the only extra change needed. Otherwise, it performs three steps:
  1. Unproject sourceCS.
  2. Transform from sourceCS.geographicCS to targetCS.geographicCS.
  3. Project targetCS.

Parameters:
sourceCS - Input coordinate system.
targetCS - Output coordinate system.
Returns:
A coordinate transformation from sourceCS to targetCS.
Throws:
CannotCreateTransformException - if no transformation path has been found.

createTransformationStep

protected CoordinateTransformation createTransformationStep(GeographicCoordinateSystem sourceCS,
                                                            ProjectedCoordinateSystem targetCS)
                                                     throws CannotCreateTransformException
Creates a transformation between a geographic and a projected coordinate systems. This method is automatically invoked by createFromCoordinateSystems(...).

Parameters:
sourceCS - Input coordinate system.
targetCS - Output coordinate system.
Returns:
A coordinate transformation from sourceCS to targetCS.
Throws:
CannotCreateTransformException - if no transformation path has been found.

createTransformationStep

protected CoordinateTransformation createTransformationStep(ProjectedCoordinateSystem sourceCS,
                                                            GeographicCoordinateSystem targetCS)
                                                     throws CannotCreateTransformException
Creates a transformation between a projected and a geographic coordinate systems. This method is automatically invoked by createFromCoordinateSystems(...). The default implementation returns createTransformationStep(targetCS, sourceCS).inverse().

Parameters:
sourceCS - Input coordinate system.
targetCS - Output coordinate system.
Returns:
A coordinate transformation from sourceCS to targetCS.
Throws:
CannotCreateTransformException - if no transformation path has been found.

createTransformationStep

protected CoordinateTransformation createTransformationStep(GeocentricCoordinateSystem sourceCS,
                                                            GeocentricCoordinateSystem targetCS)
                                                     throws CannotCreateTransformException
Creates a transformation between two geocentric coordinate systems. This method is automatically invoked by createFromCoordinateSystems(...). The default implementation can adjust for axis order and orientation, adjust for prime meridian, performs units conversion and apply Bursa Wolf transformation if needed.

Parameters:
sourceCS - Input coordinate system.
targetCS - Output coordinate system.
Returns:
A coordinate transformation from sourceCS to targetCS.
Throws:
CannotCreateTransformException - if no transformation path has been found.

createTransformationStep

protected CoordinateTransformation createTransformationStep(GeographicCoordinateSystem sourceCS,
                                                            GeocentricCoordinateSystem targetCS)
                                                     throws CannotCreateTransformException
Creates a transformation between a geographic and a geocentric coordinate systems. Since the source coordinate systems doesn't have a vertical axis, height above the ellipsoid is assumed equals to zero everywhere. This method is automatically invoked by createFromCoordinateSystems(...).

Parameters:
sourceCS - Input geographic coordinate system.
targetCS - Output coordinate system.
Returns:
A coordinate transformation from sourceCS to targetCS.
Throws:
CannotCreateTransformException - if no transformation path has been found.

createTransformationStep

protected CoordinateTransformation createTransformationStep(CompoundCoordinateSystem sourceCS,
                                                            GeocentricCoordinateSystem targetCS)
                                                     throws CannotCreateTransformException
Creates a transformation between a compound and a geocentric coordinate systems. The compound coordinate system must be an aggregate of the two following coordinate systems: This method is automatically invoked by createFromCoordinateSystems(...).

Parameters:
sourceCS - Input compound coordinate system.
targetCS - Output coordinate system.
Returns:
A coordinate transformation from sourceCS to targetCS.
Throws:
CannotCreateTransformException - if no transformation path has been found.

createTransformationStep

protected CoordinateTransformation createTransformationStep(CompoundCoordinateSystem sourceCS,
                                                            CompoundCoordinateSystem targetCS)
                                                     throws CannotCreateTransformException
Creates a transformation between two compound coordinate systems. This method is automatically invoked by createFromCoordinateSystems(...).

Parameters:
sourceCS - Input coordinate system.
targetCS - Output coordinate system.
Returns:
A coordinate transformation from sourceCS to targetCS.
Throws:
CannotCreateTransformException - if no transformation path has been found.

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