4.27 SDO_TOPO_MAP.GET_NEAREST_EDGE_IN_CACHE
Format
SDO_TOPO_MAP.GET_NEAREST_EDGE_IN_CACHE( topo_map IN VARCHAR2, point IN SDO_GEOMETRY ) RETURN NUMBER;
or
SDO_TOPO_MAP.GET_NEAREST_EDGE_IN_CACHE( topo_map IN VARCHAR2, x IN NUMBER, y IN NUMBER ) RETURN NUMBER;
Description
Returns the edge ID number of the edge that, of the edges loaded in the specified TopoMap object, is nearest (closest to) the specified point.
Parameters
- topo_map
-
Name of the TopoMap object. (TopoMap objects are explained in TopoMap Objects.)
- point
-
Geometry object specifying the point.
- x
-
X-axis value of the point.
- y
-
Y-axis value of the point.
Usage Notes
If multiple edges are equally close to the point, any one of the edge ID values is returned. If no topology data is loaded or if no edges exist in the cache, this function returns 0 (zero).
This function is equivalent to using the getNearestEdgeInCache
method of the TopoMap
class of the client-side Java API (described in Topology Data Model Java Interface).
Examples
The following example returns the edge ID number of the edge that is closest to the point at (8, 8) in the CITY_DATA_TOPOMAP
TopoMap object. (The example refers to definitions and data from Topology Built from Topology Data.)
SELECT SDO_TOPO_MAP.GET_NEAREST_EDGE_IN_CACHE('CITY_DATA_TOPOMAP', SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(8,8,NULL), NULL, NULL)) FROM DUAL; SDO_TOPO_MAP.GET_NEAREST_EDGE_IN_CACHE('CITY_DATA_TOPOMAP',SDO_GEOMETRY(2001,NUL -------------------------------------------------------------------------------- 22
Parent topic: SDO_TOPO_MAP Package Subprograms