A.13.37 OPG_APIS.GET_LONG_LAT_GEOMETRY
Format
OPG_APIS.GET_LONG_LAT_GEOMETRY( x IN NUMBER, y IN NUMBER, srid IN NUMBER DEFAULT 8307 ) RETURN SDO_GEOMETRY;
Description
Returns an SDO_GEOMETRY object constructed using X and Y point coordinate values, and optionally an SRID value.
Parameters
- x
-
The X (first coordinate) value in the SDO_POINT_TYPE element of the geometry definition.
- y
-
The Y (second coordinate) value in the SDO_POINT_TYPE element of the geometry definition.
- 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
If there is incorrect syntax or a parsing error, this function returns NULL instead of generating an exception.
Examples
The following example returns the geometry object for a point with X, Y coordinates 10.5, 5.0, and it uses 8307 as the SRID in the resulting geometry object.
SQL> select opg_apis.get_long_lat_geometry(10.0, 5.0, 8307) from dual;
OPG_APIS.GET_LONG_LAT_GEOMETRY(10.0,5.0,8307)(SDO_GTYPE, SDO_SRID, SDO_POINT(X,
--------------------------------------------------------------------------------
SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(10, 5, NULL), NULL, NULL)
Parent topic: OPG_APIS Package Subprograms