Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.model.spatialschema
Class JTSAdapter

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

    public class JTSAdapter

extends Object

Adapter between deegree `Geometry`s 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 `Position`s 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 `Position`s to a JTS `LinearRing`.

  Parameters:
    `positions` - an array of `Position`s
  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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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