org.deegree_impl.model.geometry
Class GMLAdapter

java.lang.Object
  extended byorg.deegree_impl.model.geometry.GMLAdapter

public class GMLAdapter
extends java.lang.Object

Version:
$Revision: 1.21 $
Author:
Andreas Poth

Constructor Summary
GMLAdapter()
           
 
Method Summary
private static java.lang.StringBuffer createCurve(GM_Curve o)
          creates a GML expression of a curve geometry
static GM_Envelope createGM_Envelope(GMLBox box)
          creates a GM_Envelope object out from a GMLBox
private static java.lang.StringBuffer createMultiCurve(GM_MultiCurve mp)
           
private static java.lang.StringBuffer createMultiPoint(GM_MultiPoint mp)
           
private static java.lang.StringBuffer createMultiSurface(GM_MultiSurface mp)
           
private static java.lang.StringBuffer createPoint(GM_Point o)
          creates a GML expression of a point geometry
private static java.lang.StringBuffer createSurface(GM_Surface sur)
           
static java.lang.String export(GM_Envelope envelope)
           
static java.lang.String export(GM_Object gmObject)
          creates FeatureCollections from OGC WKBs
private static GM_Surface wrap(GMLBox gmlBox)
           
static GM_Object wrap(GMLGeometry gml)
          Converts a GML geometry object to a corresponding GM_Object.
private static GM_Curve wrap(GMLLineString linestring)
          creates a GM_CurveSegment from an array of GML-points.
private static GM_Curve wrap(GMLLineString linestring, java.lang.String multilineSRS)
          creates a GM_CurveSegment from an array of GML-points.
private static GM_MultiCurve wrap(GMLMultiLineString multilinestring)
          creates a GM_MultiCurve from an GMLMultiLinestring.
private static GM_MultiPoint wrap(GMLMultiPoint multipoint)
          creates a GM_MultiPoint from a GMLMultiPoint
private static GM_MultiSurface wrap(GMLMultiPolygon multipolygon)
          creates a GM_MultiSurface
private static GM_Point wrap(GMLPoint gml)
          creates a GM_Point from a gml.
private static GM_Point wrap(GMLPoint gml, java.lang.String multipointSRS)
          creates a GM_Point from a gml.
private static GM_Surface wrap(GMLPolygon polygon)
          creates a GM_Surface
private static GM_Surface wrap(GMLPolygon polygon, java.lang.String multipolygonSRS)
          creates a GM_Surface
static GM_Object wrap(java.lang.String gml)
          Converts a GML geometry object to a corresponding GM_Object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GMLAdapter

public GMLAdapter()
Method Detail

export

public static java.lang.String export(GM_Object gmObject)
                               throws GM_Exception
creates FeatureCollections from OGC WKBs

Throws:
GM_Exception

export

public static java.lang.String export(GM_Envelope envelope)
                               throws GM_Exception
Throws:
GM_Exception

wrap

public static GM_Object wrap(java.lang.String gml)
                      throws GM_Exception
Converts a GML geometry object to a corresponding GM_Object.

Currently, the following conversions are supported:

Returns:
the corresponding GM_Object
Throws:
GM_Exception - if type unsupported or conversion failed

wrap

public static GM_Object wrap(GMLGeometry gml)
                      throws GM_Exception
Converts a GML geometry object to a corresponding GM_Object.

Currently, the following conversions are supported:

Returns:
the corresponding GM_Object
Throws:
GM_Exception - if type unsupported or conversion failed

createPoint

private static java.lang.StringBuffer createPoint(GM_Point o)
                                           throws java.rmi.RemoteException
creates a GML expression of a point geometry

Parameters:
o - point geometry
Returns:
Throws:
java.rmi.RemoteException

createCurve

private static java.lang.StringBuffer createCurve(GM_Curve o)
                                           throws java.rmi.RemoteException,
                                                  GM_Exception
creates a GML expression of a curve geometry

Parameters:
o - curve geometry
Returns:
Throws:
GM_Exception
java.rmi.RemoteException

createSurface

private static java.lang.StringBuffer createSurface(GM_Surface sur)
                                             throws java.rmi.RemoteException,
                                                    GM_Exception
Parameters:
sur -
Returns:
Throws:
java.rmi.RemoteException
GM_Exception

createMultiPoint

private static java.lang.StringBuffer createMultiPoint(GM_MultiPoint mp)
                                                throws java.rmi.RemoteException
Parameters:
mp -
Returns:
Throws:
java.rmi.RemoteException

createMultiCurve

private static java.lang.StringBuffer createMultiCurve(GM_MultiCurve mp)
                                                throws java.rmi.RemoteException,
                                                       GM_Exception
Parameters:
mp -
Returns:
Throws:
java.rmi.RemoteException
GM_Exception

createMultiSurface

private static java.lang.StringBuffer createMultiSurface(GM_MultiSurface mp)
                                                  throws java.rmi.RemoteException,
                                                         GM_Exception
Parameters:
mp -
Returns:
Throws:
java.rmi.RemoteException
GM_Exception

wrap

private static GM_Point wrap(GMLPoint gml)
                      throws GM_Exception
creates a GM_Point from a gml.

Parameters:
gml - a GMLPoint
Throws:
GM_Exception

wrap

private static GM_Point wrap(GMLPoint gml,
                             java.lang.String multipointSRS)
                      throws GM_Exception
creates a GM_Point from a gml.

Parameters:
gml - a GMLPoint
Throws:
GM_Exception

wrap

private static GM_Curve wrap(GMLLineString linestring)
                      throws GM_Exception
creates a GM_CurveSegment from an array of GML-points.

Parameters:
linestring - a GMLLineString
Throws:
GM_Exception

wrap

private static GM_Curve wrap(GMLLineString linestring,
                             java.lang.String multilineSRS)
                      throws GM_Exception
creates a GM_CurveSegment from an array of GML-points.

Parameters:
linestring - a GMLLineString
Throws:
GM_Exception

wrap

private static GM_Surface wrap(GMLPolygon polygon)
                        throws GM_Exception
creates a GM_Surface

Parameters:
polygon - GMLPolygon
Throws:
GM_Exception

wrap

private static GM_Surface wrap(GMLPolygon polygon,
                               java.lang.String multipolygonSRS)
                        throws GM_Exception
creates a GM_Surface

Parameters:
polygon - GMLPolygon
Throws:
GM_Exception

wrap

private static GM_MultiPoint wrap(GMLMultiPoint multipoint)
                           throws GM_Exception
creates a GM_MultiPoint from a GMLMultiPoint

Parameters:
multipoint - GMLMultiPoint
Throws:
GM_Exception

wrap

private static GM_MultiCurve wrap(GMLMultiLineString multilinestring)
                           throws GM_Exception
creates a GM_MultiCurve from an GMLMultiLinestring.

Parameters:
multilinestring - a GMLMultiLineString
Throws:
GM_Exception

wrap

private static GM_MultiSurface wrap(GMLMultiPolygon multipolygon)
                             throws GM_Exception
creates a GM_MultiSurface

Parameters:
multipolygon -
Throws:
GM_Exception

createGM_Envelope

public static GM_Envelope createGM_Envelope(GMLBox box)
creates a GM_Envelope object out from a GMLBox


wrap

private static GM_Surface wrap(GMLBox gmlBox)
                        throws GM_Exception
Parameters:
gmlBox -
Returns:
Throws:
GM_Exception