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

org.deegree.model.spatialschema
Class JTSAdapter

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

public class JTSAdapter
extends Object

Adapter between deegree-Geometrys and JTS-Geometry objects.

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

Version:
$Revision: 9343 $ $Date: 2007-12-27 14:30:32 +0100 (Do, 27 Dez 2007) $
Author:
Markus Schneider

Constructor Summary
JTSAdapter()
           
 
Method Summary
static com.vividsolutions.jts.geom.Geometry export(Geometry gmObject)
          Converts a Geometry to a corresponding JTS-Geometry object.
static com.vividsolutions.jts.geom.LinearRing export(Position[] positions)
          Converts an array of Positions to a LinearRing.
static Geometry wrap(com.vividsolutions.jts.geom.Geometry geometry)
          Converts a JTS-Geometry object to a corresponding 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 Geometry to a corresponding JTS-Geometry object.

Currently, the following conversions are supported:

  • Point -> Point
  • MultiPoint -> MultiPoint
  • Curve -> LineString
  • MultiCurve -> MultiLineString
  • Surface -> Polygon
  • MultiSurface -> MultiPolygon
  • MultiPrimitive -> 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 Geometry.

Currently, the following conversions are supported:

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

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 Positions to a LinearRing.

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

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