35.20 SDO_UTIL.FROM_GML311GEOMETRY
Format
SDO_UTIL.FROM_GML311GEOMETRY( geometry IN CLOB, srsNamespace IN VARCHAR2 DEFAULT NULL ) RETURN SDO_GEOMETRY;
or
SDO_UTIL.FROM_GML311GEOMETRY( geometry IN CLOB, srsNamespace IN VARCHAR2, coordOrder IN NUMBER ) RETURN SDO_GEOMETRY;
or
SDO_UTIL.FROM_GML311GEOMETRY( geometry IN VARCHAR2, srsNamespace IN VARCHAR2 DEFAULT NULL ) RETURN SDO_GEOMETRY;
or
SDO_UTIL.FROM_GML311GEOMETRY( geometry IN VARCHAR2, coordOrder IN NUMBER DEFAULT NULL ) RETURN SDO_GEOMETRY;
or
SDO_UTIL.FROM_GML311GEOMETRY( geometry IN VARCHAR2, srsNamespace IN VARCHAR2, coordOrder IN NUMBER ) RETURN SDO_GEOMETRY;
Description
Converts a geography markup language (GML 3.1.1) fragment to a Spatial geometry object.
Parameters
- geometry
-
Geometry in GML version 3.1.1 format to be converted to SDO_GEOMETRY format.
- srsNamespace
-
(Reserved for Oracle use.)
- coordOrder
-
If the data in GML format is in latitude/longitude format instead of the longitude/latitude format used by Oracle Spatial, specify 1 for this parameter. Otherwise, do not specify this parameter. (See the Usage Notes for more information.)
Usage Notes
Note:
The SDO_UTIL.FROM_GML311GEOMETRY function is supported only if Oracle JVM is enabled on your Oracle Autonomous Database Serverless deployments. To enable Oracle JVM, see Use Oracle Java in Using Oracle Autonomous Database Serverless for more information.The input geometry must be a valid GML fragment describing a GML version 3.1.1 geometry type defined in the Open GIS Implementation Specification.
Some EPSG geodetic coordinate systems have the axis order reversed in their definition. For such SRIDs, the data in the GML format might come in as latitude/longitude instead of longitude/latitude. If such GML is to be converted to the SDO_GEOMETRY type, the coordOrder
parameter should be specified as 1 so that the latitude/longitude values are converted to longitude/latitude, because longitude/latitude is the order used in the SDO_GEOMETRY type.
Examples
The following example shows conversion to and from GML version 3.1.1 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 3.1.1 geometry gmlgeom := SDO_UTIL.TO_GML311GEOMETRY(geom); DBMS_OUTPUT.PUT_LINE('To GML 3.1.1 geometry result = ' || TO_CHAR(gmlgeom)); -- From GML 3.1.3 geometry geom_result := SDO_UTIL.FROM_GML311GEOMETRY(gmlgeom); END; / To GML 3.1.1 geometry result = <gml:Polygon srsName="SDO:" xmlns:gml="http://www.opengis.net/gml"><gml:exterior><gml:LinearRing><gml:posLis t srsDimension="2">5.0 1.0 8.0 1.0 8.0 6.0 5.0 7.0 5.0 1.0 </gml:posList></gml:LinearRing></gml:exterior></gml:Polygon> PL/SQL procedure successfully completed.
Parent topic: SDO_UTIL Package (Utility)