deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.crs
Class Transformer

java.lang.Object
  extended by org.deegree.crs.Transformer
Direct Known Subclasses:
CoordinateTransformer, GeometryTransformer, RasterTransformer

public abstract class Transformer
extends Object

Abstract base class for all transformers. Stores a target coordinate system and creates CRSTransformation objects for a given source CRS.

Version:
$Revision: 22815 $, $Date: 2010-03-03 17:29:32 +0100 (Mi, 03 Mrz 2010) $
Author:
Oliver Tonnhofer, last edited by: $Author: rbezema $

Constructor Summary
protected Transformer(CoordinateSystem targetCRS)
          Creates a new Transformer object, with the given target CRS.
protected Transformer(String targetCRS)
          Creates a new Transformer object, with the given id as the target CRS.
protected Transformer(Transformation definedTransformation)
           
 
Method Summary
protected  Transformation createCRSTransformation(CoordinateSystem sourceCRS)
          Creates a transformation chain, which can be used to transform incoming coordinates (in the given source CRS) into this Transformer's targetCRS.
protected  Transformation createCRSTransformation(String sourceCRS)
          Creates a transformation chain, which can be used to transform incoming coordinates (in the given source CRS) into this Transformer's targetCRS.
 CoordinateSystem getTargetCRS()
           
 CRS getWrappedTargetCRS()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transformer

protected Transformer(CoordinateSystem targetCRS)
               throws IllegalArgumentException
Creates a new Transformer object, with the given target CRS.

Parameters:
targetCRS - to transform incoming coordinates to.
Throws:
IllegalArgumentException - if the given CoordinateSystem is null

Transformer

protected Transformer(String targetCRS)
               throws UnknownCRSException,
                      IllegalArgumentException
Creates a new Transformer object, with the given id as the target CRS.

Parameters:
targetCRS - an identifier to which all incoming coordinates shall be transformed.
Throws:
UnknownCRSException - if the given crs name could not be mapped to a valid (configured) crs.
IllegalArgumentException - if the given parameter is null.

Transformer

protected Transformer(Transformation definedTransformation)
Parameters:
definedTransformation - to use instead of the CRSFactory.
Throws:
IllegalArgumentException - if the given parameter is null.
Method Detail

createCRSTransformation

protected Transformation createCRSTransformation(CoordinateSystem sourceCRS)
                                          throws TransformationException,
                                                 IllegalArgumentException
Creates a transformation chain, which can be used to transform incoming coordinates (in the given source CRS) into this Transformer's targetCRS.

Parameters:
sourceCRS - in which the coordinates are defined.
Returns:
the Transformation chain.
Throws:
TransformationException - if no transformation chain could be created.
IllegalArgumentException - if the given CoordinateSystem is null

createCRSTransformation

protected Transformation createCRSTransformation(String sourceCRS)
                                          throws TransformationException,
                                                 IllegalArgumentException,
                                                 UnknownCRSException
Creates a transformation chain, which can be used to transform incoming coordinates (in the given source CRS) into this Transformer's targetCRS.

Parameters:
sourceCRS - in which the coordinates are defined.
Returns:
the Transformation chain.
Throws:
TransformationException - if no transformation chain could be created.
IllegalArgumentException - if the given CoordinateSystem is null
UnknownCRSException - if the given crs name could not be mapped to a valid (configured) crs.

getTargetCRS

public final CoordinateSystem getTargetCRS()
Returns:
the targetCRS

getWrappedTargetCRS

public final CRS getWrappedTargetCRS()
Returns:
the target crs as a wrapped CRS

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

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

]]>