4.26 SDO_TOPO_MAP.GET_NEAREST_EDGE
Format
SDO_TOPO_MAP.GET_NEAREST_EDGE( topology IN VARCHAR2, topo_map IN VARCHAR2, point IN SDO_GEOMETRY ) RETURN NUMBER;
or
SDO_TOPO_MAP.GET_NEAREST_EDGE( topology IN VARCHAR2, topo_map IN VARCHAR2, x IN NUMBER, y IN NUMBER ) RETURN NUMBER;
Description
Returns the edge ID number of the edge that is nearest (closest to) the specified point.
Parameters
- topology
-
Name of the topology that contains the edge and the point, or a null value, as explained in Using GET_xxx Topology Functions. Must not exceed 20 characters.
- topo_map
-
Name of the TopoMap object, or a null value, as explained in Using GET_xxx Topology Functions. (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
The topology
or topo_map
parameter should specify a valid name, as explained in Using GET_xxx Topology Functions.
The nearest edge is determined from the representation of the topology in the database, using the spatial index. If there are changed, added, or deleted edges in the instance and the database has not been updated to reflect those changes, the result may not reflect the true situation in the TopoMap object cache.
If multiple edges are equally close to the point, any one of the edge ID values is returned. If no edges exist in the topology, this function returns 0 (zero).
This function is equivalent to using the getNearestEdge
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(null, 'CITY_DATA_TOPOMAP', SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(8,8,NULL), NULL, NULL)) FROM DUAL; SDO_TOPO_MAP.GET_NEAREST_EDGE(NULL,'CITY_DATA_TOPOMAP',SDO_GEOMETRY(2001,NULL,SD -------------------------------------------------------------------------------- 22
Parent topic: SDO_TOPO_MAP Package Subprograms