4.29 SDO_TOPO_MAP.GET_NEAREST_NODE_IN_CACHE
Format
SDO_TOPO_MAP.GET_NEAREST_NODE_IN_CACHE( topo_map IN VARCHAR2, point IN SDO_GEOMETRY ) RETURN NUMBER;
or
SDO_TOPO_MAP.GET_NEAREST_NODE_IN_CACHE( topo_map IN VARCHAR2, x IN NUMBER, y IN NUMBER ) RETURN NUMBER;
Description
Returns the node ID number of the node that, of the nodes 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 nodes are equally close to the point, any one of the node ID values is returned. If no topology data is loaded or if no nodes exist in the cache, this function returns 0 (zero).
This function is equivalent to using the getNearestNodeInCache
method of the TopoMap
class of the client-side Java API (described in Topology Data Model Java Interface).
Examples
The following example returns the node ID number of the node 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_NODE_IN_CACHE('CITY_DATA_TOPOMAP', SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(8,8,NULL), NULL, NULL)) FROM DUAL; SDO_TOPO_MAP.GET_NEAREST_NODE_IN_CACHE('CITY_DATA_TOPOMAP',SDO_GEOMETRY(2001,NUL -------------------------------------------------------------------------------- 8
Parent topic: SDO_TOPO_MAP Package Subprograms