4.2 SDO_TOPO_MAP.ADD_ISOLATED_NODE
Format
SDO_TOPO_MAP.ADD_ISOLATED_NODE( topology IN VARCHAR2, face_id IN NUMBER, point IN SDO_GEOMETRY ) RETURN NUMBER;
or
SDO_TOPO_MAP.ADD_ISOLATED_NODE( topology IN VARCHAR2, point IN SDO_GEOMETRY ) RETURN NUMBER;
or
SDO_TOPO_MAP.ADD_ISOLATED_NODE( topology IN VARCHAR2, face_id IN NUMBER, x IN NUMBER, y IN NUMBER ) RETURN NUMBER;
or
SDO_TOPO_MAP.ADD_ISOLATED_NODE( topology IN VARCHAR2, x IN NUMBER, y IN NUMBER ) RETURN NUMBER;
Description
Adds an isolated node (that is, an island node) to a topology, and returns the node ID of the added isolated node.
Parameters
- topology
-
Name of the topology to which to add the isolated node, or null if you are using an updatable TopoMap object (see Specifying the Editing Approach with the Topology Parameter). Must not exceed 20 characters.
- face_id
-
Face ID of the face on which the isolated node is to be added. (An exception is raised if the specified point is not on the specified face.)
- point
-
SDO_GEOMETRY object (point geometry) representing the isolated node to be added.
- x
-
X-axis value of the point representing the isolated node to be added.
- y
-
Y-axis value of the point representing the isolated node to be added.
Usage Notes
Spatial automatically assigns a node ID to the added node. If topology
is not null, the appropriate entry is inserted in the <topology-name>_NODE$ table, and the <topology-name>_FACE$ table is updated to include an entry for the added isolated node. (If topology
is null, you can update these tables at any time by calling the SDO_TOPO_MAP.UPDATE_TOPO_MAP procedure.)
If you know the ID of the face on which the isolated node is to be added, you can specify the face_id
parameter. If you specify this parameter, there are two benefits:
-
Validation: The function checks to see if the point is on the specified face, and raises an exception if it is not. Otherwise, the function checks to see if the point is on any face in the topology, and raises an exception if it is not.
-
Performance: The function checks only if the point is on the specified face. Otherwise, it checks potentially all faces in the topology to see if the point is on any face.
To add a non-isolated node, use the SDO_TOPO_MAP.ADD_NODE function.
For information about adding and deleting nodes and edges, see Editing Topologies .
This function is equivalent to using the addIsolatedNode
method of the TopoMap
class of the client-side Java API (described in Topology Data Model Java Interface).
Examples
The following example adds an isolated node to the right of isolated node N4 on face F2, and it returns the node ID of the added node. It uses the current updatable TopoMap object. (The example refers to definitions and data from Topology Built from Topology Data.)
DECLARE result_num NUMBER; BEGIN result_num := SDO_TOPO_MAP.ADD_ISOLATED_NODE(null, 2, SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(22,37,NULL), NULL, NULL)); DBMS_OUTPUT.PUT_LINE('Result = ' || result_num); END; / Result = 24 PL/SQL procedure successfully completed.
Parent topic: SDO_TOPO_MAP Package Subprograms