deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.model.spatialschema
Class WKTAdapter

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

public class WKTAdapter
extends java.lang.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 java.lang.StringBuffer export(Envelope envelope)
          exports an Envelope as a BOX3D WKT string.
static java.lang.StringBuffer export(Geometry geom)
           
static Geometry wrap(java.lang.String wkt, CoordinateSystem crs)
           
static Curve wrapCurve(java.lang.String wkt, CoordinateSystem crs)
          creates a Curve from a WKT.
static MultiCurve wrapMultiCurve(java.lang.String wkt, CoordinateSystem crs)
          creates a MultiCurve from a WKT
static MultiPoint wrapMultiPoint(java.lang.String wkt, CoordinateSystem crs)
          creates a MultiPoint from a WKT
static MultiSurface wrapMultiSurface(java.lang.String wkt, CoordinateSystem crs)
          creates a MultiSurface from a WKT
static Point wrapPoint(java.lang.String wkt, CoordinateSystem crs)
          creates a Point from a WKT.
static Surface wrapSurface(java.lang.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(java.lang.String wkt,
                            CoordinateSystem crs)
                     throws GeometryException
Parameters:
wkt -
crs -
Returns:
the corresponding Geometry
Throws:
GeometryException - if type unsupported or conversion failed

export

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

export

public static java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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.5 (2011/06/29 09:44 build-8-official)

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