The MDSYS.SDO_NET_MEM package contains subprograms (functions and procedures) that constitute part of the PL/SQL application programming interface (API) for the Spatial network data model. This package, which implements capabilities available through the Java API, contains subprograms related to editing and analyzing networks.
Note:
Although this manual refers to "the SDO_NET_MEM package," the subprograms are actually implemented as methods of several object types. Thus, they are not listed by the statementDESCRIBE SDO_NET_MEM
.To use the subprograms in this chapter, you must understand the conceptual information about networks in Chapter 5, especially Section 5.7, which explains how to use a network memory object.
The SDO_NET_MEM subprograms are grouped according to their associated object-related class in the oracle.spatial.network interface or class. Except for the SDO_NET_MEM.SET_MAX_MEMORY_SIZE procedure, you must specify a prefix after SDO_NET_MEM for each program, depending on its associated class (for example, SDO_NET_MEM.NETWORK_MANAGER.CREATE_LOGICAL_NETWORK, SDO_NET_MEM.NETWORK.ADD_NODE, and SDO_NET_MEM.NODE.GET_COST).
The SDO_NET_MEM subprogram groupings are as follows:
SDO_NET_MEM.NETWORK_MANAGER subprograms are related to the oracle.spatial.network.NetworkManager
Java class. They enable you to create and drop network memory objects and to perform network analysis.
SDO_NET_MEM.NETWORK subprograms are related to the oracle.spatial.network.Network
Java interface. They enable you to add and delete nodes, links, and paths.
SDO_NET_MEM.NODE subprograms are related to the oracle.spatial.network.Node
Java interface. They enable you to get and set attributes for nodes.
SDO_NET_MEM.LINK subprograms are related to the oracle.spatial.network.Link
Java interface. They enable you to get and set attributes for links.
SDO_NET_MEM.PATH subprograms are related to the oracle.spatial.network.Path
Java interface. They enable you to get and set attributes for paths.
The associations between SDO_NET_MEM subprograms and methods of the Java API are not necessarily exact. In some cases, a PL/SQL subprogram may combine operations and options from several methods. In addition, some Java methods do not have PL/SQL counterparts. Thus, the Usage Notes for subprograms state only that the function or procedure is analogous to a specific Java method, to indicate a logical relationship between the two. For detailed information about a specific Java method and others that may be related, see the Javadoc-generated API documentation (briefly explained in Section 5.10.2).
The rest of this chapter provides reference information about the SDO_NET_MEM subprograms, listed in alphabetical order (by grouping, then by name within each grouping), with the SDO_NET_MEM.SET_MAX_MEMORY_SIZE procedure listed first because it does not fit in any grouping.
SDO_NET_MEM.SET_MAX_MEMORY_SIZE(
maxsize IN NUMBER DEFAULT 262144);
Sets the Java maximum heap size for an application to run in an Oracle Java virtual machine.
Number of bytes for the Java maximum heap size. The default value is 262144 (256 MB).
If you encounter the java.lang.OutOfMemoryError
exception, you can use this procedure to increase the maximum heap size.
If you specify a value greater than the system limit, the system limit is used.
The following example sets the Java maximum heap size to 524288 (512 MB).
EXECUTE SDO_NET_MEM.SET_MAX_MEMORY_SIZE(524288);
SDO_NET_MEM.LINK.GET_CHILD_LINKS(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns the child links of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the child links of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getChildLinks
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
For information about parent and child nodes and links in a network hierarchy, see Section 5.5.
The following example returns the child links of the link whose link ID is 1001 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.LINK.GET_CHILD_LINKS(net_mem, 1001); DBMS_OUTPUT.PUT('Link 1001 has the following child links: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); . . . Link 1001 has the following child links: 1108 1109
SDO_NET_MEM.LINK.GET_CO_LINK_IDS(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns the co-links of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns an SDO_NUMBER_ARRAY object with the co-links of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
The co-link of a link is that link with its direction reversed. That is, the start node of the co-link is the end node of the original link, and the end node of the co-link is the start node of the original link.
This function is analogous to using the getCoLinks
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the co-links of the link whose link ID is 9876 in the current network memory object. (This example assumes that a variable named res_array of type SDO_NUMBER_ARRAY has been declared, and that a variable named net_mem
of type VARCHAR2 contains a network name associated with a network memory object.)
res_array := SDO_NET_MEM.LINK.GET_CO_LINK_IDS(net_mem, 9876);
SDO_NET_MEM.LINK.GET_COST(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN NUMBER;
Returns the cost value of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the cost value of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getCost
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To set the cost value of a link, use the SDO_NET_MEM.LINK.SET_COST procedure.
The following example returns the cost of the link whose link ID is 1104 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.LINK.GET_COST(net_mem, 1104); DBMS_OUTPUT.PUT_LINE('The cost of link 1104 is: ' || res_numeric); . . . The cost of link 1104 is: 10
SDO_NET_MEM.LINK.GET_END_MEASURE(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN NUMBER;
Returns the end measure value of a link in an LRS network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the end measure value of a link in an LRS network in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getEndMeasure
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the end measure of the link whose link ID is 104 in the current network memory object. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
res_numeric := SDO_NET_MEM.LINK.GET_END_MEASURE(net_mem, 104); DBMS_OUTPUT.PUT_LINE('The end measure of link 104 is: ' || res_numeric); . . . The end measure of link 104 is: 6
SDO_NET_MEM.LINK.GET_END_NODE_ID(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN NUMBER;
Returns the end node of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the node ID number of the end node of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getEndNode
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To set the end node of a link, use the SDO_NET_MEM.LINK.SET_END_NODE procedure.
The following example returns the end node ID of the link whose link ID is 1104 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.LINK.GET_END_NODE_ID(net_mem, 1104); DBMS_OUTPUT.PUT_LINE('The end node of link 1104 is: ' || res_numeric); . . . The end node of link 1104 is: 104
SDO_NET_MEM.LINK.GET_GEOM_ID(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN NUMBER;
Returns the geometry ID of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the geometry ID number of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getGeomID
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To set the geometry ID of a link, use the SDO_NET_MEM.LINK.SET_GEOM_ID procedure.
The following example returns the geometry ID of the link whose link ID is 104 in the current network memory object. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
res_numeric := SDO_NET_MEM.LINK.GET_GEOM_ID(net_mem, 104); DBMS_OUTPUT.PUT_LINE('The geometry ID of link 104 is: ' || res_numeric); . . . The geometry ID of link 104 is: 1003
SDO_NET_MEM.LINK.GET_GEOMETRY(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN SDO_GEOMETRY;
Returns the spatial geometry object for a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the SDO_GEOMETRY object for a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getGeometry
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To set the spatial geometry of a link, use the SDO_NET_MEM.LINK.SET_GEOMETRY procedure.
The following example returns the spatial geometry of the link whose link ID is 9876 in the current network memory object. (This example assumes that a variable named res_geom
of type SDO_GEOMETRY has been declared, and that a variable named net_mem
of type VARCHAR2 contains a network name associated with a network memory object.)
res_geom := SDO_NET_MEM.LINK.GET_GEOMETRY(net_mem, 9876)
SDO_NET_MEM.LINK.GET_LEVEL(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN NUMBER;
Returns the hierarchy level of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the numeric hierarchy level of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getLinkLevel
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To set the hierarchy level of a link, use the SDO_NET_MEM.LINK.SET_LEVEL procedure.
For information about parent and child nodes and links in a network hierarchy, see Section 5.5.
The following example returns the hierarchy level of the link whose link ID is 1001 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.LINK.GET_LEVEL(net_mem, 1001); DBMS_OUTPUT.PUT_LINE('The hierarchy level of link 1001 is: ' || res_numeric); . . . The hierarchy level of link 1001 is: 2
SDO_NET_MEM.LINK.GET_NAME(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN VARCHAR2;
Returns the name of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the name of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getName
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To set the name of a link, use the SDO_NET_MEM.LINK.SET_NAME procedure.
The following example returns the name of the link whose link ID is 1104 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.LINK.GET_NAME(net_mem, 1104); DBMS_OUTPUT.PUT_LINE('The name of link 1104 is: ' || res_string); . . . The name of link 1104 is: N3N4
SDO_NET_MEM.LINK.GET_PARENT_LINK_ID(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN NUMBER;
Returns the link ID number of the parent link of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the link ID number of the parent link of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getParentLink
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To set the parent link of a link, use the SDO_NET_MEM.LINK.SET_PARENT_LINK procedure.
For information about parent and child nodes and links in a network hierarchy, see Section 5.5.
The following example returns the parent link ID of the link whose link ID is 1108 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.LINK.GET_PARENT_LINK_ID(net_mem, 1108); DBMS_OUTPUT.PUT_LINE('The parent link of link 1108 is: ' || res_numeric); . . . The parent link of link 1108 is: 1001
SDO_NET_MEM.LINK.GET_SIBLING_LINK_IDS(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns the sibling links of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the link ID numbers of the sibling links of a link in the specified network memory object. Sibling links are links that have the same parent link. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getSiblingLinkArray
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
For information about parent and child nodes and links in a network hierarchy, see Section 5.5. However, note that parent and child links can be defined without a network hierarchy or in the same level of a network hierarchy.
The following example returns the sibling links of the link whose link ID is 1108 in the current network memory object. In this case, the only sibling link is the one whose link ID is 1109. Both links are children of the link whose link ID is 1001, which is between nodes HN1
and HN2
. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.LINK.GET_SIBLING_LINK_IDS(net_mem, 1108); DBMS_OUTPUT.PUT('Link 1108 has the following sibling links: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); . . . Link 1108 has the following sibling links: 1109
SDO_NET_MEM.LINK.GET_START_MEASURE(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN NUMBER;
Returns the start measure value of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the start measure value of a link in an LRS network in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getStartMeasure
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the start measure value of the link whose link ID is 104 in the current network memory object. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
res_numeric := SDO_NET_MEM.LINK.GET_START_MEASURE(net_mem, 104); DBMS_OUTPUT.PUT_LINE('The start measure of link 104 is: ' || res_numeric); . . . The start measure of link 104 is: 0
SDO_NET_MEM.LINK.GET_START_NODE_ID(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN NUMBER;
Returns the start node of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the node ID value of the start node of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getStartNode
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To set the start node of a link, use the SDO_NET_MEM.LINK.SET_START_NODE procedure.
The following example returns the start node of the link whose link ID is 1001 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.LINK.GET_START_NODE_ID(net_mem, 1104); DBMS_OUTPUT.PUT_LINE('The start node of link 1104 is: ' || res_numeric); . . . The start node of link 1104 is: 103
SDO_NET_MEM.LINK.GET_STATE(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN VARCHAR2;
Returns the state of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the state of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
The state is one of the following string values: ACTIVE
or INACTIVE
. The link state determines whether or not the link is considered by network analysis functions, such as SDO_NET_MEM.NETWORK_MANAGER.SHORTEST_PATH. If the state is ACTIVE
, the link is considered by network analysis functions; if the state is INACTIVE
, the link is ignored by these functions.
This function is analogous to using the getState
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To set the link state, use the SDO_NET_MEM.LINK.SET_STATE procedure.
The following example returns the state of the link whose link ID is 1104 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.LINK.GET_STATE(net_mem, 1104); DBMS_OUTPUT.PUT_LINE('The state of link 1104 is: ' || res_string); . . . The state of link 1104 is: ACTIVE
SDO_NET_MEM.LINK.GET_TYPE(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN VARCHAR2;
Returns the type of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the type of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getType
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To set the type of a link, use the SDO_NET_MEM.LINK.SET_TYPE procedure.
The following example sets and gets the type of the link whose link ID is 1119 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.LINK.SET_TYPE(net_mem, 1119, 'Associative'); res_string := SDO_NET_MEM.LINK.GET_TYPE(net_mem, 1119); DBMS_OUTPUT.PUT_LINE('The type of link 1119 is: ' || res_string); . . . The type of link 1119 is: Associative
SDO_NET_MEM.LINK.IS_ACTIVE(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN VARCHAR2;
Checks if a link is active.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the string value TRUE
if the link in the specified network memory object is active, and the string value FALSE
if the link is not active. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isActive
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if the link whose link ID is 1104 in the current network memory object is active. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.LINK.IS_ACTIVE(net_mem, 1104); DBMS_OUTPUT.PUT_LINE('Is link 1104 active?: ' || res_string); . . . Is link 1104 active?: TRUE
SDO_NET_MEM.LINK.IS_EXTERNAL_LINK(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN VARCHAR2;
Checks if a link is in an external network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the string value TRUE
if the link in the specified network memory object is in an external network, and the string value FALSE
if the link is not in an external network. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isExternalLink
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if the link whose link ID is 1004 in the current network memory object is in an external network. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.LINK.IS_EXTERNAL_LINK(net_mem, 1104); DBMS_OUTPUT.PUT_LINE('Is link 1104 an external link?: ' || res_string); . . . Is link 1104 an external link?: FALSE
SDO_NET_MEM.LINK.IS_LOGICAL(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN VARCHAR2;
Checks if a link is in a logical network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the string value TRUE
if the link in the specified network memory object is in a logical network, and the string value FALSE
if the link is not in a logical network. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isLogical
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if the link whose link ID is 1104 in the current network memory object is in a logical network. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.LINK.IS_LOGICAL(net_mem, 1104); DBMS_OUTPUT.PUT_LINE('Is link 1104 a logical link?: ' || res_string); . . . Is link 1104 a logical link?: TRUE
SDO_NET_MEM.LINK.IS_TEMPORARY(
net_mem IN VARCHAR2,
link_id IN NUMBER
) RETURN VARCHAR2;
Checks if a link is temporary.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
This function returns the string value TRUE
if the link in the specified network memory object is temporary, and the string value FALSE
if the link is not temporary. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
Temporary links, nodes, and paths are not saved in the database when you call the SDO_NET_MEM.NETWORK_MANAGER.WRITE_NETWORK procedure.
This function is analogous to using the isTemporary
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if the link whose link ID is 1104 in the current network memory object is temporary. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.LINK.IS_TEMPORARY(net_mem, 1104); DBMS_OUTPUT.PUT_LINE('Is link 1104 temporary?: ' || res_string); . . . Is link 1104 temporary?: FALSE
SDO_NET_MEM.LINK.SET_COST(
net_mem IN VARCHAR2,
link_id IN NUMBER,
cost IN NUMBER);
Sets the cost value of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
Cost value.
This procedure sets the cost of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setCost
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To get the cost value of a link, use the SDO_NET_MEM.LINK.GET_COST function.
The following example sets the cost of the link whose link ID is 1119 in the current network memory object to 40. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.LINK.SET_COST(net_mem, 1119, 40);
SDO_NET_MEM.LINK.SET_END_NODE(
net_mem IN VARCHAR2,
link_id IN NUMBER,
end_node_id IN NUMBER);
Sets the end node of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
Node ID number.
This procedure sets the end node of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setEndNode
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To get the end node of a link, use the SDO_NET_MEM.LINK.GET_END_NODE_ID function.
The following example sets the end node of the link whose link ID is 1119 in the current network memory object to the node with the node ID value of 109. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.LINK.SET_END_NODE(net_mem, 1119, 109);
SDO_NET_MEM.LINK.SET_GEOM_ID(
net_mem IN VARCHAR2,
link_id IN NUMBER,
geom_id IN NUMBER);
Sets the geometry ID number of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
Geometry ID number.
This procedure sets the geometry ID number of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setGeomID
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To get the geometry ID of a link, use the SDO_NET_MEM.LINK.GET_GEOM_ID function.
The following example sets the geometry ID of the link whose link ID is 302 in the current network memory object to 9999.
SDO_NET_MEM.LINK.SET_GEOM_ID(net_mem, 302, 9999);
SDO_NET_MEM.LINK.SET_GEOMETRY(
net_mem IN VARCHAR2,
link_id IN NUMBER,
geom IN SDO_GEOMETRY);
Sets the spatial geometry of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
Spatial geometry object.
This procedure sets the SDO_GEOMETRY object for a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setGeometry
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To get the spatial geometry of a link, use the SDO_NET_MEM.LINK.GET_GEOMETRY function.
The following example sets the spatial geometry of the link whose link ID is 5678 in the current network memory object to a specified line string SDO_GEOMETRY object. (This example assumes that a variable named net_mem
of type VARCHAR2 contains a network name associated with a network memory object.)
SDO_NET_MEM.LINK.SET_GEOMETRY(net_mem, 5678, SDO_GEOMETRY(2002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(9, 4, 1,1)));
SDO_NET_MEM.LINK.SET_LEVEL(
net_mem IN VARCHAR2,
link_id IN NUMBER,
level IN NUMBER);
Sets the hierarchy level of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
Hierarchy level number.
This procedure sets the hierarchy level of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setLinkLevel
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To get the hierarchy level of a link, use the SDO_NET_MEM.LINK.GET_LEVEL function.
For information about parent and child nodes and links in a network hierarchy, see Section 5.5.
The following example sets the hierarchy level of the link whose link ID is 1119 in the current network memory object to 2. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.LINK.SET_LEVEL(net_mem, 1119, 2);
SDO_NET_MEM.LINK.SET_MEASURE(
net_mem IN VARCHAR2,
link_id IN NUMBER,
start_measure IN NUMBER,
end_measure IN NUMBER);
Sets the start and end measure values of a link in an LRS network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
Start measure value.
End measure value.
This procedure sets the start and end measure values of a link in an LRS network in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setMeasure
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To get the start measure of a link, use the SDO_NET_MEM.LINK.GET_START_MEASURE function. To get the end measure of a link, use the SDO_NET_MEM.LINK.GET_END_MEASURE function.
The following example sets the measure values of the link whose link ID is 302 in the current network memory object, so that the start measure is 111 and the end measure is 114.16. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
SDO_NET_MEM.LINK.SET_MEASURE(net_mem, 302, 111, 114.16);
SDO_NET_MEM.LINK.SET_NAME(
net_mem IN VARCHAR2,
link_id IN NUMBER,
link_name IN VARCHAR2);
Sets the name of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
Link name string.
This procedure sets the name of a link in an LRS network in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setName
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To get the name of a link, use the SDO_NET_MEM.LINK.GET_NAME function.
The following example sets the name of the link whose link ID is 1119 in the current network memory object to My favorite link
. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.LINK.SET_NAME(net_mem, 1119, 'My favorite link');
SDO_NET_MEM.LINK.SET_PARENT_LINK(
net_mem IN VARCHAR2,
link_id IN NUMBER,
parent_link_id IN NUMBER);
Sets the parent link of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
Link ID number of the parent link.
This procedure sets the parent link of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setParentLink
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To get the parent link of a link, use the SDO_NET_MEM.LINK.GET_PARENT_LINK_ID function.
For information about parent and child nodes and links in a network hierarchy, see Section 5.5.
The following example sets the parent link of the link whose link ID is 1119 in the current network memory object to the link whose link ID value is 1001. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.LINK.SET_PARENT_LINK(net_mem, 1119, 1001);
SDO_NET_MEM.LINK.SET_START_NODE(
net_mem IN VARCHAR2,
link_id IN NUMBER,
srart_node_id IN NUMBER);
Sets the start node of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
Node ID number.
This procedure sets the start node of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setStartNode
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To get the start node of a link, use the SDO_NET_MEM.LINK.GET_START_NODE_ID function.
The following example sets the start of the link whose link ID is 1119 in the current network memory object to the node whose node ID is 110. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.LINK.SET_START_NODE(net_mem, 1119, 110);
SDO_NET_MEM.LINK.SET_STATE(
net_mem IN VARCHAR2,
link_id IN NUMBER,
state IN VARCHAR2);
Sets the state value of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
State value. Must be one of the following strings: ACTIVE
or INACTIVE
.
This procedure sets the state of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
The link state determines whether or not the link is considered by network analysis functions, such as SDO_NET_MEM.NETWORK_MANAGER.SHORTEST_PATH. If the state is ACTIVE
, the link is considered by network analysis functions; if the state is INACTIVE
, the link is ignored by these functions.
This procedure is analogous to using the setState
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To get the link state, use the SDO_NET_MEM.LINK.GET_STATE function.
The following example sets the state of the link whose link ID is 1119 in the current network memory object to INACTIVE
. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.LINK.SET_STATE(net_mem, 1119, 'INACTIVE');
SDO_NET_MEM.LINK.SET_TYPE(
net_mem IN VARCHAR2,
link_id IN NUMBER,
type IN VARCHAR2);
Sets the type of a link.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID number.
String reflecting a user-determined type for the link.
This procedure sets the type of a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setType
method of the Link
interface of the client-side Java API (described in Section 5.10.2).
To get the type of a link, use the SDO_NET_MEM.LINK.GET_TYPE function.
The following example sets the type of the link whose link ID is 302 in the current network memory object to Normal street
. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
SDO_NET_MEM.LINK.SET_TYPE(net_mem, 302, 'Normal street');
SDO_NET_MEM.NETWORK.ADD_LINK(
net_mem IN VARCHAR2,
link_id IN NUMBER,
link_name IN NUMBER,
start_node_id IN NUMBER,
end_node_id IN NUMBER,
cost IN NUMBER);
or
SDO_NET_MEM.NETWORK.ADD_LINK(
net_mem IN VARCHAR2,
link_id IN NUMBER,
link_name IN NUMBER,
start_node_id IN NUMBER,
end_node_id IN NUMBER,
cost IN NUMBER,
geom_id IN NUMBER,
start_measure IN NUMBER,
end_measure IN NUMBER);
or
SDO_NET_MEM.ADD_LINK(
net_mem IN VARCHAR2,
link_id IN NUMBER,
link_name IN NUMBER,
start_node_id IN NUMBER,
end_node_id IN NUMBER,
geom IN SDO_GEOMETRY,
cost IN NUMBER);
Adds a link to a network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
ID number of the link to be added.
Name of the link to be added.
Node ID of the start node of the link to be added.
Node ID of the end node of the link to be added.
Cost value associated with the link.
For an LRS geometry, the geometry ID of the geometry object.
For an LRS geometry, the start measure value in the geometry object corresponding to the start node for this link.
For an LRS geometry, the end measure value in the geometry object corresponding to the end node for this link.
SDO_GEOMETRY object (line or contiguous line string geometry) representing the link to be added.
This procedure adds a link in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
An exception is raised if the specified network memory object is read-only.
This procedure is analogous to using the addLink
method of the Network
class of the client-side Java API (described in Section 5.10.2).
The following example adds a link whose link ID is 9901 in the current network memory object. (This example is an excerpt from Example 5-1 in Section 5.7.)
-- Add a link with ID=9901, name=N901N1, cost=20 from node N901 to node N1. sdo_net_mem.network.add_link(net_mem=>'XYZ_NETWORK', link_id=>9901, link_name=>'N901N1', start_node_id=>901, end_node_id=>101, cost=>20);
SDO_NET_MEM.NETWORK.ADD_LRS_NODE(
net_mem IN VARCHAR2,
node_id IN NUMBER,
node_name IN VARCHAR2,
geom_id IN NUMBER,
measure IN NUMBER,
geom IN SDO_GEOMETRY,
external_network_id IN NUMBER,
external_node_id IN NUMBER);
Adds an LRS node (point geometry with measure information) to a network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the node to be added.
Name of the node to be added.
Geometry ID of the geometry object.
Measure value of the node to be added.
Geometry object of the node to be added. Must be a linear referencing system (LRS) geometry with the measure value for the third dimension value.
If the node is also a node in an external network, the network ID of the external network.
If the node is also a node in an external network, the node ID of the node in the external network.
This procedure adds an LRS node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
An exception is raised if the specified network memory object is read-only.
The following example adds an LRS node whose node ID is 901 in the network memory object for a network named MY_LRS_NETWORK
.
DECLARE res_string VARCHAR2(100); BEGIN -- Add an LRS node with ID=901. SDO_NET_MEM.NETWORK.ADD_LRS_NODE(net_mem=>'MY_LRS_NETWORK', node_id=>901, node_name=>'N901', geom_id=>9901, measure=>8, geom=>SDO_GEOMETRY(3301, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1), SDO_ORDINATE_ARRAY(8,13,9)), external_network_id=>0, external_node_id=>0); -- GET_NAME res_string := SDO_NET_MEM.NODE.GET_NAME('ROADS_NETWORK', 901); DBMS_OUTPUT.PUT_LINE('The name of node 901 is: ' || res_string); END; / . . . The name of node 901 is: N901
SDO_NET_MEM.NETWORK.ADD_NODE(
net_mem IN VARCHAR2,
node_id IN NUMBER,
node_name IN VARCHAR2,
external_network_id IN NUMBER,
external_node_id IN NUMBER);
Adds a node (with no associated geometry object) to a network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the node to be added.
Name of the node to be added.
If the node is also a node in an external network, the network ID of the external network.
If the node is also a node in an external network, the node ID of the node in the external network.
This procedure adds a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
An exception is raised if the specified network memory object is read-only.
This procedure is analogous to using the addNode
method of the Network
class of the client-side Java API (described in Section 5.10.2).
The following example adds a node whose node ID is 901 in the current network memory object. (This example is an excerpt from Example 5-1 in Section 5.7.)
-- Add a node with ID=901, and set its name to N901. sdo_net_mem.network.add_node(net_mem=>'XYZ_NETWORK', node_id=>901, node_name=>'N901', external_network_id=>0, external_node_id=>0);
SDO_NET_MEM.NETWORK.ADD_PATH(
net_mem IN VARCHAR2,
path_id IN NUMBER);
or
SDO_NET_MEM.NETWORK.ADD_PATH(
net_mem IN VARCHAR2,
path_ids IN SDO_NUMBER_ARRAY);
Adds one or more paths to a network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID of the path to be added.
SDO_NUMBER_ARRAY object specifying the path IDs of the paths to be added.
This procedure adds one or more paths in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
An exception is raised if the specified network memory object is read-only.
This procedure is analogous to using the addPath
method of the Network
class of the client-side Java API (described in Section 5.10.2).
The following example adds a path whose path ID is stored in a variable named path_id
. (This example is an excerpt from Example 5-1 in Section 5.7.)
sdo_net_mem.network.add_path(net_mem=>'XYZ_NETWORK', path_id=>path_id);
SDO_NET_MEM.NETWORK.ADD_SDO_NODE(
net_mem IN VARCHAR2,
node_id IN NUMBER,
node_name IN VARCHAR2,
x IN VARCHAR2,
y IN VARCHAR2,
external_network_id IN NUMBER,
external_node_id IN NUMBER);
Adds a node (with associated spatial coordinates) to a network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the node to be added.
Name of the node to be added.
X-axis coordinate value for the node to be added.
Y-axis coordinate value for the node to be added.
If the node is also a node in an external network, the network ID of the external network.
If the node is also a node in an external network, the node ID of the node in the external network.
This procedure adds a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
An exception is raised if the specified network memory object is read-only.
This procedure is analogous to using the addNode
method of the Network
class of the client-side Java API (described in Section 5.10.2).
The following example adds an SDO node whose node ID is 801 in the network memory object for a network named ROADS_NETWORK
.
DECLARE res_string VARCHAR2(100); BEGIN -- Add an SDO node with ID=801. SDO_NET_MEM.NETWORK.ADD_SDO_NODE(net_mem=>'ROADS_NETWORK', node_id=>801, node_name=>'N801', x=>8, y=>12, external_network_id=>0, external_node_id=>0); -- GET_NAME res_string := SDO_NET_MEM.NODE.GET_NAME('ROADS_NETWORK', 801); DBMS_OUTPUT.PUT_LINE('The name of node 801 is: ' || res_string); END; / . . . The name of node 801 is: N801
SDO_NET_MEM.NETWORK.DELETE_LINK(
net_mem IN VARCHAR2,
link_id IN NUMBER);
Deletes a link from a network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID of the link to be deleted.
This procedure deletes a link from the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
An exception is raised if the specified network memory object is read-only.
This procedure is analogous to using the deleteLink
method of the Network
interface of the client-side Java API (described in Section 5.10.2).
The following example deletes the link whose link ID is 302 in the network memory object for a network named MY_NETWORK
.
EXECUTE SDO_NET_MEM.NETWORK.DELETE_LINK('MY_NETWORK', 302);
SDO_NET_MEM.NETWORK.DELETE_NODE(
net_mem IN VARCHAR2,
node_id IN NUMBER);
Deletes a node from a network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the node to be deleted.
This procedure deletes a node from the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
An exception is raised if the specified network memory object is read-only.
This procedure is analogous to using the deleteNode
method of the Network
interface of the client-side Java API (described in Section 5.10.2).
The following example deletes the node whose node ID is 8 in the network memory object for a network named ROADS_NETWORK
.
EXECUTE SDO_NET_MEM.NETWORK.DELETE_NODE('ROADS_NETWORK', 8);
SDO_NET_MEM.NETWORK.DELETE_PATH(
net_mem IN VARCHAR2,
path_id IN NUMBER);
Deletes a path from a network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Link ID of the path to be deleted.
This procedure deletes a path from the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
An exception is raised if the specified network memory object is read-only.
This procedure is analogous to using the deletePath
method of the Network
interface of the client-side Java API (described in Section 5.10.2).
The following example deletes the path whose path ID is 1 in the network memory object for a network named ROADS_NETWORK
.
EXECUTE SDO_NET_MEM.NETWORK.DELETE_PATH('ROADS_NETWORK', 1);
SDO_NET_MEM.NETWORK_MANAGER.ALL_PATHS(
net_mem IN VARCHAR2,
start_node_id IN NUMBER,
goal_node_id IN NUMBER,
depth_limit IN NUMBER,
cost_limit IN NUMBER,
no_of_solutions IN NUMBER,
constraint IN VARCHAR2 DEFAULT NULL
) RETURN SDO_NUMBER_ARRAY;
Returns all paths between two nodes.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the start node in the pair of nodes between which to find paths.
Node ID of the end (goal) node in the pair of nodes between which to find paths.
Maximum number of hierarchy levels below the level containing the start and goal nodes in which to search for paths. If this parameter is null, all available hierarchy levels are considered.
Maximum cost total value of the links in a path. If this parameter is null, no cost limit is applied.
Maximum number of paths to be returned. If this parameter is null, all paths that meet the other criteria for this function are returned.
Name of the network constraint to be applied. If this parameter is null, no network constraint is applied. (For information about network constraints, see Section 5.6.)
This function returns paths between a start node and an end (goal) node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the allPaths
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example returns up to 5 paths, each up to a maximum cost value of 200, between the nodes with node ID values 101 and 105 in the current network memory object. It also displays some information about each returned path. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NETWORK_MANAGER.ALL_PATHS(net_mem,101,105,10,200,5); DBMS_OUTPUT.PUT_LINE('For each path from node 101 to node 105: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP res_numeric := res_array(indx); DBMS_OUTPUT.PUT_LINE('Path ' || res_numeric || ' has the following properties: '); cost := SDO_NET_MEM.PATH.GET_COST(net_mem, res_numeric); DBMS_OUTPUT.PUT_LINE('Path ' || res_numeric || ' cost: ' || cost); res_string := SDO_NET_MEM.PATH.IS_CLOSED(net_mem, res_array(indx)); DBMS_OUTPUT.PUT_LINE('Is path ' || res_numeric || ' closed? ' || res_string); END LOOP; For each path from node 101 to node 105: Path 7 has the following properties: Path 7 cost: 50 Is path 7 closed? FALSE Path 8 has the following properties: Path 8 cost: 70 Is path 8 closed? FALSE Path 9 has the following properties: Path 9 cost: 70 Is path 9 closed? FALSE Path 10 has the following properties: Path 10 cost: 90 Is path 10 closed? FALSE Path 11 has the following properties: Path 11 cost: 120 Is path 11 closed? FALSE
SDO_NET_MEM.NETWORK_MANAGER.CREATE_LOGICAL_NETWORK(
network_name IN VARCHAR2,
no_of_hierarchy_levels IN NUMBER,
is_directed IN VARCHAR2,
node_table_name IN VARCHAR2,
node_cost_column IN VARCHAR2,
link_table_name IN VARCHAR2,
link_cost_column IN VARCHAR2,
path_table_name IN VARCHAR2,
path_link_table_name IN VARCHAR2,
is_complex IN VARCHAR2 DEFAULT 'FALSE');
Creates a logical network, creates all necessary tables, and updates the network metadata.
Name of the network.
Number of hierarchy levels for links in the network. (For an explanation of network hierarchy, see Section 5.5.)
A Boolean value. TRUE
indicates that the links are directed; FALSE
indicates that the links are undirected (not directed).
Name of the node table to be created. (The node table is explained in Section 5.8.1.)
Name of the cost column in the node table. (The node table is explained in Section 5.8.1.)
Name of the link table to be created. (The link table is explained in Section 5.8.2.)
Name of the cost column in the link table. (The link table is explained in Section 5.8.2.)
Name of the path table to be created. (The path table is explained in Section 5.8.3.)
Name of the path-link table to be created. (The path-link table is explained in Section 5.8.4.)
Reserved for future use. Ignored for the current release.
This procedure creates a logical network in a network memory object, the use of which is explained in Section 5.7.
This procedure provides a convenient way to create a logical network when the node, link, and optional related tables do not already exist. The procedure creates the network; creates the node, link, path, and path-link tables for the network; and inserts the appropriate information in the xxx_SDO_NETWORK_METADATA views (described in Section 5.9.1).
The following example creates a logical network named MY_LOGICAL_NET
. The network has two hierarchy levels and is undirected ('FALSE'
for is_directed
).
EXECUTE SDO_NET_MEM.NETWORK_MANAGER.CREATE_LOGICAL_NETWORK('MY_LOGICAL_NET', - 2, 'FALSE', 'MY_NODE_TABLE', 'COST', 'MY_LINK_TABLE', 'COST', - 'MY_PATH_TABLE', 'MY_PATHLINK_TABLE', 'FALSE');
SDO_NET_MEM.NETWORK_MANAGER.CREATE_LRS_NETWORK(
network_name IN VARCHAR2,
no_of_hierarchy_levels IN NUMBER,
is_directed IN VARCHAR2,
srid IN NUMBER,
no_of_dims IN NUMBER,
node_table_name IN VARCHAR2,
node_cost_column IN VARCHAR2,
link_table_name IN VARCHAR2,
link_cost_column IN VARCHAR2,
lrs_table_name IN VARCHAR2,
lrs_geom_column IN VARCHAR2,
path_table_name IN VARCHAR2,
path_geom_column IN VARCHAR2,
path_link_table_name IN VARCHAR2,
is_complex IN VARCHAR2 DEFAULT 'FALSE');
Creates a spatial network containing LRS SDO_GEOMETRY objects, creates all necessary tables, and updates the network metadata.
Name of the network.
Number of hierarchy levels for links in the network. (For an explanation of network hierarchy, see Section 5.5.)
A Boolean value. TRUE
indicates that the links are directed; FALSE
indicates that the links are undirected (not directed).
Coordinate system (spatial reference system) associated with the network. Must be specified as either null (no coordinate system is associated) or a value from the SRID column of the SDO_COORD_REF_SYS table (described in Oracle Spatial User's Guide and Reference).
Number of dimensions for the data, including the LRS measure dimension.
Name of the node table to be created. (The node table is explained in Section 5.8.1.)
Name of the cost column in the node table. (The node table is explained in Section 5.8.1.)
Name of the link table to be created. (The link table is explained in Section 5.8.2.)
Name of the cost column in the link table. (The link table is explained in Section 5.8.2.)
Name of the table to be created for the spatial LRS geometries
Name of the column of type SDO_GEOMETRY in the table for the spatial LRS geometries.
Name of the path table to be created. (The path table is explained in Section 5.8.3.)
Name of the column of type SDO_GEOMETRY in the path table.
Name of the path-link table to be created. (The path-link table is explained in Section 5.8.4.)
Reserved for future use. Ignored for the current release.
This procedure creates a spatial LRS network in a network memory object, the use of which is explained in Section 5.7.
This procedure provides a convenient way to create a spatial LRS network when the node, link, and optional related tables do not already exist. The procedure creates the network; creates the node, link, path, and path-link tables for the network; and inserts the appropriate information in the xxx_SDO_NETWORK_METADATA views (described in Section 5.9.1).
The following example creates an LRS network named MY_LRS_NET
. The network has one hierarchy level, is undirected ('FALSE'
for is_directed
), is based on SRID 8307, and has three-dimensional geometries.
EXECUTE SDO_NET_MEM.NETWORK_MANAGER.CREATE_LRS_NETWORK('MY_LRS_NET', - 1, 'FALSE', 8307, 3, 'MY_NODE_TABLE', 'COST', 'MY_LINK_TABLE', 'COST', - 'MY_LRS_TABLE', 'GEOM', 'MY_PATH_TABLE', 'GEOM', - 'MY_PATHLINK_TABLE', 'FALSE');
SDO_NET_MEM.NETWORK_MANAGER.CREATE_REF_CONSTRAINTS(
network IN VARCHAR2);
Creates referential integrity constraints on the link and path tables.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
This procedure creates referential integrity constraints on the link and path tables in a network memory object, the use of which is explained in Section 5.7.
When the referential integrity constraints are created, they are automatically enabled. You can disable the referential integrity constrains by calling the SDO_NET_MEM.NETWORK_MANAGER.DISABLE_REF_CONSTRAINTS procedure, and enable them again by calling the SDO_NET_MEM.NETWORK_MANAGER.ENABLE_REF_CONSTRAINTS procedure.
This procedure is analogous to using the createRefConstraints
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example creates referential integrity constraints on the link and path tables in the network memory object for the network named ROADS_NETWORK
.
EXECUTE SDO_NET_MEM.NETWORK_MANAGER.CREATE_REF_CONSTRAINTS('ROADS_NETWORK');
SDO_NET_MEM.NETWORK_MANAGER.CREATE_SDO_NETWORK(
network_name IN VARCHAR2,
no_of_hierarchy_levels IN NUMBER,
is_directed IN VARCHAR2,
srid IN NUMBER,
no_of_dims IN NUMBER,
node_table_name IN VARCHAR2,
node_geom_column IN VARCHAR2,
node_cost_column IN VARCHAR2,
link_table_name IN VARCHAR2,
node_geom_column IN VARCHAR2,
link_cost_column IN VARCHAR2,
path_table_name IN VARCHAR2,
node_geom_column IN VARCHAR2,
path_link_table_name IN VARCHAR2,
is_complex IN VARCHAR2 DEFAULT 'FALSE');
Creates a spatial network containing non-LRS SDO_GEOMETRY objects, creates all necessary tables, and updates the network metadata.
Name of the network.
Number of hierarchy levels for links in the network. (For an explanation of network hierarchy, see Section 5.5.)
A Boolean value. TRUE
indicates that the links are directed; FALSE
indicates that the links are undirected (not directed).
Coordinate system (spatial reference system) associated with the network. Must be specified as either null (no coordinate system is associated) or a value from the SRID column of the SDO_COORD_REF_SYS table (described in Oracle Spatial User's Guide and Reference).
Number of dimensions for the spatial data.
Name of the node table to be created. (The node table is explained in Section 5.8.1.)
Name of the column of type SDO_GEOMETRY in the node table. (The node table is explained in Section 5.8.1.)
Name of the cost column in the node table. (The node table is explained in Section 5.8.1.)
Name of the link table to be created. (The link table is explained in Section 5.8.2.)
Name of the column of type SDO_GEOMETRY in the link table. (The link table is explained in Section 5.8.2.)
Name of the cost column in the link table. (The link table is explained in Section 5.8.2.)
Name of the path table to be created. (The path table is explained in Section 5.8.3.)
Name of the column of type SDO_GEOMETRY in the path table. (The path table is explained in Section 5.8.3.)
Name of the path-link table to be created. (The path-link table is explained in Section 5.8.4.)
Reserved for future use. Ignored for the current release.
This procedure creates a spatial (SDO) network in a network memory object, the use of which is explained in Section 5.7.
This procedure provides a convenient way to create a spatial (SDO) network when the node, link, and optional related tables do not already exist. The procedure creates the network; creates the node, link, path, and path-link tables for the network; and inserts the appropriate information in the xxx_SDO_NETWORK_METADATA views (described in Section 5.9.1).
The following example creates an SDO network named MY_SDO_NET
. The network has one hierarchy level, is undirected ('FALSE'
for is_directed
), is based on SRID 8307, and has two-dimensional geometries.
EXECUTE SDO_NET_MEM.NETWORK_MANAGER.CREATE_SDO_NETWORK('MY_SDO_NET', - 1, 'FALSE', 8307, 2, - 'MY_NODE_TABLE', 'GEOM', 'COST', 'MY_LINK_TABLE', 'GEOM', 'COST', - 'MY_PATH_TABLE', 'GEOM', 'MY_PATHLINK_TABLE', 'FALSE');
SDO_NET_MEM.NETWORK_MANAGER.DISABLE_REF_CONSTRAINTS(
network IN VARCHAR2);
Disables referential integrity constraints on the link and path tables.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
This procedure disables referential integrity constraints (created using the SDO_NET_MEM.NETWORK_MANAGER.CREATE_REF_CONSTRAINTS) on the link and path tables in a network memory object, the use of which is explained in Section 5.7.
When the referential integrity constraints are created , they are automatically enabled. You can disable the referential integrity constrains by calling the SDO_NET_MEM.NETWORK_MANAGER.DISABLE_REF_CONSTRAINTS procedure, and enable them again by calling the SDO_NET_MEM.NETWORK_MANAGER.ENABLE_REF_CONSTRAINTS procedure.
This procedure is analogous to using the disableRefConstraints
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example disables the referential integrity constraints on the link and path tables in the network memory object for the network named ROADS_NETWORK
.
EXECUTE SDO_NET_MEM.NETWORK_MANAGER.DISABLE_REF_CONSTRAINTS('ROADS_NETWORK');
SDO_NET_MEM.NETWORK_MANAGER.DROP_NETWORK(
net_mem IN VARCHAR2);
Drops (deletes) the network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
This procedure deletes the network in a network memory object, the use of which is explained in Section 5.7.
This procedure also deletes the node, link, and path tables associated with the network, and the network metadata for the network.
This procedure is analogous to using the dropNetwork
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example deletes the network in the network memory object for the network named ROADS_NETWORK
.
EXECUTE SDO_NET_MEM.NETWORK_MANAGER.DROP_NETWORK('ROADS_NETWORK');
SDO_NET_MEM.NETWORK_MANAGER.ENABLE_REF_CONSTRAINTS(
network IN VARCHAR2);
Enables referential integrity constraints on the link and path tables.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
This procedure enables referential integrity constraints (that had been disabled using the SDO_NET_MEM.NETWORK_MANAGER.DISABLE_REF_CONSTRAINTS procedure) on the link and path tables in a network memory object, the use of which is explained in Section 5.7.
When the referential integrity constraints are created, they are automatically enabled. You can disable the referential integrity constrains by calling the SDO_NET_MEM.NETWORK_MANAGER.DISABLE_REF_CONSTRAINTS procedure, and enable them again by calling the SDO_NET_MEM.NETWORK_MANAGER.ENABLE_REF_CONSTRAINTS procedure.
This procedure is analogous to using the enableRefConstraints
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example enables the referential integrity constraints on the link and path tables in the network memory object for the network named ROADS_NETWORK
.
EXECUTE SDO_NET_MEM.NETWORK_MANAGER.ENABLE_REF_CONSTRAINTS('ROADS_NETWORK');
SDO_NET_MEM.NETWORK_MANAGER.FIND_CONNECTED_COMPONENTS(
net_mem IN VARCHAR2
) RETURN NUMBER;
Returns the number of groups of connected components.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
This function returns the number of connected components in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
Connected components are a group of nodes, connected by links, such that each node in the group can reach or be reached from all other nodes in the group. For example, the logical network shown in Example 5-5 in Section 5.11.4 contains two groups of connected components: in one group, all nodes in hierarchy level 1 can reach or be reached by all other nodes in that level; and in the other group, the two nodes in hierarchy level 2 can reach each other.
Nodes that belong to the same component have the same component number. To get the component number for a node, use the SDO_NET_MEM.NODE.GET_COMPONENT_NO function. To set the component number for a node, use the SDO_NET_MEM.NODE.SET_COMPONENT_NO procedure.
This function is analogous to using the findConnectedComponents
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example returns the child links of the link whose link ID is 1001 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.NETWORK_MANAGER.FIND_CONNECTED_COMPONENTS(net_mem); DBMS_OUTPUT.PUT_LINE('The number of connected components is: ' || res_numeric); . . . The number of connected components is: 2
SDO_NET_MEM.NETWORK_MANAGER.FIND_REACHABLE_NODES(
net_mem IN VARCHAR2,
source_node_id IN NUMBER,
constraint IN VARCHAR2 DEFAULT NULL
) RETURN SDO_NUMBER_ARRAY;
Returns the node ID numbers of nodes that can be reached by a path from a specified source node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the source node.
Name of the network constraint to be applied. If this parameter is null, no network constraint is applied. (For information about network constraints, see Section 5.6.)
This function returns an SDO_NUMBER_ARRAY object of node ID values in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the findReachableNodes
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example nodes that can be reached from the node whose node ID is 101 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NETWORK_MANAGER.FIND_REACHABLE_NODES(net_mem,101); DBMS_OUTPUT.PUT_LINE('Reachable nodes from 101: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP res_numeric := res_array(indx); DBMS_OUTPUT.PUT(res_numeric || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); . . . Reachable nodes from 101: 103 102 104 106 105 107 108 109 110 113 111 112 114
SDO_NET_MEM.NETWORK_MANAGER.FIND_REACHING_NODES(
net_mem IN VARCHAR2,
target_node_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns the node ID numbers of nodes that can reach (by a path) a specified target node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the target node.
This function returns an SDO_NUMBER_ARRAY object of node ID values in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the findReaching_Nodes
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example nodes from which the node whose node ID is 101 in the current network memory object can be reached. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NETWORK_MANAGER.FIND_REACHING_NODES(net_mem,101); DBMS_OUTPUT.PUT_LINE('Nodes from which 101 can be reached: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP res_numeric := res_array(indx); DBMS_OUTPUT.PUT(res_numeric || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); . . . Nodes from which 101 can be reached: 103 102 104 106 105 107 108 109 110 113 111 112 114
SDO_NET_MEM.NETWORK_MANAGER.IS_REACHABLE(
net_mem IN VARCHAR2,
source_node_id IN NUMBER,
target_node_id IN NUMBER,
constraint IN VARCHAR2 DEFAULT NULL
) RETURN VARCHAR2;
Checks if a specified target node can be reached by a path from a specified source node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the source node.
Node ID of the target node.
Name of the network constraint to be applied. If this parameter is null, no network constraint is applied. (For information about network constraints, see Section 5.6.)
This function returns the string TRUE
if the target node can be reached from the source node, and the string FALSE
if the target node cannot be reached from the source node. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isReachable
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example returns the child links of the link whose link ID is 1001 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.NETWORK_MANAGER.IS_REACHABLE(net_mem,101,105); DBMS_OUTPUT.PUT_LINE('Can node 101 reach node 105? ' || res_string); . . . Can node 101 reach node 105? TRUE
SDO_NET_MEM.NETWORK_MANAGER.LIST_NETWORKS() RETURN VARCHAR2;
Returns a list of networks.
None.
This function returns a comma-delimited list of network names in the current network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
The following example returns the names of all networks with network memory objects in the cache. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
res_string := SDO_NET_MEM.NETWORK_MANAGER.LIST_NETWORKS; DBMS_OUTPUT.PUT_LINE('The current in-memory network(s) is/are: ' || res_string); . . . The current in-memory network(s) is/are: ROADS_NETWORK
SDO_NET_MEM.NETWORK_MANAGER.MCST_LINK(
net_mem IN VARCHAR2
) RETURN SDO_NUMBER_ARRAY;
Returns the minimum cost spanning tree.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
This function returns an SDO_NUMBER_ARRAY object with the link ID values of links that make up the minimum cost spanning tree in the specified network memory object. The minimum cost spanning tree is the path with the lowest total cost that visits all nodes in the network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
The Kruskal algorithm is used to determine the minimum cost spanning tree.
This function is analogous to using the mcstLinkArray
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example returns the links in the minimum cost spanning tree of the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NETWORK_MANAGER.MCST_LINK(net_mem); DBMS_OUTPUT.PUT('Network ' || net_mem || ' has the following MCST links: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); . . . Network XYZ_NETWORK has the following MCST links: 1001 1101 1104 1107 1110 1114 1117 1102 1105 1108 1111 1115 1118 1113
SDO_NET_MEM.NETWORK_MANAGER.NEAREST_NEIGHBORS(
net_mem IN VARCHAR2,
start_node_id IN NUMBER,
no_of_neighbors IN NUMBER,
constraint IN VARCHAR2 DEFAULT NULL
) RETURN SDO_NUMBER_ARRAY;
Returns the path ID numbers of paths leading to nodes that are the nearest neighbors (determined by total cost) of a specified start node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the start node.
Maximum number of path IDs to return.
Name of the network constraint to be applied. If this parameter is null, no network constraint is applied. (For information about network constraints, see Section 5.6.)
This function returns an SDO_NUMBER_ARRAY object of path ID values in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
To determine the end node in each path returned, use the SDO_NET_MEM.PATH.GET_END_NODE_ID function. To determine the links in each path returned, use the SDO_NET_MEM.PATH.GET_LINK_IDS function.
This function is analogous to using the nearestNeighbors
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example returns the path IDs of the paths to the three nodes nearest to the node whose node ID is 101 in the current network memory object. It also displays the link IDs for each link in each of the returned paths. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NETWORK_MANAGER.NEAREST_NEIGHBORS(net_mem,101,3); DBMS_OUTPUT.PUT_LINE('Path IDs to the nearest 3 neighbors of node 101 are: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP res_numeric := res_array(indx); DBMS_OUTPUT.PUT(res_numeric || ', which contains links: '); var1_array := SDO_NET_MEM.PATH.GET_LINK_IDS(net_mem, res_numeric); FOR indx1 IN var1_array.FIRST..var1_array.LAST LOOP var1_numeric := var1_array(indx1); DBMS_OUTPUT.PUT(var1_numeric || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); END LOOP; . . . Path IDs to the nearest 3 neighbors of node 101 are: 1, which contains links: 1101 2, which contains links: 1102 3, which contains links: 1102 1104
SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK(
network IN VARCHAR2,
allow_updates IN VARCHAR2);
or
SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK(
network IN VARCHAR2,
link_level IN NUMBER,
allow_updates IN VARCHAR2);
Creates a network memory object in virtual memory cache containing all network objects in a network or in a level in a hierarchical network.
Name of the network from which to add network objects (nodes, links, paths) into the network memory object.
Hierarchy level in a hierarchical network from which to add network objects into the network memory object. If you use the format without this parameter, all network objects in the network are added to the network memory object.
TRUE
specifies that the network memory object is updatable; that is, you can perform editing operations in the cache. FALSE
specifies that the network memory object is read-only; that is, you cannot perform editing operations in the cache.
This procedure creates a network memory object, the use of which is explained in Section 5.7.
For better performance, if you only need to retrieve information or to perform network analysis operations, specify the string FALSE
for the allow_updates
parameter.
This procedure is analogous to using the readNetwork
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example places a copy of all network objects in the network named NET_LOGICAL
into an updatable ('TRUE'
for allow_updates
) network memory object.
SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK('NET_LOGICAL', 'TRUE');
SDO_NET_MEM.NETWORK_MANAGER.SHORTEST_PATH(
net_mem IN VARCHAR2,
start_node_id IN NUMBER,
goal_node_id IN NUMBER,
constraint IN VARCHAR2 DEFAULT NULL
) RETURN NUMBER;
Returns the path ID number of the shortest path (based on the A* search algorithm, and considering costs) between a start node and a goal (end) node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the start node.
Node ID of the goal (end) node.
Name of the network constraint to be applied. If this parameter is null, no network constraint is applied. (For information about network constraints, see Section 5.6.)
This function returns a path ID value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function returns a null value if no path can be made between the specified nodes. For example, if the state of one or more nodes or links is INACTIVE
, and if this condition causes all possible paths to be ignored, the function will return a null value.
To determine the links in the returned path, use the SDO_NET_MEM.PATH.GET_LINK_IDS function.
This function is analogous to using the shortestPath
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example returns the path ID of the shortest path between the nodes with node ID values 101 and 105 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.NETWORK_MANAGER.SHORTEST_PATH(net_mem,101,105); DBMS_OUTPUT.PUT_LINE('The shortest path from node 101 to node 105 is path ID: ' || res_numeric);
SDO_NET_MEM.NETWORK_MANAGER.SHORTEST_PATH_DIJKSTRA(
net_mem IN VARCHAR2,
start_node_id IN NUMBER,
goal_node_id IN NUMBER,
constraint IN VARCHAR2 DEFAULT NULL
) RETURN NUMBER;
Returns the path ID number of the shortest path (based on the Dijkstra search algorithm, and considering costs) between a start node and a goal (end) node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the start node.
Node ID of the goal (end) node.
Name of the network constraint to be applied. If this parameter is null, no network constraint is applied. (For information about network constraints, see Section 5.6.)
This function returns a path ID value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function returns a null value if no path can be made between the specified nodes. For example, if the state of one or more nodes or links is INACTIVE
, and if this condition causes all possible paths to be ignored, the function will return a null value.
To determine the links in the returned path, use the SDO_NET_MEM.PATH.GET_LINK_IDS function.
This function is analogous to using the shortestPathDijkstra
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example returns the path ID of the shortest path (based on the Dijkstra search algorithm, and considering costs) between the nodes with node ID values 101 and 105 in the current network memory object. It also displays information about the returned path. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.NETWORK_MANAGER.SHORTEST_PATH_DIJKSTRA(net_mem,101,105); DBMS_OUTPUT.PUT_LINE('The shortest Dijkstra path from node 101 to node 105 is ' || res_numeric); DBMS_OUTPUT.PUT_LINE('The following are characteristics of this shortest path: '); cost := SDO_NET_MEM.PATH.GET_COST(net_mem, res_numeric); DBMS_OUTPUT.PUT_LINE('Path ' || res_numeric || ' cost: ' || cost); res_string := SDO_NET_MEM.PATH.IS_CLOSED(net_mem, res_numeric); DBMS_OUTPUT.PUT_LINE('Is path ' || res_numeric || ' closed? ' || res_string); res_array := SDO_NET_MEM.PATH.GET_LINK_IDS(net_mem, res_numeric); DBMS_OUTPUT.PUT('Path ' || res_numeric || ' has links: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); res_array := SDO_NET_MEM.PATH.GET_NODE_IDS(net_mem, res_numeric); DBMS_OUTPUT.PUT('Path ' || res_numeric || ' has nodes: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); . . . The shortest Dijkstra path from node 101 to node 105 is 13 The following are characteristics of this shortest path: Path 13 cost: 50 Is path 13 closed? FALSE Path 13 has links: 1102 1104 1105 Path 13 has nodes: 101 103 104 105
SDO_NET_MEM.NETWORK_MANAGER.TSP_PATH(
net_mem IN VARCHAR2,
nd_array IN SDO_NUMBER_ARRAY,
is_closed IN VARCHAR2,
use_exact_cost IN VARCHAR2,
constraint IN VARCHAR2 DEFAULT NULL
) RETURN NUMBER;
Returns the path ID number of the most efficient (in cost or distance) path that includes all specified nodes, that is, the path that solves the "traveling salesman problem" (TSP) for the specified set of nodes.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
An SDO_NUMBER_ARRAY object specifying the node ID numbers of the nodes to be included in the path. The first node specified is always the start node of the returned path. For a closed path, the first node specified is also the last node of the returned path; for an open path, the last node specified is the last node of the returned path.
The string value TRUE
if the path must be closed (that is, start node and end node in returned path are the same node), or the string value FALSE
if the path must be open (that is, end node in the returned path is different from the start node).
The string value TRUE
if the cost values of links are to be used in calculating the TSP path, or the string value FALSE
if the Cartesian distances of links are to be used in calculating the TSP path.
Name of the network constraint to be applied. If this parameter is null, no network constraint is applied. (For information about network constraints, see Section 5.6.)
This function returns a path ID value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function returns a null value if no TSP path can be made using the specified nodes. For example, if the state of one or more nodes or links is INACTIVE
, and if this condition causes all possible paths to be ignored, the function will return a null value.
If multiple possible paths can be constructed that meet all requirements of the request (for example, if two paths have the same lowest total cost), the returned path can be any of these possible paths.
To determine the links in the returned path, use the SDO_NET_MEM.PATH.GET_LINK_IDS function.
This function is analogous to using the tspPath
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example returns the path ID of the open TSP path that starts at node ID 2, ends at node ID 6, and includes node ID 4 in the current network memory object. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
res_numeric := SDO_NET_MEM.NETWORK_MANAGER.TSP_PATH(net_mem, sdo_number_array(2, 4, 6), 'FALSE', 'TRUE'); DBMS_OUTPUT.PUT_LINE('Open TSP path ID for N2, N4, N6: ' || res_numeric); DBMS_OUTPUT.PUT_LINE('which contains these links: '); var1_array := SDO_NET_MEM.PATH.GET_LINK_IDS(net_mem, res_numeric); FOR indx1 IN var1_array.FIRST..var1_array.LAST LOOP var1_numeric := var1_array(indx1); DBMS_OUTPUT.PUT(var1_numeric || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); . . . Open TSP path ID for N2, N4, N6: 4 which contains these links: 102 103 104 105
SDO_NET_MEM.NETWORK_MANAGER.VALIDATE_NETWORK_SCHEMA(
net_mem IN VARCHAR2
) RETURN VARCHAR2;
Validates the network tables.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
This function returns the string TRUE
if the network-related tables in the specified network memory object are valid, and it returns a specific Oracle error message if one or more tables are not valid. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the validateNetworkSchema
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example validates the network tables in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.NETWORK_MANAGER.VALIDATE_NETWORK_SCHEMA(net_mem); 23 DBMS_OUTPUT.PUT_LINE('Is network ' || net_mem || ' valid? ' || res_string); . . . Is network XYZ_NETWORK valid? TRUE
SDO_NET_MEM.NETWORK_MANAGER.WITHIN_COST(
net_mem IN VARCHAR2,
start_node_id IN NUMBER,
cost_limit IN NUMBER,
constraint IN VARCHAR2 DEFAULT NULL
) RETURN SDO_NUMBER_ARRAY;
Returns an array of path IDs of the shortest path to each node that is reachable within a specified cost from a specified start node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID of the start node.
Maximum total path cost.
Name of the network constraint to be applied. If this parameter is null, no network constraint is applied. (For information about network constraints, see Section 5.6.)
This function returns an SDO_NUMBER_ARRAY object of path ID values in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
To determine the end node in each path returned, use the SDO_NET_MEM.PATH.GET_END_NODE_ID function. To determine the links in each path returned, use the SDO_NET_MEM.PATH.GET_LINK_IDS function.
This function is analogous to using the withinCost
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example returns the path ID values of the shortest path to each node in the current network memory object that is reachable within a cost of 100 from the node with the node ID value of 102. It also displays the end node for each returned path. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NETWORK_MANAGER.WITHIN_COST(net_mem,102,100); DBMS_OUTPUT.PUT('Shortest path IDs to nodes within cost of 100 from node 102: '); DBMS_OUTPUT.PUT_LINE(' '); FOR indx IN res_array.FIRST..res_array.LAST LOOP res_numeric := res_array(indx); DBMS_OUTPUT.PUT(res_numeric || ', whose end node is: '); var1_numeric := SDO_NET_MEM.PATH.GET_END_NODE_ID(net_mem, res_numeric); DBMS_OUTPUT.PUT(var1_numeric); DBMS_OUTPUT.PUT_LINE(' '); END LOOP; . . . Shortest path IDs to nodes within cost of 100 from node 102: 14, whose end node is: 101 15, whose end node is: 103 16, whose end node is: 104 17, whose end node is: 105 18, whose end node is: 106 19, whose end node is: 108 20, whose end node is: 107
SDO_NET_MEM.NETWORK_MANAGER.WRITE_NETWORK(
net_mem IN VARCHAR2);
Saves to the database the network objects in a network memory object.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
This procedure saves the network objects in a network memory object, the use of which is explained in Section 5.7.
Temporary links, nodes, and paths are not saved in the database when you call this procedure.
This procedure is analogous to using the writeNetwork
method of the NetworkManager
class of the client-side Java API (described in Section 5.10.2).
The following example saves to the database the network objects in the network memory object for a network named XYZ_NETWORK
.
sdo_net_mem.network_manager.write_network(net_mem=>'XYZ_NETWORK');
SDO_NET_MEM.NODE.GET_ADJACENT_NODE_IDS(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns the node ID numbers of nodes that are adjacent to a specified node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns an SDO_NUMBER_ARRAY object of node ID values in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getAdjacentNodeArray
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the nodes adjacent to the node whose node ID is 103 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NODE.GET_ADJACENT_NODE_IDS(net_mem, 103); DBMS_OUTPUT.PUT('Node 103 has the following adjacent nodes: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); Node 103 has the following adjacent nodes: 102 104 101
SDO_NET_MEM.NODE.GET_CHILD_NODE_IDS(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns the node ID numbers of nodes that are child nodes of a specified node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns an SDO_NUMBER_ARRAY object of node ID values in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getChildNodeArray
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
For information about parent and child nodes and links in a network hierarchy, see Section 5.5.
The following example returns the child nodes of the node whose node ID is 1 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NODE.GET_CHILD_NODE_IDS(net_mem, 1); DBMS_OUTPUT.PUT('Node 1 has the following child nodes: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; . . . Node 1 has the following child nodes: 104 103 105 102 106 101
SDO_NET_MEM.NODE.GET_COMPONENT_NO(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN NUMBER;
Returns the component number of a specified node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a numeric component number for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
All nodes in a group of connected components have the same component number. For an explanation of connected components, see the Usage Notes for the SDO_NET_MEM.NETWORK_MANAGER.FIND_CONNECTED_COMPONENTS function.
This function is analogous to using the getComponentNo
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the component number for a node, use the SDO_NET_MEM.NODE.SET_COMPONENT_NO procedure.
The following example returns the component number of the node whose node ID is 103 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.NODE.GET_COMPONENT_NO(net_mem, 103); DBMS_OUTPUT.PUT_LINE('The component number of node 103 is: ' || res_numeric); . . . The component number of node 103 is: 1
SDO_NET_MEM.NODE.GET_COST(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN NUMBER;
Returns the cost value of a specified node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a numeric cost value for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getCost
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the cost value for a node, use the SDO_NET_MEM.NODE.SET_COST procedure.
The following example returns the cost of the node whose node ID is 103 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.NODE.GET_COST(net_mem, 103); DBMS_OUTPUT.PUT_LINE('The cost of node 103 is: ' || res_numeric); . . . The cost of node 103 is: 0
SDO_NET_MEM.NODE.GET_EXTERNAL_NETWORK_ID(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN NUMBER;
Returns the external network ID number for a node, if it is an external node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a numeric network ID value for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getExternalNetworkID
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the external network ID value for a node, use the SDO_NET_MEM.NODE.SET_EXTERNAL_NETWORK_ID procedure.
The following example returns the external network ID for the node whose node ID is 103 in the current network memory object. In this case, a null value is returned because node 103 is not in an external network. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.NODE.GET_EXTERNAL_NETWORK_ID(net_mem, 103); DBMS_OUTPUT.PUT_LINE('The external network ID for node 103 is: ' || res_numeric); . . . The external network ID for node 103 is:
SDO_NET_MEM.NODE.GET_EXTERNAL_NETWORK_NAME(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN VARCHAR2;
Returns the external network name for a node, if it is an external node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a string network name value for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getExternalNetworkName
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the external network name for the node whose node ID is 103 in the current network memory object. In this case, a null value is returned because node 103 is not in an external network. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.NODE.GET_EXTERNAL_NETWORK_NAME(net_mem, 103); DBMS_OUTPUT.PUT_LINE('The external network name for node 103 is: ' || res_numeric); . . . The external network name for node 103 is:
SDO_NET_MEM.NODE.GET_EXTERNAL_NODE_ID(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN NUMBER;
Returns the node ID number of a node, if it is an external node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a numeric node ID value for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getExternalNodeID
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the external node ID value for a node, use the SDO_NET_MEM.NODE.SET_EXTERNAL_NODE_ID procedure.
The following example returns the external node ID of the node whose node ID is 103 in the current network memory object. In this case, a null value is returned because node 103 is not in an external network. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.NODE.GET_EXTERNAL_NODE_ID(net_mem, 103); DBMS_OUTPUT.PUT_LINE('The external node ID of node 103 is: ' || res_numeric); . . . The external node ID of node 103 is:
SDO_NET_MEM.NODE.GET_GEOM_ID(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN NUMBER;
Returns the geometry ID number of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a numeric geometry ID value for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getGeomID
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the geometry ID value for a node, use the SDO_NET_MEM.NODE.SET_GEOM_ID procedure.
The following example returns the geometry ID of the node whose node ID is 3 in the current network memory object. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
res_numeric := SDO_NET_MEM.NODE.GET_GEOM_ID(net_mem, 3); DBMS_OUTPUT.PUT_LINE('The geometry ID of node 3 is: ' || res_numeric); . . . The geometry ID of node 3 is: 1001
SDO_NET_MEM.NODE.GET_GEOMETRY(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN SDO_GEOMETRY;
Returns the spatial geometry for a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns an SDO_GEOMETRY object for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getGeometry
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the spatial geometry for a node, use the SDO_NET_MEM.NODE.SET_GEOMETRY procedure.
The following example returns the spatial geometry of the node whose node ID is 3 in the current network memory object. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
res_geom := SDO_NET_MEM.NODE.GET_GEOMETRY(net_mem, 3);
SDO_NET_MEM.NODE.GET_HIERARCHY_LEVEL(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN NUMBER;
Returns the hierarchy level of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a numeric hierarchy level for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getHierarchyLevel
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the hierarchy level for a node, use the SDO_NET_MEM.NODE.SET_HIERARCHY_LEVEL procedure.
For information about parent and child nodes and links in a network hierarchy, see Section 5.5.
The following example returns the hierarchy level of the node whose node ID is 1 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.NODE.GET_HIERARCHY_LEVEL(net_mem, 1); DBMS_OUTPUT.PUT_LINE('The hierarchy level of node 1 is: ' || res_numeric); . . . The hierarchy level of node 1 is: 2
SDO_NET_MEM.NODE.GET_IN_LINK_IDS(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns the link ID numbers of links that are inbound links to a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns an SDO_NUMBER_ARRAY object of link ID values in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getInLinks
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the inbound links to the node whose node ID is 103 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NODE.GET_IN_LINK_IDS(net_mem, 103); DBMS_OUTPUT.PUT('Node 103 has the following inbound links: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; . . . Node 103 has the following inbound links: 1102 1103
SDO_NET_MEM.NODE.GET_INCIDENT_LINK_IDS(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns the link ID numbers of links that are to (that is, incident upon) a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns an SDO_NUMBER_ARRAY object of link ID values in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getIncidentLinks
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the incident links of the node whose node ID is 103 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NODE.GET_INCIDENT_LINK_IDS(net_mem, 103); DBMS_OUTPUT.PUT('Node 103 has the following incident links: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; . . . Node 103 has the following incident links: 1102 1104 1103
SDO_NET_MEM.NODE.GET_MEASURE(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN NUMBER;
Returns the measure value of a node in an LRS network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a numeric measure value for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getMeasure
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the measure value for a node, use the SDO_NET_MEM.NODE.SET_MEASURE procedure.
The following example returns the measure value of the node whose node ID is 3 in the current network memory object. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
res_numeric := SDO_NET_MEM.NODE.GET_MEASURE(net_mem, 3); DBMS_OUTPUT.PUT_LINE('The measure value of node 3 is: ' || res_numeric); . . . The measure value of node 3 is: 8
SDO_NET_MEM.NODE.GET_NAME(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN VARCHAR2;
Returns the name of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a node name string for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getName
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the name of a node, use the SDO_NET_MEM.NODE.SET_NAME procedure.
The following example returns the name of the node whose node ID is 103 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.NODE.GET_NAME(net_mem, 103); DBMS_OUTPUT.PUT_LINE('The name of node 103 is: ' || res_string); . . . The name of node 103 is: N3
SDO_NET_MEM.NODE.GET_OUT_LINK_IDS(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns the link ID numbers of links that are outbound links from a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns an SDO_NUMBER_ARRAY object of link ID values in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getOutLinks
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the outbound links from the node whose node ID is 103 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NODE.GET_OUT_LINK_IDS(net_mem, 103); DBMS_OUTPUT.PUT('Node 103 has the following outbound links: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; . . . Node 103 has the following outbound links: 1104
SDO_NET_MEM.NODE.GET_PARENT_NODE_ID(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN NUMBER;
Returns the node ID number of the parent node of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns numeric node ID value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getParentNode
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the parent node of a node, use the SDO_NET_MEM.NODE.SET_PARENT_NODE procedure.
For information about parent and child nodes and links in a network hierarchy, see Section 5.5.
The following example returns the parent node of the node whose node ID is 103 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.NODE.GET_PARENT_NODE_ID(net_mem, 103); DBMS_OUTPUT.PUT_LINE('The parent node of node 103 is: ' || res_numeric); . . . The parent node of node 103 is: 1
SDO_NET_MEM.NODE.GET_PARTITION_ID(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN NUMBER;
Returns the partition ID number of the partition for a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a numeric partition ID value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getPartitionID
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the partition ID of the node whose node ID is 103 in the current network memory object. In this case, a null value is returned because the network is not partitioned. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_numeric := SDO_NET_MEM.NODE.GET_PARTITION_ID(net_mem, 103); DBMS_OUTPUT.PUT_LINE('The partition for node 103 is: ' || res_numeric); . . . The partition for node 103 is: 0
SDO_NET_MEM.NODE.GET_SIBLING_NODE_IDS(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns the node ID numbers of nodes that are sibling nodes of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns an SDO_NUMBER_ARRAY object of node ID values in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getSiblingNodeArray
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
Sibling nodes are nodes that have the same parent node in a hierarchical network. For information about parent and child nodes and links in a network hierarchy, see Section 5.5.
The following example returns the sibling nodes of the node whose node ID is 103 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_array := SDO_NET_MEM.NODE.GET_SIBLING_NODE_IDS(net_mem, 103); DBMS_OUTPUT.PUT('Node 103 has the following sibling nodes: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); . . . Node 103 has the following sibling nodes: 104 105 102 106 101
SDO_NET_MEM.NODE.GET_STATE(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN VARCHAR2;
Returns the state of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a state name string for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
The state is one of the following string values: ACTIVE
or INACTIVE
. The node state determines whether or not the node is considered by network analysis functions, such as SDO_NET_MEM.NETWORK_MANAGER.SHORTEST_PATH. If the state is ACTIVE
, the node is considered by network analysis functions; if the state is INACTIVE
, the node is ignored by these functions.
This function is analogous to using the getState
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the state of a node, use the SDO_NET_MEM.NODE.SET_STATE procedure.
The following example returns the state of the node whose node ID is 103 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.NODE.GET_STATE(net_mem, 103); DBMS_OUTPUT.PUT_LINE('The state of node 103 is: ' || res_string); . . . The state of node 103 is: ACTIVE
SDO_NET_MEM.NODE.GET_TYPE(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN VARCHAR2;
Returns the type of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns a type name string for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getType
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To set the type of a node, use the SDO_NET_MEM.NODE.SET_TYPE procedure.
The following example sets the type of the node whose node ID is 114 in the current network memory object, and then returns the type. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
-- SET_TYPE -- Set the type of node 114 to 'Research'. SDO_NET_MEM.NODE.SET_TYPE(net_mem, 114, 'Research'); -- GET_TYPE res_string := SDO_NET_MEM.NODE.GET_TYPE(net_mem, 114); DBMS_OUTPUT.PUT_LINE('The type of node 114 is: ' || res_string); . . . The type of node 114 is: Research
SDO_NET_MEM.NODE.IS_ACTIVE(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN VARCHAR2;
Checks if a node is active.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns the string TRUE
if the node in the specified network memory object is active, or FALSE
if the node is not active. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isActive
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if the node whose node ID is 103 in the current network memory object is active. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.NODE.IS_ACTIVE(net_mem, 103); DBMS_OUTPUT.PUT_LINE('Is node 103 active?: ' || res_string); . . . Is node 103 active?: TRUE
SDO_NET_MEM.NODE.IS_EXTERNAL_NODE(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN VARCHAR2;
Checks if a node is external to the network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns the string TRUE
if the node in the specified network memory object is external to the network, or FALSE
if the node is in the network. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isExternalNode
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if the node whose node ID is 103 in the current network memory object is external to the network. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.NODE.IS_EXTERNAL_NODE(net_mem, 103); DBMS_OUTPUT.PUT_LINE('Is node 103 an external node?: ' || res_string); . . . Is node 103 an external node?: FALSE
SDO_NET_MEM.NODE.IS_LOGICAL(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN VARCHAR2;
Checks if a node is in a logical network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns the string TRUE
if the node in the specified network memory object is in a logical network, or FALSE
if the node is not in a logical network. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isLogical
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if the node whose node ID is 103 in the current network memory object is in a logical network. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.NODE.IS_LOGICAL(net_mem, 103); DBMS_OUTPUT.PUT_LINE('Is node 103 a logical node?: ' || res_string); . . . Is node 103 a logical node?: TRUE
SDO_NET_MEM.NODE.IS_TEMPORARY(
net_mem IN VARCHAR2,
node_id IN NUMBER
) RETURN VARCHAR2;
Checks if a node is temporary.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This function returns the string TRUE
if the node in the specified network memory object is temporary, or FALSE
if the node is not temporary. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
Temporary links, nodes, and paths are not saved in the database when you call the SDO_NET_MEM.NETWORK_MANAGER.WRITE_NETWORK procedure.
This function is analogous to using the isTemporary
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if the node whose node ID is 103 in the current network memory object is temporary. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.NODE.IS_TEMPORARY(net_mem, 103); DBMS_OUTPUT.PUT_LINE('Is node 103 temporary?: ' || res_string); . . . Is node 103 temporary?: FALSE
SDO_NET_MEM.NODE.LINK_EXISTS(
net_mem IN VARCHAR2,
node_id1 IN NUMBER,
node_id2 IN NUMBER
) RETURN VARCHAR2;
Checks if a link exists between two nodes.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
Node ID number.
This function returns the string TRUE
if a link exists between the two nodes in the specified network memory object, or FALSE
if a link does not exist. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the linkExists
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if a link exists between the nodes with node ID values 103 and 104 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
res_string := SDO_NET_MEM.NODE.LINK_EXISTS(net_mem, 103, 104); DBMS_OUTPUT.PUT_LINE('Does a link exist between nodes 103 and 104?: ' || res_string); . . . Does a link exist between nodes 103 and 104?: TRUE
SDO_NET_MEM.NODE.MAKE_TEMPORARY(
net_mem IN VARCHAR2,
node_id IN NUMBER);
Makes a node temporary.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
This procedure makes the node in the specified network memory object temporary. (Temporary links, nodes, and paths are not saved in the database when you call the SDO_NET_MEM.NETWORK_MANAGER.WRITE_NETWORK procedure.) For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the makeTemporary
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To check if a node in a network memory object is temporary, use the SDO_NET_MEM.NODE.IS_TEMPORARY function.
The following example makes the node whose node ID is 114 in the current network memory object a temporary node. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.NODE.MAKE_TEMPORARY(net_mem, 114);
SDO_NET_MEM.NODE.SET_COMPONENT_NO(
net_mem IN VARCHAR2,
node_id IN NUMBER,
no IN NUMBER);
Sets the component number of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
Component number.
This procedure sets a node component number value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
All nodes in a group of connected components have the same component number. For an explanation of connected components, see the Usage Notes for the SDO_NET_MEM.NETWORK_MANAGER.FIND_CONNECTED_COMPONENTS function.
This procedure is analogous to using the setComponentNo
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the node component value for a node, use the SDO_NET_MEM.NODE.GET_COMPONENT_NO function.
The following example sets the component number of the node whose node ID is 114 in the current network memory object to 987. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.NODE.SET_COMPONENT_NO(net_mem, 114, 987);
SDO_NET_MEM.NODE.SET_COST(
net_mem IN VARCHAR2,
node_id IN NUMBER,
cost IN NUMBER);
Sets the cost value of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
Cost value.
This procedure sets a numeric node cost value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setCost
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the cost value for a node, use the SDO_NET_MEM.NODE.GET_COST function.
The following example sets the cost of the node whose node ID is 114 in the current network memory object to 40. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.NODE.SET_COST(net_mem, 114, 40);
SDO_NET_MEM.NODE.SET_EXTERNAL_NETWORK_ID(
net_mem IN VARCHAR2,
node_id IN NUMBER,
external_network_id IN NUMBER);
Sets the external network ID value of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
External network ID number.
This procedure sets a numeric external network ID value for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setExternalNetworkID
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the external network ID value for a node, use the SDO_NET_MEM.NODE.GET_EXTERNAL_NETWORK_ID function.
The following example sets the external network ID of the node whose node ID is 114 in the current network memory object to 1000. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.NODE.SET_EXTERNAL_NETWORK_ID(net_mem, 114, 1000);
SDO_NET_MEM.NODE.SET_EXTERNAL_NODE_ID(
net_mem IN VARCHAR2,
node_id IN NUMBER,
external_node_id IN NUMBER);
Sets the node ID value of a node external to the network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
External node ID number.
This procedure sets a numeric external node ID value for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setExternalNodeID
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the external node ID value for a node, use the SDO_NET_MEM.NODE.GET_EXTERNAL_NODE_ID function.
The following example sets the external node ID of the node whose node ID is 114 in the current network memory object to 1014. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.NODE.SET_EXTERNAL_NODE_ID(net_mem, 114, 1014);
SDO_NET_MEM.NODE.SET_GEOM_ID(
net_mem IN VARCHAR2,
node_id IN NUMBER,
geom_id IN NUMBER);
Sets the geometry ID value of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
Geometry ID number.
This procedure sets a numeric node geometry ID value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setGeomID
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the geometry ID value for a node, use the SDO_NET_MEM.NODE.GET_GEOM_ID function.
The following example sets the geometry ID of the node whose node ID is 7 in the current network memory object to 99. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
SDO_NET_MEM.NODE.SET_GEOM_ID(net_mem, 7, 99);
SDO_NET_MEM.NODE.SET_GEOMETRY(
net_mem IN VARCHAR2,
node_id IN NUMBER,
geom IN SDO_GEOMETRY);
Sets the geometry for a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
Spatial geometry object.
This procedure creates an SDO_GEOMETRY object for the node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setGeometry
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the geometry for a node, use the SDO_NET_MEM.NODE.GET_GEOMETRY function.
The following example sets the geometry of the node whose node ID is 114 in the network memory object for a network named MY_NETWORK
.
SDO_NET_MEM.NODE.SET_GEOMETRY('MY_NETWORK', 114, SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(9,4,NULL), NULL, NULL));
SDO_NET_MEM.NODE.SET_HIERARCHY_LEVEL(
net_mem IN VARCHAR2,
node_id IN NUMBER,
level IN NUMBER);
Sets the hierarchy level of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
Hierarchy level number.
This procedure sets a numeric hierarchy level value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setHierarchyLevel
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the hierarchy level of a node, use the SDO_NET_MEM.NODE.GET_HIERARCHY_LEVEL function.
For information about parent and child nodes and links in a network hierarchy, see Section 5.5.
The following example sets the hierarchy level whose node ID is 1 in the current network memory object to 2.
SDO_NET_MEM.NODE.SET_HIERARCHY_LEVEL(net_mem, 1, 2);
SDO_NET_MEM.NODE.SET_MEASURE(
net_mem IN VARCHAR2,
node_id IN NUMBER,
measure IN NUMBER);
Sets the measure value of a node in an LRS network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
Measure value.
This procedure sets a numeric node measure value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setMeasure
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the measure value of a node, use the SDO_NET_MEM.NODE.GET_MEASURE function.
The following example sets the measure value of the node whose node ID is 7 in the current network memory object to 30. (This example is an excerpt from Example 5-4 in Section 5.11.3.)
SDO_NET_MEM.NODE.SET_MEASURE(net_mem, 7, 30);
SDO_NET_MEM.NODE.SET_NAME(
net_mem IN VARCHAR2,
node_id IN NUMBER,
node_name IN VARCHAR2);
Sets the name of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
Node name.
This procedure sets a node name string value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setName
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the name of a node, use the SDO_NET_MEM.NODE.GET_NAME function.
The following example sets the name of the node whose node ID is 114 in the current network memory object to the string My favorite node
. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.NODE.SET_NAME(net_mem, 114, 'My favorite node');
SDO_NET_MEM.NODE.SET_PARENT_NODE(
net_mem IN VARCHAR2,
node_id IN NUMBER,
parent_node_id IN NUMBER);
Sets the parent node of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
Parent node ID number.
This procedure specifies the parent node for a node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setParentNode
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the ID value for a parent node, use the SDO_NET_MEM.NODE.GET_PARENT_NODE_ID function.
For information about parent and child nodes and links in a network hierarchy, see Section 5.5.
The following example sets the parent node of the node whose node ID is 114 in the current network memory object to the node whose node ID is 1. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.NODE.SET_PARENT_NODE(net_mem, 114, 1);
SDO_NET_MEM.NODE.SET_STATE(
net_mem IN VARCHAR2,
node_id IN NUMBER,
state IN VARCHAR2);
Sets the state of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
Node state. Must be one of the following string values: ACTIVE
or INACTIVE
.
This procedure sets a node state string value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
The node state determines whether or not the node is considered by network analysis functions, such as SDO_NET_MEM.NETWORK_MANAGER.SHORTEST_PATH. If the state is ACTIVE
, the node is considered by network analysis functions; if the state is INACTIVE
, the node is ignored by these functions.
This procedure is analogous to using the setState
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the node state, use the SDO_NET_MEM.NODE.GET_STATE function.
The following example sets the state of the node whose node ID is 111 in the current network memory object to the string INACTIVE
. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
SDO_NET_MEM.NODE.SET_STATE(net_mem, 111, 'INACTIVE');
SDO_NET_MEM.NODE.SET_TYPE(
net_mem IN VARCHAR2,
node_id IN NUMBER,
type IN VARCHAR2);
Sets the type of a node.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Node ID number.
Node type.
This procedure sets a node type string value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setType
method of the Node
interface of the client-side Java API (described in Section 5.10.2).
To get the type value for a node, use the SDO_NET_MEM.NODE.GET_TYPE function.
The following example sets the type of the node whose node ID is 114 in the current network memory object, and then returns the type. (This example is an excerpt from Example 5-5 in Section 5.11.4.)
-- SET_TYPE -- Set the type of node 114 to 'Research'. SDO_NET_MEM.NODE.SET_TYPE(net_mem, 114, 'Research'); -- GET_TYPE res_string := SDO_NET_MEM.NODE.GET_TYPE(net_mem, 114); DBMS_OUTPUT.PUT_LINE('The type of node 114 is: ' || res_string); . . . The type of node 114 is: Research
SDO_NET_MEM.PATH.COMPUTE_GEOMETRY(
net_mem IN VARCHAR2,
path_id IN NUMBER,
tolerance IN NUMBER);
Sets the spatial geometry for a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
Tolerance value associated with geometries in the network. (Tolerance is explained in Chapter 1 of Oracle Spatial User's Guide and Reference.) This value should be consistent with the tolerance values of the geometries in the link table and node table for the network.
This procedure computes the SDO_GEOMETRY object for the specified path in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the computeGeometry
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
To get the computed geometry, use the SDO_NET_MEM.PATH.GET_GEOMETRY function.
The following example computes the spatial geometry of a path in the current network memory object, and then places the computed geometry in a variable (of type SDO_GEOMETRY) named res_geom
.
-- COMPUTE_GEOMETRY SDO_NET_MEM.PATH.COMPUTE_GEOMETRY(net_mem, path_id, 0.05); -- GET_GEOMETRY res_geom := SDO_NET_MEM.PATH.GET_GEOMETRY(net_mem, path_id);
SDO_NET_MEM.PATH.GET_COST(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN NUMBER;
Returns the cost value of a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns a numeric cost value for a path in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getCost
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the cost of a path in the current network memory object.
res_numeric := SDO_NET_MEM.PATH.GET_COST(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('The cost of path ' || path_id || ' is: ' || res_numeric); . . . The cost of path 21 is: 50
SDO_NET_MEM.PATH.GET_END_NODE_ID(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN NUMBER;
Returns the node ID value of the end node of a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns a numeric end node ID value for a path in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getEndNodeID
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the node ID of the end node of a path in the current network memory object.
res_numeric := SDO_NET_MEM.PATH.GET_END_NODE_ID(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('The end node ID of path ' || path_id || ' is: ' || res_numeric); . . . The end node ID of path 21 is: 105
SDO_NET_MEM.PATH.GET_GEOMETRY(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN SDO_GEOMETRY;
Returns the spatial geometry of a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns an SDO_GEOMETRY object for a path in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getPath
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
To set the geometry ID value for a path, use the SDO_NET_MEM.PATH.SET_GEOMETRY procedure.
The following example returns the spatial geometry of a path in the current network memory object.
res_geom := SDO_NET_MEM.PATH.GET_GEOMETRY(net_mem, path_id);
SDO_NET_MEM.PATH.GET_LINK_IDS(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns an array of link ID values of the links in a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns an SDO_NUMBER_ARRAY object with link ID values for links in a path in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getLinks
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the links in a path in the current network memory object.
res_array := SDO_NET_MEM.PATH.GET_LINK_IDS(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('Path ' || path_id || ' has the following links: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; . . . Path 21 has the following links: 1102 1104 1105
SDO_NET_MEM.PATH.GET_NAME(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN VARCHAR2;
Returns the name of a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns a path name string for a path in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getName
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
To set the name for a path, use the SDO_NET_MEM.PATH.SET_NAME procedure.
The following example sets the name of a path in the current network memory object to the string My favorite path
, and then returns the name.
-- SET_NAME -- Set the name of path to 'My favorite path'. SDO_NET_MEM.PATH.SET_NAME(net_mem, path_id, 'My favorite path'); -- GET_NAME res_string := SDO_NET_MEM.PATH.GET_NAME(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('The name of path ' || path_id || ' is: ' || res_string); . . . The name of path 21 is: My favorite path
SDO_NET_MEM.PATH.GET_NO_OF_LINKS(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN NUMBER;
Returns the number of links in a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns the number of links in a path in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getNoOfLinks
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the number of links in a path in the current network memory object.
res_numeric := SDO_NET_MEM.PATH.GET_NO_OF_LINKS(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('The number of links in path ' || path_id || ' is: ' || res_numeric); . . . The number of links in path 21 is: 3
SDO_NET_MEM.PATH.GET_NODE_IDS(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN SDO_NUMBER_ARRAY;
Returns an array of node ID values of the nodes in a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns an SDO_NUMBER_ARRAY object with node ID values for nodes in a path in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getNodes
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the node IDs of the nodes in a path in the current network memory object.
res_array := SDO_NET_MEM.PATH.GET_NODE_IDS(net_mem, path_id); DBMS_OUTPUT.PUT('Path ' || path_id || ' has the following nodes: '); FOR indx IN res_array.FIRST..res_array.LAST LOOP DBMS_OUTPUT.PUT(res_array(indx) || ' '); END LOOP; DBMS_OUTPUT.PUT_LINE(' '); . . . Path 21 has the following nodes: 101 103 104 105
SDO_NET_MEM.PATH.GET_START_NODE_ID(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN NUMBER;
Returns the node ID value of the start node of a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns a numeric start node ID value for a path in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getStartNode
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example returns the start node ID of a path in the current network memory object.
res_numeric := SDO_NET_MEM.PATH.GET_START_NODE_ID(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('The start node ID of path ' || path_id || ' is: ' || res_numeric); . . . The start node ID of path 21 is: 101
SDO_NET_MEM.PATH.GET_TYPE(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN VARCHAR2;
Returns the type of a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns a type name string for a path in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the getType
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
To set the type for a path, use the SDO_NET_MEM.PATH.SET_TYPE procedure.
The following example sets the type of a path in the current network memory object to the string Logical connections
, and then returns the type.
-- SET_TYPE -- Set the type of the path to 'Logical connections'. SDO_NET_MEM.PATH.SET_TYPE(net_mem, path_id, 'Logical connections'); -- GET_TYPE res_string := SDO_NET_MEM.PATH.GET_TYPE(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('The type of path ' || path_id || ' is: ' || res_string); . . . The type of path 21 is: Logical connections
SDO_NET_MEM.PATH.IS_ACTIVE(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN VARCHAR2;
Checks if a path is active.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns the string TRUE
if the path in the specified network memory object is active, or FALSE
if the path is not active. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isActive
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if a path in the current network memory object is active.
res_string := SDO_NET_MEM.PATH.IS_ACTIVE(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('Is path ' || path_id || ' active?: ' || res_string); . . . Is path 21 active?: TRUE
SDO_NET_MEM.PATH.IS_CLOSED(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN VARCHAR2;
Checks if a path is closed.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns the string TRUE
if the path in the specified network memory object is closed, or FALSE
if the path is not closed. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isClosed
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if a path in the current network memory object is closed.
res_string := SDO_NET_MEM.PATH.IS_CLOSED(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('Is path ' || path_id || ' closed?: ' || res_string); . . . Is path 21 closed?: FALSE
SDO_NET_MEM.PATH.IS_CONNECTED(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN VARCHAR2;
Checks if a path is connected.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns the string TRUE
if the path in the specified network memory object is connected, or FALSE
if the path is not connected. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isConnected
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if a path in the current network memory object is connected.
res_string := SDO_NET_MEM.PATH.IS_CONNECTED(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('Is path ' || path_id || ' connected?: ' || res_string); . . . Is path 21 connected?: FALSE
SDO_NET_MEM.PATH.IS_LOGICAL(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN VARCHAR2;
Checks if a path is in a logical network.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns the string TRUE
if the path in the specified network memory object is in a logical network, or FALSE
if the path is not in a logical network. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isLogical
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if a path in the current network memory object is a logical path.
res_string := SDO_NET_MEM.PATH.IS_LOGICAL(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('Is path ' || path_id || ' a logical path?: ' || res_string); . . . Is path 21 a logical path?: TRUE
SDO_NET_MEM.PATH.IS_SIMPLE(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN VARCHAR2;
Checks if a path is simple.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns the string TRUE
if the path in the specified network memory object is simple, or FALSE
if the path is not simple (that is, is a complex path). In a simple path, the links form an ordered list that can be traversed from the start node to the end node with each link visited once. In a complex path, there are multiple options for going from the start node to the end node.
For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This function is analogous to using the isSimple
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if a path in the current network memory object is a simple path.
res_string := SDO_NET_MEM.PATH.IS_SIMPLE(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('Is path ' || path_id || ' a simple path?: ' || res_string); . . . Is path 21 a simple path?: TRUE
SDO_NET_MEM.PATH.IS_TEMPORARY(
net_mem IN VARCHAR2,
path_id IN NUMBER
) RETURN VARCHAR2;
Checks if a path is temporary.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
This function returns the string TRUE
if the path in the specified network memory object is temporary, or FALSE
if the path is not temporary. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
Temporary links, nodes, and paths are not saved in the database when you call the SDO_NET_MEM.NETWORK_MANAGER.WRITE_NETWORK procedure.
This function is analogous to using the isTemporary
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example checks if a path in the current network memory object is temporary.
res_string := SDO_NET_MEM.PATH.IS_TEMPORARY(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('Is path ' || path_id || ' temporary?: ' || res_string); . . . Is path 21 temporary?: FALSE
SDO_NET_MEM.PATH.SET_GEOMETRY(
net_mem IN VARCHAR2,
path_id IN NUMBER,
geom IN SDO_GEOMETRY);
Sets the spatial geometry for a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
Spatial geometry object.
This procedure creates an SDO_GEOMETRY object for the node in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setGeometry
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
To get the geometry for a path, use the SDO_NET_MEM.PATH.GET_GEOMETRY function.
The following example sets the spatial geometry of a path in the current network memory object.
SDO_NET_MEM.PATH.SET_GEOMETRY(net_mem, path_id, SDO_GEOMETRY( 2002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(2,2, 2,4, 8,4, 12,4, 12,10, 8,10, 5,14)));
SDO_NET_MEM.PATH.SET_NAME(
net_mem IN VARCHAR2,
path_id IN NUMBER,
path_name IN VARCHAR2);
Sets the name of a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
Path name.
This procedure sets a path name string value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setName
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
To get the name of a path, use the SDO_NET_MEM.PATH.GET_NAME function.
The following example sets the name of a path in the current network memory object to the string My favorite path
, and then returns the name.
-- SET_NAME -- Set the name of path to 'My favorite path'. SDO_NET_MEM.PATH.SET_NAME(net_mem, path_id, 'My favorite path'); -- GET_NAME res_string := SDO_NET_MEM.PATH.GET_NAME(net_mem, path_id); DBMS_OUTPUT.PUT_LINE('The name of path ' || path_id || ' is: ' || res_string); . . . The name of path 21 is: My favorite path
SDO_NET_MEM.PATH.SET_PATH_ID(
net_mem IN VARCHAR2,
path_id IN NUMBER,
new_path_id IN NUMBER);
Sets the path ID value of a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
New path ID number.
This procedure sets a numeric path ID value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setPathID
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
The following example sets the path ID of a path in the current network memory object to 6789.
SDO_NET_MEM.PATH.SET_PATH_ID(net_mem, path_id, 6789);
SDO_NET_MEM.PATH.SET_TYPE(
net_mem IN VARCHAR2,
path_id IN NUMBER,
type IN VARCHAR2);
Sets the type of a path.
Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.
Path ID number.
Path type.
This procedure sets a path type string value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.7.
This procedure is analogous to using the setType
method of the Path
interface of the client-side Java API (described in Section 5.10.2).
To get the type value for a path, use the SDO_NET_MEM.PATH.GET_TYPE function.
The following example sets the path type of a path in the current network memory object to the string Scenic
.
SDO_NET_MEM.PATH.SET_TYPE(net_mem, path_id, 'Scenic');