Format
SDO_UTIL.FROM_GMLGEOMETRY( geometry IN CLOB, srsNamespace IN VARCHAR2 DEFAULT NULL ) RETURN SDO_GEOMETRY;
or
SDO_UTIL.FROM_GMLGEOMETRY( geometry IN VARCHAR2, srsNamespace IN VARCHAR2 DEFAULT NULL ) RETURN SDO_GEOMETRY;
Description
Converts a geography markup language (GML 2.0) fragment to a Spatial and Graph geometry object.
Parameters
Usage Notes
The input geometry must be a valid GML fragment describing a GML version 2.0 geometry type defined in the Open GIS Implementation Specification.
Examples
The following example shows conversion to and from GML version 2.0 format. (The example uses the definitions and data from Simple Example: Inserting_ Indexing_ and Querying Spatial Data, specifically the cola_b
geometry from the COLA_MARKETS table.)
DECLARE gmlgeom CLOB; geom_result SDO_GEOMETRY; geom SDO_GEOMETRY; BEGIN SELECT c.shape INTO geom FROM cola_markets c WHERE c.name = 'cola_b'; -- To GML geometry gmlgeom := SDO_UTIL.TO_GMLGEOMETRY(geom); DBMS_OUTPUT.PUT_LINE('To GML geometry result = ' || TO_CHAR(gmlgeom)); -- From GML geometry geom_result := SDO_UTIL.FROM_GMLGEOMETRY(gmlgeom); END; / To GML geometry result = <gml:Polygon srsName="SDO:" xmlns:gml="http://www.opengis.net/gml"><gml:outerBoundaryIs><gml:LinearRing><gml :coordinates decimal="." cs="," ts=" ">5.0,1.0 8.0,1.0 8.0,6.0 5.0,7.0 5.0,1.0 </gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon> PL/SQL procedure successfully completed.