deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.ogcwebservices.wcts.data
Class GeometryData

java.lang.Object
  extended by org.deegree.ogcwebservices.wcts.data.TransformableData<Geometry>
      extended by org.deegree.ogcwebservices.wcts.data.GeometryData

public class GeometryData
extends TransformableData<Geometry>

GeometryData encapsulates a list of geometries which can be transformed using the doTransform(Transformation, boolean) or doTransform(CoordinateSystem, CoordinateSystem, boolean) methods.

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

Constructor Summary
GeometryData(List<Geometry> transformableData)
          Creates a data instance which handles geometries.
 
Method Summary
 void doTransform(CoordinateSystem sourceCRS, CoordinateSystem targetCRS, boolean enableLogging)
          This function should implement the transforming of the underlying data.
 void doTransform(Transformation transformation, boolean enableLogging)
          This function should implement the transforming of the underlying data.
 List<Geometry> getTransformedData()
           
static GeometryData parseGeometryData(CoordinateSystem sourceCRS, String wkt)
          Try to create a Geometry from a given String, put the result into a GeometryData object.
 
Methods inherited from class org.deegree.ogcwebservices.wcts.data.TransformableData
getGeotransformer, getGeotransformer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryData

public GeometryData(List<Geometry> transformableData)
             throws IllegalArgumentException
Creates a data instance which handles geometries.

Parameters:
transformableData - to transform
Throws:
IllegalArgumentException - if either one of the crs's are null.
Method Detail

doTransform

public void doTransform(CoordinateSystem sourceCRS,
                        CoordinateSystem targetCRS,
                        boolean enableLogging)
                 throws OGCWebServiceException
Description copied from class: TransformableData
This function should implement the transforming of the underlying data.

Specified by:
doTransform in class TransformableData<Geometry>
Parameters:
sourceCRS - of the incoming points
targetCRS - of the outgoing points
enableLogging - if true the implementing class should log all transformations.
Throws:
OGCWebServiceException - if an exception occurs while transforming.

doTransform

public void doTransform(Transformation transformation,
                        boolean enableLogging)
                 throws OGCWebServiceException
Description copied from class: TransformableData
This function should implement the transforming of the underlying data.

Specified by:
doTransform in class TransformableData<Geometry>
Parameters:
transformation - to use for the transform.
enableLogging - if true the implementing class should log all transformations.
Throws:
OGCWebServiceException - if an exception occurs while transforming.

getTransformedData

public List<Geometry> getTransformedData()
Specified by:
getTransformedData in class TransformableData<Geometry>
Returns:
the transformed data as a list of the overriding class implementation, for example Geometry (GeometyData), or Point3d (SimpleData).

parseGeometryData

public static GeometryData parseGeometryData(CoordinateSystem sourceCRS,
                                             String wkt)
                                      throws OGCWebServiceException
Try to create a Geometry from a given String, put the result into a GeometryData object.

Parameters:
sourceCRS - in which the data is referenced
wkt - to create the geometry from.
Returns:
a geometry data or null if the wkt could not be parsed.
Throws:
OGCWebServiceException - if run into an exception (thrown by the WKTAdapter any other then a GeometryException.

deegree 2.3 (2010/04/09 10:10 build-4-official)

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