35.28 SDO_UTIL.GET_COORDINATE
Format
SDO_UTIL.GET_COORDINATE(
geometry IN SDO_GEOMETRY,
coord_index IN NUMBER
) RETURN MDSYS.SDO_GEOMETRY DETERMINISTIC PARALLEL_ENABLE;
Description
Returns the coordinate of a geometry.
Parameters
Usage Notes
If there is no corresponding coordinate for the givencoord_index
value (for
example, such as 0
, -1
, or any large value), then the
SDO_UTIL.GET_COORDINATE function returns the last coordinate of the geometry.
Examples
The following example returns the second coordinate of a geometry object,
cola_b
. (The example uses the definitions and data from Simple Example: Inserting_ Indexing_ and Querying Spatial Data.)
SQL> SELECT SDO_UTIL.get_coordinate(c.shape,2) FROM cola_markets c WHERE c.name='cola_b';
SDO_UTIL.GET_COORDINATE(C.SHAPE,2)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_
--------------------------------------------------------------------------------
SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(8, 1, NULL), NULL, NULL)
The following example returns the last coordinate of a geometry object,
cola_b
, as the given index number is 0
. (The example uses the
definitions and data from Simple Example: Inserting_ Indexing_ and Querying Spatial
Data.)
SQL> SELECT SDO_UTIL.get_coordinate(c.shape,0) FROM cola_markets c WHERE c.name='cola_b';
SDO_UTIL.GET_COORDINATE(C.SHAPE,0)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_
--------------------------------------------------------------------------------
SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(5, 1, NULL), NULL, NULL)
Parent topic: SDO_UTIL Package (Utility)