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

org.deegree.model.spatialschema
Class JTSAdapter

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

public class JTSAdapter
extends java.lang.Object

Adapter between deegree Geometrys and JTS Geometry objects.

Please note that the generated deegree-objects use null as coordinate system!

Version:
$Revision: 19906 $ $Date: 2009-10-01 16:31:29 +0200 (Do, 01 Okt 2009) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Constructor Summary
JTSAdapter()
           
 
Method Summary
static com.vividsolutions.jts.geom.Geometry export(Geometry gmObject)
          Converts a deegree Geometry to a corresponding JTS Geometry object.
static com.vividsolutions.jts.geom.LinearRing export(Position[] positions)
          Converts an array of deegree Positions to a JTS LinearRing.
static com.vividsolutions.jts.geom.Polygon export(SurfacePatch patch)
          Converts a deegree SurfacePatch into a JTS Polygon.
static Geometry wrap(com.vividsolutions.jts.geom.Geometry geometry)
          Converts a JTS Geometry object to a corresponding deegree Geometry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTSAdapter

public JTSAdapter()
Method Detail

export

public static com.vividsolutions.jts.geom.Geometry export(Geometry gmObject)
                                                   throws GeometryException
Converts a deegree Geometry to a corresponding JTS Geometry object.

Currently, the following conversions are supported:

  • Curve -> LineString
  • Point -> Point
  • Surface -> Polygon
  • MultiCurve -> MultiLineString
  • MultiPoint -> MultiPoint
  • MultiSurface -> MultiPolygon
  • MultiPrimitive -> GeometryCollection
  • MultiGeometry -> GeometryCollection

Parameters:
gmObject - the object to be converted
Returns:
the corresponding JTS-Geometry object
Throws:
GeometryException - if type unsupported or conversion failed

wrap

public static Geometry wrap(com.vividsolutions.jts.geom.Geometry geometry)
                     throws GeometryException
Converts a JTS Geometry object to a corresponding deegree Geometry.

Currently, the following conversions are supported:

  • LineString -> Curve
  • Point -> Point
  • Polygon -> Surface
  • MultiLineString -> MultiCurve
  • MultiPoint -> MultiPoint
  • MultiPolygon -> MultiSurface
  • GeometryCollection -> MultiGeometry

Parameters:
geometry - the JTS-Geometry to be converted
Returns:
the corresponding Geometry
Throws:
GeometryException - if type unsupported or conversion failed

export

public static com.vividsolutions.jts.geom.LinearRing export(Position[] positions)
Converts an array of deegree Positions to a JTS LinearRing.

Parameters:
positions - an array of Positions
Returns:
the corresponding LinearRing object

export

public static com.vividsolutions.jts.geom.Polygon export(SurfacePatch patch)
Converts a deegree SurfacePatch into a JTS Polygon.

Parameters:
patch - SurfacePatch
Returns:
corresponding JTS Polygon object

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