org.deegree_impl.model.ct
Class GeoTransformer

java.lang.Object
  extended byorg.deegree_impl.model.ct.GeoTransformer

public final class GeoTransformer
extends java.lang.Object

class for transforming deegree geometries to new coordinate reference systems.

------------------------------------------------------------

Version:
$Revision: 1.10 $ $Date: 2004/02/23 07:47:50 $
Author:
Andreas Poth

Field Summary
private  ConvenienceCSFactory csFactory
           
private  CoordinateSystem targetCS
           
private  CS_CoordinateSystem targetOGCCS
           
 
Constructor Summary
GeoTransformer(CoordinateSystem targetCS)
          Creates a new GeoTransformer object.
GeoTransformer(CS_CoordinateSystem targetCS)
          Creates a new GeoTransformer object.
GeoTransformer(java.lang.String targetCS)
          Creates a new GeoTransformer object.
 
Method Summary
 CS_CoordinateSystem getTargetCS()
          returns the target CRS of the GeoTransformer
 void setTargetCS(CoordinateSystem targetCS)
          sets the target coordinate reference system of the Transformer
 void setTargetCS(CS_CoordinateSystem targetCS)
          sets the target coordinate reference system of the Transformer
 GM_Object transform(GM_Object geo)
          transforms the coodinates of a deegree geometry to the target coordinate reference system.
private  GM_Object transformCurve(GM_Curve geo, MathTransform trans)
          transforms the submitted curve to the target coordinate reference system
 GM_Envelope transformEnvelope(GM_Envelope envelope, CoordinateSystem sourceCRS)
          transfroms a GM_Envelope to the target crs of the GeoTransformer instance
 GM_Envelope transformEnvelope(GM_Envelope envelope, CS_CoordinateSystem sourceCRS)
          transfroms a GM_Envelope to the target crs of the GeoTransformer instance
 GM_Envelope transformEnvelope(GM_Envelope envelope, java.lang.String sourceCRS)
          transfroms a GM_Envelope to the target crs of the GeoTransformer instance
private  GM_Object transformMultiCurve(GM_MultiCurve geo, MathTransform trans)
          transforms the submitted multi curve to the target coordinate reference system
private  GM_Object transformMultiPoint(GM_MultiPoint geo, MathTransform trans)
          transforms the submitted multi point to the target coordinate reference system
private  GM_Object transformMultiSurface(GM_MultiSurface geo, MathTransform trans)
          transforms the submitted multi surface to the target coordinate reference system
private  GM_Object transformPoint(GM_Point geo, MathTransform trans)
          transforms the submitted point to the target coordinate reference system
private  GM_Position[] transformPositions(GM_Position[] pos, MathTransform trans)
          transfroms an array of GM_Positions to the target coordinate reference system
private  GM_Object transformSurface(GM_Surface geo, MathTransform trans)
          transforms the submitted surface to the target coordinate reference system
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetOGCCS

private CS_CoordinateSystem targetOGCCS

csFactory

private ConvenienceCSFactory csFactory

targetCS

private CoordinateSystem targetCS
Constructor Detail

GeoTransformer

public GeoTransformer(java.lang.String targetCS)
               throws java.lang.Exception
Creates a new GeoTransformer object.

Parameters:
targetCS -
Throws:
java.lang.Exception

GeoTransformer

public GeoTransformer(CoordinateSystem targetCS)
               throws java.lang.Exception
Creates a new GeoTransformer object.

Parameters:
targetCS -
Throws:
java.lang.Exception

GeoTransformer

public GeoTransformer(CS_CoordinateSystem targetCS)
               throws java.lang.Exception
Creates a new GeoTransformer object.

Parameters:
targetCS -
Throws:
java.lang.Exception
Method Detail

setTargetCS

public void setTargetCS(CS_CoordinateSystem targetCS)
                 throws java.lang.Exception
sets the target coordinate reference system of the Transformer

Throws:
java.lang.Exception

setTargetCS

public void setTargetCS(CoordinateSystem targetCS)
                 throws java.lang.Exception
sets the target coordinate reference system of the Transformer

Throws:
java.lang.Exception

getTargetCS

public CS_CoordinateSystem getTargetCS()
returns the target CRS of the GeoTransformer


transform

public GM_Object transform(GM_Object geo)
                    throws java.lang.Exception
transforms the coodinates of a deegree geometry to the target coordinate reference system.

Throws:
java.lang.Exception

transformPoint

private GM_Object transformPoint(GM_Point geo,
                                 MathTransform trans)
                          throws java.lang.Exception
transforms the submitted point to the target coordinate reference system

Throws:
java.lang.Exception

transformCurve

private GM_Object transformCurve(GM_Curve geo,
                                 MathTransform trans)
                          throws java.lang.Exception
transforms the submitted curve to the target coordinate reference system

Throws:
java.lang.Exception

transformSurface

private GM_Object transformSurface(GM_Surface geo,
                                   MathTransform trans)
                            throws java.lang.Exception
transforms the submitted surface to the target coordinate reference system

Throws:
java.lang.Exception

transformMultiPoint

private GM_Object transformMultiPoint(GM_MultiPoint geo,
                                      MathTransform trans)
                               throws java.lang.Exception
transforms the submitted multi point to the target coordinate reference system

Throws:
java.lang.Exception

transformMultiCurve

private GM_Object transformMultiCurve(GM_MultiCurve geo,
                                      MathTransform trans)
                               throws java.lang.Exception
transforms the submitted multi curve to the target coordinate reference system

Throws:
java.lang.Exception

transformMultiSurface

private GM_Object transformMultiSurface(GM_MultiSurface geo,
                                        MathTransform trans)
                                 throws java.lang.Exception
transforms the submitted multi surface to the target coordinate reference system

Throws:
java.lang.Exception

transformPositions

private GM_Position[] transformPositions(GM_Position[] pos,
                                         MathTransform trans)
                                  throws java.lang.Exception
transfroms an array of GM_Positions to the target coordinate reference system

Throws:
java.lang.Exception

transformEnvelope

public GM_Envelope transformEnvelope(GM_Envelope envelope,
                                     java.lang.String sourceCRS)
                              throws java.lang.Exception
transfroms a GM_Envelope to the target crs of the GeoTransformer instance

Parameters:
envelope -
sourceCRS - CRS of the envelope
Returns:
Throws:
java.lang.Exception

transformEnvelope

public GM_Envelope transformEnvelope(GM_Envelope envelope,
                                     CoordinateSystem sourceCRS)
                              throws java.lang.Exception
transfroms a GM_Envelope to the target crs of the GeoTransformer instance

Parameters:
envelope -
sourceCRS - CRS of the envelope
Returns:
Throws:
java.lang.Exception

transformEnvelope

public GM_Envelope transformEnvelope(GM_Envelope envelope,
                                     CS_CoordinateSystem sourceCRS)
                              throws java.lang.Exception
transfroms a GM_Envelope to the target crs of the GeoTransformer instance

Parameters:
envelope -
sourceCRS - CRS of the envelope
Returns:
Throws:
java.lang.Exception