15.31 SEM_APIS.CONVERT_TO_WKT_LITERAL
Format
SEM_APIS.CONVERT_TO_WKT_LITERAL(
geom IN SDO_GEOMETRY,
srid_prefix IN VARCHAR2 default NULL,
options IN VARCHAR2 default NULL,
network_owner IN VARCHAR2 DEFAULT NULL,
network_name IN VARCHAR2 default NULL
)RETURN CLOB;
Description
Serializes an SDO_GEOMETRY object into an ogc:wktLiteral value.
Parameters
- geom
-
SDO_GEOMETRY object to be serialized.
- srid_prefix
-
Spatial reference system URI prefix that should be used in the
ogc:wktLiteralinstead of the default. The resulting SRID URI will be of the form<srid_prefix/{srid}>. - options
-
String specifying options for transformation. Available options are:
-
ORACLE_PREFIX=T. Generate SRID URIs of the form
<http://xmlns.oracle.com/rdf/geo/srid/{srid}>.
-
- network_owner
-
Owner of the RDF network. (See Table 1-2.)
- network_name
-
Name of the RDF network. (See Table 1-2.)
Usage Notes
The procedure SDO_UTIL.TO_WKTGEOMETRY is used internally to create the geometry literal with a certain spatial reference system URI.
Standard SRID URIs are used by default (<http://www.opengis.net/def/crs/EPSG/0/{srid}> or (<http://www.opengis.net/def/crs/OGC/1.3/CRS84>>).
For more information about geometry serialization, see SDO_UTIL.TO_WKTGEOMETRY.
For information about RDF network types and options, see RDF Networks.
Examples
The following example shows three different uses of this function for a geometry with SRID 8307. The COLA_MARKETS table is the one from the simple example in Oracle Spatial Developer's Guide.
INSERT INTO cola_markets VALUES(
10,
'cola_x',
SDO_GEOMETRY(
2003,
8307, -- SRID
NULL,
SDO_ELEM_INFO_ARRAY(1,1003,3),
SDO_ORDINATE_ARRAY(1,1, 6,13)
)
);
commit;
SELECT
sem_apis.convert_to_wkt_literal(shape) as wkt1,
sem_apis.convert_to_wkt_literal(shape,'http://my.org/') as wkt2,
sem_apis.convert_to_wkt_literal(shape,null,' ORACLE_PREFIX=T ') as wkt3
FROM cola_markets;
"<http://www.opengis.net/def/crs/OGC/1.3/CRS84> POLYGON ((1.0 1.0, 6.0 1.0, 6.0 13.0, 1.0 13.0, 1.0 1.0))"^^<http://www.opengis.net/ont/geosparql#wktLiteral>
"<http://my.org/8307> POLYGON ((1.0 1.0, 6.0 1.0, 6.0 13.0, 1.0 13.0, 1.0 1.0))"^^<http://www.opengis.net/ont/geosparql#wktLiteral>
"<http://xmlns.oracle.com/rdf/geo/srid/8307> POLYGON ((1.0 1.0, 6.0 1.0, 6.0 13.0, 1.0 13.0, 1.0 1.0))"^^<http://www.opengis.net/ont/geosparql#wktLiteral>
Parent topic: SEM_APIS Package Subprograms