org.deegree.cs
Class Transformer

java.lang.Object
  extended by org.deegree.cs.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 Transformation objects for a given source CRS.

Version:
$Revision: 30120 $, $Date: 2011-03-22 10:04:15 +0100 (Tue, 22 Mar 2011) $
Author:
Oliver Tonnhofer, last edited by: $Author: aschmitz $

Constructor Summary
protected Transformer(ICRS 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(ICRS 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(ICRS sourceCRS, List<Transformation> toBeUsedTransformations)
          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.
 ICRS getTargetCRS()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transformer

protected Transformer(ICRS 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 ICoordinateSystem 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(ICRS 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 ICoordinateSystem is null

createCRSTransformation

protected Transformation createCRSTransformation(ICRS sourceCRS,
                                                 List<Transformation> toBeUsedTransformations)
                                          throws TransformationException
Creates a transformation chain, which can be used to transform incoming coordinates (in the given source CRS) into this Transformer's targetCRS. The list of transformations can be used to define separate transformations which must be used into the resulting transformation chain.

Parameters:
sourceCRS - in which the coordinates are defined.
toBeUsedTransformations - a list of transformations which must be used on the resulting transformation chain.
Returns:
the Transformation chain.
Throws:
TransformationException
TransformationException - if no transformation chain could be created.
IllegalArgumentException - if the given ICoordinateSystem 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 ICoordinateSystem is null
UnknownCRSException - if the given crs name could not be mapped to a valid (configured) crs.

getTargetCRS

public final ICRS getTargetCRS()
Returns:
the targetCRS


Copyright © 2011. All Rights Reserved.