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

org.deegree.model.spatialschema
Class WKTAdapter

java.lang.Object
  extended by org.deegree.model.spatialschema.WKTAdapter

public class WKTAdapter
extends Object

Adapter class for exporting deegree geometries to WKT and to wrap WKT code geometries to deegree geometries.

Version:
$Revision: 18195 $
Author:
Andreas Poth, last edited by: $Author: mschneider $

Constructor Summary
WKTAdapter()
           
 
Method Summary
static StringBuffer export(Envelope envelope)
          exports an Envelope as a BOX3D WKT string.
static StringBuffer export(Geometry geom)
           
static Geometry wrap(String wkt, CoordinateSystem crs)
           
static Curve wrapCurve(String wkt, CoordinateSystem crs)
          creates a Curve from a WKT.
static MultiCurve wrapMultiCurve(String wkt, CoordinateSystem crs)
          creates a MultiCurve from a WKT
static MultiPoint wrapMultiPoint(String wkt, CoordinateSystem crs)
          creates a MultiPoint from a WKT
static MultiSurface wrapMultiSurface(String wkt, CoordinateSystem crs)
          creates a MultiSurface from a WKT
static Point wrapPoint(String wkt, CoordinateSystem crs)
          creates a Point from a WKT.
static Surface wrapSurface(String wkt, CoordinateSystem crs)
          creates a Surface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WKTAdapter

public WKTAdapter()
Method Detail

wrap

public static Geometry wrap(String wkt,
                            CoordinateSystem crs)
                     throws GeometryException
Parameters:
wkt -
crs -
Returns:
the corresponding Geometry
Throws:
GeometryException - if type unsupported or conversion failed

export

public static StringBuffer export(Geometry geom)
                           throws GeometryException
Parameters:
geom - geometry
Returns:
the StingBuffer containing the exported geometry
Throws:
GeometryException

export

public static StringBuffer export(Envelope envelope)
exports an Envelope as a BOX3D WKT string.

Parameters:
envelope -
Returns:
the StringBuffer containing the exported envelope

wrapPoint

public static Point wrapPoint(String wkt,
                              CoordinateSystem crs)
                       throws GeometryException
creates a Point from a WKT.

Parameters:
wkt - a Point WKT
crs -
Returns:
the point created from the given wkt
Throws:
GeometryException

wrapCurve

public static Curve wrapCurve(String wkt,
                              CoordinateSystem crs)
                       throws GeometryException
creates a Curve from a WKT.

Parameters:
wkt - linestring a WKT
crs -
Returns:
the curve created from the given wkt.
Throws:
GeometryException

wrapSurface

public static Surface wrapSurface(String wkt,
                                  CoordinateSystem crs)
                           throws GeometryException
creates a Surface

Parameters:
wkt - polygon WKT
crs -
Returns:
the Surface created from the given wkt.
Throws:
GeometryException

wrapMultiPoint

public static MultiPoint wrapMultiPoint(String wkt,
                                        CoordinateSystem crs)
creates a MultiPoint from a WKT

Parameters:
wkt - multipoint WKT
crs -
Returns:
the Multipoint created from the given wkt.

wrapMultiCurve

public static MultiCurve wrapMultiCurve(String wkt,
                                        CoordinateSystem crs)
                                 throws GeometryException
creates a MultiCurve from a WKT

Parameters:
wkt - a WKT
crs -
Returns:
the multi curve created from the given wkt.
Throws:
GeometryException

wrapMultiSurface

public static MultiSurface wrapMultiSurface(String wkt,
                                            CoordinateSystem crs)
                                     throws GeometryException
creates a MultiSurface from a WKT

Parameters:
wkt - a WKT
crs -
Returns:
the multi surface created from the given wkt.
Throws:
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