A.13.36 OPG_APIS.GET_LATLONG_FROM_V_T_COLS
Format
OPG_APIS.GET_LATLONG_FROM_V_T_COLS( v IN NVARCHAR2, t IN INTEGER, srid IN NUMBER DEFAULT 8307 ) RETURN SDO_GEOMETRY;
Description
Returns an SDO_GEOMETRY object constructed using spatial data, a type value, and optionally an SRID value.
Parameters
- v
-
A String containing spatial data in serialized form.
- t
-
Value indicating the type of value represented by the
v
parameter. Must be 20. (A null value or any other value besides 20 returns a null SDO_GEOMETRY object.) - srid
-
SRID (coordinate system identifier) to be used in the resulting SDO_GEOMETRY object. The default value is 8307, the Oracle Spatial SRID for the WGS 84 longitude/latitude coordinate system.
Usage Notes
This function assumes that for each vertex in the geometry in the v
parameter, the first number is the latitude value and the second number is the longitude value. (This is the reverse of the order in an SDO_GEOMETRY object definition, where longitude is first and latitude is second).
If there is incorrect syntax or a parsing error, this function returns NULL instead of generating an exception.
Examples
The following example returns a point SDO_GEOMETRY object. Notice that the coordinate values of the input point are “swapped” in the returned SDO_GEOMETRY object.
SQL> select opg_apis.get_latlong_from_v_t_cols('5.1 10.0',20,8307) from dual;
OPG_APIS.GET_LATLONG_FROM_V_T_COLS('5.110.0',20,8307)(SDO_GTYPE, SDO_SRID, SDO_P
--------------------------------------------------------------------------------
SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(10, 5.1, NULL), NULL, NULL)
Parent topic: OPG_APIS Package Subprograms