deegree 2.2 (2008/12/22 11:33 build-3038-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: 9343 $
Author:
Andreas Poth

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 -
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:
Throws:
GeometryException

export

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

Parameters:
envelope -
Returns:

wrapPoint

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

Parameters:
wkt - a Point WKT

wrapCurve

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

Parameters:
wkt - linestring a WKT
Throws:
GeometryException

wrapSurface

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

Parameters:
wkt - polygon WKT
Throws:
GeometryException

wrapMultiPoint

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

Parameters:
wkt - multipoint WKT

wrapMultiCurve

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

Parameters:
wkt - a WKT
Throws:
GeometryException

wrapMultiSurface

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

Parameters:
wkt - a WKT
Throws:
GeometryException

deegree 2.2 (2008/12/22 11:33 build-3038-official)

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