9.33 OPG_APIS.GET_GEOMETRY_FROM_V_COL
Format
OPG_APIS.GET_GEOMETRY_FROM_V_COL( v IN NVARCHAR2, srid IN NUMBER DEFAULT 8307 ) RETURN SDO_GEOMETRY;
Description
Returns an SDO_GEOMETRY object constructed using spatial data and optionally an SRID value.
Parameters
Usage Notes
If there is incorrect syntax or a parsing error, this function returns NULL instead of generating an exception.
Examples
The following examples show point, line, and polygon geometries.
SQL> select opg_apis.get_geometry_from_v_col('10.0 5.0',8307) from dual;
OPG_APIS.GET_GEOMETRY_FROM_V_COL('10.05.0',8307)(SDO_GTYPE, SDO_SRID, SDO_POINT(
--------------------------------------------------------------------------------
SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(10, 5, NULL), NULL, NULL)
SQL> select opg_apis.get_geometry_from_v_col('LINESTRING(30 10, 10 30, 40 40)',8307) from dual;
OPG_APIS.GET_GEOMETRY_FROM_V_COL('LINESTRING(3010,1030,4040)',8307)(SDO_GTYPE, S
--------------------------------------------------------------------------------
SDO_GEOMETRY(2002, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(
30, 10, 10, 30, 40, 40))
SQL> select opg_apis.get_geometry_from_v_col('POLYGON((-83.6 34.1, -83.6 34.3, -83.4 34.3, -83.4 34.1, -83.6 34.1))', 8307) from dual;
OPG_APIS.GET_GEOMETRY_FROM_V_COL('POLYGON((-83.634.1,-83.634.3,-83.434.3,-83.434
--------------------------------------------------------------------------------
SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARR
AY(-83.6, 34.1, -83.6, 34.3, -83.4, 34.3, -83.4, 34.1, -83.6, 34.1))
Parent topic: OPG_APIS Package Subprograms