7 SDO_NET_MEM Package Subprograms

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.

To use the subprograms in this chapter, you must understand the conceptual information about networks in Chapter 5, especially Section 5.8, 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:

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.11.2).

Note that although this manual refers to "the SDO_NET_MEM package," all subprograms except one are actually implemented as methods of several object types. Thus, they are not listed by the statement DESCRIBE SDO_NET_MEM. Instead, you can use the DESCRIBE statements listed in Table 7-1 to see the subprograms in each grouping; however, because they are member functions and procedures in an object type, the subprograms in each grouping will not be listed in alphabetical order in the DESCRIBE statement output.

Table 7-1 DESCRIBE Statements for SDO_NET_MEM Subprograms

Subprogram Grouping DESCRIBE Statement

SDO_NET_MEM.NETWORK_MANAGER

DESCRIBE sdo_network_manager_t

SDO_NET_MEM.NETWORK

DESCRIBE sdo_network_t

SDO_NET_MEM.NODE

DESCRIBE sdo_node_t

SDO_NET_MEM.LINK

DESCRIBE sdo_link_t

SDO_NET_MEM.PATH

DESCRIBE sdo_path_t


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

Format

SDO_NET_MEM.SET_MAX_MEMORY_SIZE(

     maxsize IN NUMBER);

Description

Sets the Java maximum heap size for an application to run in an Oracle Java virtual machine.

Parameters

maxsize

Number of bytes for the Java maximum heap size.

Usage Notes

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.

Examples

The following example sets the Java maximum heap size to 536870912 (512 MB).

EXECUTE SDO_NET_MEM.SET_MAX_MEMORY_SIZE(536870912);

SDO_NET_MEM.LINK.GET_CHILD_LINKS

Format

SDO_NET_MEM.LINK.GET_CHILD_LINKS(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns the child links of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getChildLinks method of the Link interface of the client-side Java API (described in Section 5.11.2).

For information about parent and child nodes and links in a network hierarchy, see Section 5.5.

Examples

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.13.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

Format

SDO_NET_MEM.LINK.GET_CO_LINK_IDS(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns the co-links of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

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.11.2).

Examples

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

Format

SDO_NET_MEM.LINK.GET_COST(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the cost value of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getCost method of the Link interface of the client-side Java API (described in Section 5.11.2).

To set the cost value of a link, use the SDO_NET_MEM.LINK.SET_COST procedure.

Examples

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.13.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

Format

SDO_NET_MEM.LINK.GET_END_MEASURE(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the end measure value of a link in an LRS network.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getEndMeasure method of the Link interface of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.LINK.GET_END_NODE_ID(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the node ID of the end node of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getEndNode method of the Link interface of the client-side Java API (described in Section 5.11.2).

To set the end node of a link, use the SDO_NET_MEM.LINK.SET_END_NODE procedure.

Examples

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.13.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

Format

SDO_NET_MEM.LINK.GET_GEOM_ID(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the geometry ID of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getGeomID method of the Link interface of the client-side Java API (described in Section 5.11.2).

To set the geometry ID of a link, use the SDO_NET_MEM.LINK.SET_GEOM_ID procedure.

Examples

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.13.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

Format

SDO_NET_MEM.LINK.GET_GEOMETRY(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN SDO_GEOMETRY;

Description

Returns the spatial geometry object for a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getGeometry method of the Link interface of the client-side Java API (described in Section 5.11.2).

To set the spatial geometry of a link, use the SDO_NET_MEM.LINK.SET_GEOMETRY procedure.

Examples

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

Format

SDO_NET_MEM.LINK.GET_LEVEL(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the hierarchy level of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getLinkLevel method of the Link interface of the client-side Java API (described in Section 5.11.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.

Examples

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.13.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

Format

SDO_NET_MEM.LINK.GET_NAME(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Returns the name of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getName method of the Link interface of the client-side Java API (described in Section 5.11.2).

To set the name of a link, use the SDO_NET_MEM.LINK.SET_NAME procedure.

Examples

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.13.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

Format

SDO_NET_MEM.LINK.GET_PARENT_LINK_ID(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the link ID number of the parent link of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getParentLink method of the Link interface of the client-side Java API (described in Section 5.11.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.

Examples

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.13.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

Format

SDO_NET_MEM.LINK.GET_SIBLING_LINK_IDS(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns the sibling links of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getSiblingLinkArray method of the Link interface of the client-side Java API (described in Section 5.11.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.

Examples

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.13.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

Format

SDO_NET_MEM.LINK.GET_START_MEASURE(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the start measure value of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getStartMeasure method of the Link interface of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.LINK.GET_START_NODE_ID(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the node ID of the start node of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getStartNode method of the Link interface of the client-side Java API (described in Section 5.11.2).

To set the start node of a link, use the SDO_NET_MEM.LINK.SET_START_NODE procedure.

Examples

The following example returns the start node of the link whose link ID is 1004 in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.13.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

Format

SDO_NET_MEM.LINK.GET_STATE(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Returns the state of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

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.11.2).

To set the link state, use the SDO_NET_MEM.LINK.SET_STATE procedure.

Examples

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.13.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

Format

SDO_NET_MEM.LINK.GET_TYPE(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Returns the type of a link.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the getType method of the Link interface of the client-side Java API (described in Section 5.11.2).

To set the type of a link, use the SDO_NET_MEM.LINK.SET_TYPE procedure.

Examples

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.13.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

Format

SDO_NET_MEM.LINK.IS_ACTIVE(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a link is active.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the isActive method of the Link interface of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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_LOGICAL

Format

SDO_NET_MEM.LINK.IS_LOGICAL(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a link is in a logical network.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

This function is analogous to using the isLogical method of the Link interface of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.LINK.IS_TEMPORARY(

     net_mem IN VARCHAR2,

     link_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a link is temporary.

Parameters

net_mem

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

Link ID number.

Usage Notes

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.8.

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.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.LINK.SET_COST(

     net_mem IN VARCHAR2,

     link_id IN NUMBER,

     cost IN NUMBER);

Description

Sets the cost value of a link.

Parameters

net_mem

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

Link ID number.

cost

Cost value.

Usage Notes

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.8.

This procedure is analogous to using the setCost method of the Link interface of the client-side Java API (described in Section 5.11.2).

To get the cost value of a link, use the SDO_NET_MEM.LINK.GET_COST function.

Examples

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.13.4.)

SDO_NET_MEM.LINK.SET_COST(net_mem, 1119, 40);

SDO_NET_MEM.LINK.SET_END_NODE

Format

SDO_NET_MEM.LINK.SET_END_NODE(

     net_mem IN VARCHAR2,

     link_id IN NUMBER,

     end_node_id IN NUMBER);

Description

Sets the end node of a link.

Parameters

net_mem

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

Link ID number.

end_node_id

Node ID number.

Usage Notes

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.8.

This procedure is analogous to using the setEndNode method of the Link interface of the client-side Java API (described in Section 5.11.2).

To get the end node of a link, use the SDO_NET_MEM.LINK.GET_END_NODE_ID function.

Examples

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.13.4.)

SDO_NET_MEM.LINK.SET_END_NODE(net_mem, 1119, 109);

SDO_NET_MEM.LINK.SET_GEOM_ID

Format

SDO_NET_MEM.LINK.SET_GEOM_ID(

     net_mem IN VARCHAR2,

     link_id IN NUMBER,

     geom_id IN NUMBER);

Description

Sets the geometry ID number of a link.

Parameters

net_mem

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

Link ID number.

geom_id

Geometry ID number.

Usage Notes

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.8.

This procedure is analogous to using the setGeomID method of the Link interface of the client-side Java API (described in Section 5.11.2).

To get the geometry ID of a link, use the SDO_NET_MEM.LINK.GET_GEOM_ID function.

Examples

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

Format

SDO_NET_MEM.LINK.SET_GEOMETRY(

     net_mem IN VARCHAR2,

     link_id IN NUMBER,

     geom IN SDO_GEOMETRY);

Description

Sets the spatial geometry of a link.

Parameters

net_mem

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

Link ID number.

geom

Spatial geometry object.

Usage Notes

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.8.

This procedure is analogous to using the setGeometry method of the Link interface of the client-side Java API (described in Section 5.11.2).

To get the spatial geometry of a link, use the SDO_NET_MEM.LINK.GET_GEOMETRY function.

Examples

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

Format

SDO_NET_MEM.LINK.SET_LEVEL(

     net_mem IN VARCHAR2,

     link_id IN NUMBER,

     level IN NUMBER);

Description

Sets the hierarchy level of a link.

Parameters

net_mem

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

Link ID number.

level

Hierarchy level number.

Usage Notes

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.8.

This procedure is analogous to using the setLinkLevel method of the Link interface of the client-side Java API (described in Section 5.11.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.

Examples

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.13.4.)

SDO_NET_MEM.LINK.SET_LEVEL(net_mem, 1119, 2);

SDO_NET_MEM.LINK.SET_MEASURE

Format

SDO_NET_MEM.LINK.SET_MEASURE(

     net_mem IN VARCHAR2,

     link_id IN NUMBER,

     start_measure IN NUMBER,

     end_measure IN NUMBER);

Description

Sets the start and end measure values of a link in an LRS network.

Parameters

net_mem

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

Link ID number.

start_measure

Start measure value.

end_measure

End measure value.

Usage Notes

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.8.

This procedure is analogous to using the setMeasure method of the Link interface of the client-side Java API (described in Section 5.11.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.

Examples

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.13.3.)

SDO_NET_MEM.LINK.SET_MEASURE(net_mem, 302, 111, 114.16);

SDO_NET_MEM.LINK.SET_NAME

Format

SDO_NET_MEM.LINK.SET_NAME(

     net_mem IN VARCHAR2,

     link_id IN NUMBER,

     link_name IN VARCHAR2);

Description

Sets the name of a link.

Parameters

net_mem

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

Link ID number.

link_name

Link name string.

Usage Notes

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.8.

This procedure is analogous to using the setName method of the Link interface of the client-side Java API (described in Section 5.11.2).

To get the name of a link, use the SDO_NET_MEM.LINK.GET_NAME function.

Examples

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.13.4.)

SDO_NET_MEM.LINK.SET_NAME(net_mem, 1119, 'My favorite link');

SDO_NET_MEM.LINK.SET_PARENT_LINK

Format

SDO_NET_MEM.LINK.SET_PARENT_LINK(

     net_mem IN VARCHAR2,

     link_id IN NUMBER,

     parent_link_id IN NUMBER);

Description

Sets the parent link of a link.

Parameters

net_mem

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

Link ID number.

parent_link_id

Link ID number of the parent link.

Usage Notes

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.8.

This procedure is analogous to using the setParentLink method of the Link interface of the client-side Java API (described in Section 5.11.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.

Examples

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.13.4.)

SDO_NET_MEM.LINK.SET_PARENT_LINK(net_mem, 1119, 1001);

SDO_NET_MEM.LINK.SET_START_NODE

Format

SDO_NET_MEM.LINK.SET_START_NODE(

     net_mem IN VARCHAR2,

     link_id IN NUMBER,

     srart_node_id IN NUMBER);

Description

Sets the start node of a link.

Parameters

net_mem

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

Link ID number.

start_node_id

Node ID number.

Usage Notes

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.8.

This procedure is analogous to using the setStartNode method of the Link interface of the client-side Java API (described in Section 5.11.2).

To get the start node of a link, use the SDO_NET_MEM.LINK.GET_START_NODE_ID function.

Examples

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.13.4.)

SDO_NET_MEM.LINK.SET_START_NODE(net_mem, 1119, 110);

SDO_NET_MEM.LINK.SET_STATE

Format

SDO_NET_MEM.LINK.SET_STATE(

     net_mem IN VARCHAR2,

     link_id IN NUMBER,

     state IN VARCHAR2);

Description

Sets the state value of a link.

Parameters

net_mem

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

Link ID number.

state

State value. Must be one of the following strings: ACTIVE or INACTIVE.

Usage Notes

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.8.

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.11.2).

To get the link state, use the SDO_NET_MEM.LINK.GET_STATE function.

Examples

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.13.4.)

SDO_NET_MEM.LINK.SET_STATE(net_mem, 1119, 'INACTIVE');

SDO_NET_MEM.LINK.SET_TYPE

Format

SDO_NET_MEM.LINK.SET_TYPE(

     net_mem IN VARCHAR2,

     link_id IN NUMBER,

     type IN VARCHAR2);

Description

Sets the type of a link.

Parameters

net_mem

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

Link ID number.

type

String reflecting a user-determined type for the link.

Usage Notes

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.8.

This procedure is analogous to using the setType method of the Link interface of the client-side Java API (described in Section 5.11.2).

To get the type of a link, use the SDO_NET_MEM.LINK.GET_TYPE function.

Examples

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.13.3.)

SDO_NET_MEM.LINK.SET_TYPE(net_mem, 302, 'Normal street');

SDO_NET_MEM.NETWORK.ADD_LINK

Format

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);

Description

Adds a link to a network.

Parameters

net_mem

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

ID number of the link to be added.

link_name

Name of the link to be added.

start_node_id

Node ID of the start node of the link to be added.

end_node_id

Node ID of the end node of the link to be added.

cost

Cost value associated with the link.

geom_id

For an LRS geometry, the geometry ID of the geometry object.

start_measure

For an LRS geometry, the start measure value in the geometry object corresponding to the start node for this link.

end_measure

For an LRS geometry, the end measure value in the geometry object corresponding to the end node for this link.

geom

SDO_GEOMETRY object (line or contiguous line string geometry) representing the link to be added.

Usage Notes

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.8.

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.11.2).

Examples

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.8.)

-- 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

Format

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);

Description

Adds an LRS node (point geometry with measure information) to a network.

Parameters

net_mem

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

Node ID of the node to be added.

node_name

Name of the node to be added.

geom_id

Geometry ID of the geometry object.

measure

Measure value of the node to be added.

geom

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.

external_network_id

If the node is also a node in an external network, the network ID of the external network.

external_node_id

If the node is also a node in an external network, the node ID of the node in the external network.

Usage Notes

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.8.

An exception is raised if the specified network memory object is read-only.

Examples

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

Format

SDO_NET_MEM.NETWORK.ADD_NODE(

     net_mem IN VARCHAR2,

     node_id IN NUMBER,

     node_name IN VARCHAR2,

     geom IN SDO_GEOMETRY DEFAULT NULL

     external_network_id IN NUMBER,

     external_node_id IN NUMBER);

Description

Adds a node (with no associated geometry object) to a network.

Parameters

net_mem

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

Node ID of the node to be added.

node_name

Name of the node to be added.

geom

Geometry object associated with the node. If this parameter is null, no geometry object is associated with the node.

external_network_id

If the node is also a node in an external network, the network ID of the external network.

external_node_id

If the node is also a node in an external network, the node ID of the node in the external network.

Usage Notes

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.8.

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.11.2).

Examples

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.8.)

-- 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

Format

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);

Description

Adds one or more paths to a network.

Parameters

net_mem

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

Path ID of the path to be added.

path_ids

SDO_NUMBER_ARRAY object specifying the path IDs of the paths to be added.

Usage Notes

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.8.

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.11.2).

Examples

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.8.)

sdo_net_mem.network.add_path(net_mem=>'XYZ_NETWORK', path_id=>path_id);

SDO_NET_MEM.NETWORK.ADD_SDO_NODE

Format

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,

     srid IN NUMBER);

Description

Adds a node (with associated spatial coordinates) to a network.

Parameters

net_mem

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

Node ID of the node to be added.

node_name

Name of the node to be added.

x

X-axis coordinate value for the node to be added.

y

Y-axis coordinate value for the node to be added.

srid

Coordinate system (spatial reference system) associated with the node. Must match the SRID associated with the node table in the USER_SDO_GEOM_METADATA view.

Usage Notes

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.8.

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.11.2).

Examples

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, srid=>null);
-- 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

Format

SDO_NET_MEM.NETWORK.DELETE_LINK(

     net_mem IN VARCHAR2,

     link_id IN NUMBER);

Description

Deletes a link from a network.

Parameters

net_mem

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

Link ID of the link to be deleted.

Usage Notes

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.8.

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.11.2).

Examples

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

Format

SDO_NET_MEM.NETWORK.DELETE_NODE(

     net_mem IN VARCHAR2,

     node_id IN NUMBER);

Description

Deletes a node from a network.

Parameters

net_mem

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

Node ID of the node to be deleted.

Usage Notes

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.8.

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.11.2).

Examples

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

Format

SDO_NET_MEM.NETWORK.DELETE_PATH(

     net_mem IN VARCHAR2,

     path_id IN NUMBER);

Description

Deletes a path from a network.

Parameters

net_mem

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

Path ID of the path to be deleted.

Usage Notes

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.8.

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.11.2).

Examples

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.GET_MAX_LINK_ID

Format

SDO_NET_MEM.LINK.GET_MAX_LINK_ID(

     net_mem IN VARCHAR2,

     ) RETURN NUMBER;

Description

Returns the link ID with the highest numeric value.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

Usage Notes

This function returns the link ID with the highest numeric value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.8.

This function is analogous to using the getMaxLinkId method of the Link interface of the client-side Java API (described in Section 5.11.2).

Examples

The following example returns the link ID with the highest numeric value in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.13.4.)

SELECT SDO_NET_MEM.NETWORK.GET_MAX_LINK_ID(net_mem) 
  INTO res_numeric FROM DUAL;
DBMS_OUTPUT.PUT_LINE('Maximum link ID = ' || res_numeric);
. . .
Maximum link ID = 1119

SDO_NET_MEM.NETWORK.GET_MAX_NODE_ID

Format

SDO_NET_MEM.LINK.GET_MAX_NODE_ID(

     net_mem IN VARCHAR2,

     ) RETURN NUMBER;

Description

Returns the node ID with the highest numeric value.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

Usage Notes

This function returns the node ID with the highest numeric value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.8.

This function is analogous to using the getMaxNodeId method of the Link interface of the client-side Java API (described in Section 5.11.2).

Examples

The following example returns the node ID with the highest numeric value in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.13.4.)

SELECT SDO_NET_MEM.NETWORK.GET_MAX_NODE_ID(net_mem) 
  INTO res_numeric FROM DUAL;
DBMS_OUTPUT.PUT_LINE('Maximum node ID = ' || res_numeric);
. . .
Maximum node ID = 114

SDO_NET_MEM.NETWORK.GET_MAX_PATH_ID

Format

SDO_NET_MEM.LINK.GET_MAX_PATH_ID(

     net_mem IN VARCHAR2,

     ) RETURN NUMBER;

Description

Returns the path ID with the highest numeric value.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

Usage Notes

This function returns the path ID with the highest numeric value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.8.

This function is analogous to using the getMaxPathId method of the Link interface of the client-side Java API (described in Section 5.11.2).

Examples

The following example returns the path ID with the highest numeric value in the current network memory object. (This example is an excerpt from Example 5-5 in Section 5.13.4.)

SELECT SDO_NET_MEM.NETWORK.GET_MAX_PATH_ID(net_mem) 
  INTO res_numeric FROM DUAL;
DBMS_OUTPUT.PUT_LINE('Maximum path ID = ' || res_numeric);
. . .
Maximum path ID = 28

SDO_NET_MEM.NETWORK.GET_MAX_SUBPATH_ID

Format

SDO_NET_MEM.LINK.GET_MAX_SUBPATH_ID(

     net_mem IN VARCHAR2,

     ) RETURN NUMBER;

Description

Returns the subpath ID with the highest numeric value.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

Usage Notes

This function returns the subpath ID with the highest numeric value in the specified network memory object. For information about using a network memory object for editing and network analysis operations, see Section 5.8.

This function is analogous to using the getMaxSubpathId method of the Link interface of the client-side Java API (described in Section 5.11.2).

Examples

The following example returns the subpath ID with the highest numeric value in the current network memory object. In this case the network has no subpaths, and so the returned value is 0 (zero). (This example is an excerpt from Example 5-5 in Section 5.13.4.)

SELECT SDO_NET_MEM.NETWORK.GET_MAX_SUBPATH_ID(net_mem) 
  INTO res_numeric FROM DUAL;
DBMS_OUTPUT.PUT_LINE('Maximum subpath ID = ' || res_numeric);
. . .
Maximum subpath ID = 0

SDO_NET_MEM.NETWORK_MANAGER.ALL_PATHS

Format

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;

Description

Returns all paths between two nodes.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

start_node_id

Node ID of the start node in the pair of nodes between which to find paths.

goal_node_id

Node ID of the end (goal) node in the pair of nodes between which to find paths.

depth_limit

Maximum number of links in the resultant paths. If this parameter is null, no maximum number of links is applied.

cost_limit

Maximum cost total value of the links in a path. If this parameter is null, no cost limit is applied.

no_of_solutions

Maximum number of paths to be returned. If this parameter is null, all paths that meet the other criteria for this function are returned.

constraint

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.)

Usage Notes

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.8.

This function is analogous to using the allPaths method of the NetworkManager class of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

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 DEFAULT NULL,

     node_cost_column IN VARCHAR2 DEFAULT NULL,

     link_table_name IN VARCHAR2 DEFAULT NULL,

     link_cost_column IN VARCHAR2 DEFAULT NULL,

     path_table_name IN VARCHAR2 DEFAULT NULL,

     path_link_table_name IN VARCHAR2 DEFAULT NULL,

     sub_path_table_name IN VARCHAR2 DEFAULT NULL,

     is_complex IN VARCHAR2 DEFAULT 'FALSE');

Description

Creates a logical network, creates all necessary tables, and updates the network metadata.

Parameters

network_name

Name of the network.

no_of_hierarchy_levels

Number of hierarchy levels for links in the network. (For an explanation of network hierarchy, see Section 5.5.)

is_directed

A string value. TRUE indicates that the links are directed; FALSE indicates that the links are undirected (not directed).

node_table_name

Name of the node table to be created. (The node table is explained in Section 5.9.1.) If this parameter is null, the node table name will be in the form <network-name>_NODE$.

node_cost_column

Name of the cost column in the node table. (The node table is explained in Section 5.9.1.) If this parameter is null, the cost column name will be COST.

link_table_name

Name of the link table to be created. (The link table is explained in Section 5.9.2.) If this parameter is null, the link table name will be in the form <network-name>_LINK$.

link_cost_column

Name of the cost column in the link table. (The link table is explained in Section 5.9.2.) If this parameter is null, the cost column name will be COST.

path_table_name

Name of the path table to be created. (The path table is explained in Section 5.9.3.) If this parameter is null, the path table name will be in the form <network-name>_PATH$.

path_link_table_name

Name of the path-link table to be created. (The path-link table is explained in Section 5.9.4.) If this parameter is null, the path-link table name will be in the form <network-name>_PLINK$.

sub_path_table_name

Name of the subpath table to be created. (The subpath table is explained in Section 5.9.5.) If this parameter is null, the subpath table name will be in the form <network-name>_SPATH$.

is_complex

Reserved for future use. Ignored for the current release.

Usage Notes

This procedure creates a logical network in a network memory object, the use of which is explained in Section 5.8.

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 in memory. When you save the network objects to the database using the SDO_NET_MEM.NETWORK_MANAGER.WRITE_NETWORK procedure, the node, link, path, and path-link tables for the network are created, and the appropriate information is inserted in the xxx_SDO_NETWORK_METADATA views (described in Section 5.10.1).

Examples

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

Format

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 DEFAULT NULL,

     node_cost_column IN VARCHAR2 DEFAULT NULL,

     link_table_name IN VARCHAR2 DEFAULT NULL,

     link_cost_column IN VARCHAR2 DEFAULT NULL,

     lrs_table_name IN VARCHAR2,

     lrs_geom_column IN VARCHAR2,

     path_table_name IN VARCHAR2 DEFAULT NULL,

     path_geom_column IN VARCHAR2 DEFAULT NULL,

     path_link_table_name IN VARCHAR2 DEFAULT NULL,

     sub_path_table_name IN VARCHAR2 DEFAULT NULL,

     sub_path_geom_column IN VARCHAR2 DEFAULT NULL,

     is_complex IN VARCHAR2 DEFAULT 'FALSE');

Description

Creates a spatial network containing LRS SDO_GEOMETRY objects, creates all necessary tables, and updates the network metadata.

Parameters

network_name

Name of the network.

no_of_hierarchy_levels

Number of hierarchy levels for links in the network. (For an explanation of network hierarchy, see Section 5.5.)

is_directed

A string value. TRUE indicates that the links are directed; FALSE indicates that the links are undirected (not directed).

srid

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 Developer's Guide).

no_of_dims

Number of dimensions for the data, including the LRS measure dimension.

node_table_name

Name of the node table to be created. (The node table is explained in Section 5.9.1.) If this parameter is null, the node table name will be in the form <network-name>_NODE$.

node_cost_column

Name of the cost column in the node table. (The node table is explained in Section 5.9.1.) If this parameter is null, the cost column name will be COST.

link_table_name

Name of the link table to be created. (The link table is explained in Section 5.9.2.) If this parameter is null, the link table name will be in the form <network-name>_LINK$.

link_cost_column

Name of the cost column in the link table. (The link table is explained in Section 5.9.2.) If this parameter is null, the cost column name will be COST.

lrs_table_name

Name of the table to be created for the spatial LRS geometries

lrs_geom_column

Name of the column of type SDO_GEOMETRY in the table for the spatial LRS geometries.

path_table_name

Name of the path table to be created. (The path table is explained in Section 5.9.3.) If this parameter is null, the path table name will be in the form <network-name>_PATH$.

path_geom_column

Name of the column of type SDO_GEOMETRY in the path table. If this parameter is null, the geometry column name will be GEOMETRY.

path_link_table_name

Name of the path-link table to be created. (The path-link table is explained in Section 5.9.4.) If this parameter is null, the path-link table name will be in the form <network-name>_PLINK$.

sub_path_table_name

Name of the subpath table to be created. (The subpath table is explained in Section 5.9.5.) If this parameter is null, the subpath table name will be in the form <network-name>_SPATH$.

sub_path_geom_column

Name of the column of type SDO_GEOMETRY in the subpath table. If this parameter is null, the geometry column name will be GEOMETRY.

is_complex

Reserved for future use. Ignored for the current release.

Usage Notes

This procedure creates a spatial LRS network in a network memory object, the use of which is explained in Section 5.8.

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 in memory. When you save the network objects to the database using the SDO_NET_MEM.NETWORK_MANAGER.WRITE_NETWORK procedure, the node, link, path, and path-link tables for the network are created, and the appropriate information is inserted in the xxx_SDO_NETWORK_METADATA views (described in Section 5.10.1).

Examples

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

Format

SDO_NET_MEM.NETWORK_MANAGER.CREATE_REF_CONSTRAINTS(

     network IN VARCHAR2);

Description

Creates referential integrity constraints on the link and path tables.

Parameters

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.

Usage Notes

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.8.

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.11.2).

Examples

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

Format

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 DEFAULT NULL,

     node_geom_column IN VARCHAR2 DEFAULT NULL,

     node_cost_column IN VARCHAR DEFAULT NULL2,

     link_table_name IN VARCHAR2 DEFAULT NULL,

     link_geom_column IN VARCHAR2 DEFAULT NULL,

     link_cost_column IN VARCHAR2 DEFAULT NULL,

     path_table_name IN VARCHAR2 DEFAULT NULL,

     path_geom_column IN VARCHAR2 DEFAULT NULL,

     path_link_table_name IN VARCHAR2 DEFAULT NULL,

     sub_path_table_name IN VARCHAR2 DEFAULT NULL,

     sub_path_geom_column IN VARCHAR2 DEFAULT NULL,

     is_complex IN VARCHAR2 DEFAULT 'FALSE');

Description

Creates a spatial network containing non-LRS SDO_GEOMETRY objects, creates all necessary tables, and updates the network metadata.

Parameters

network_name

Name of the network.

no_of_hierarchy_levels

Number of hierarchy levels for links in the network. (For an explanation of network hierarchy, see Section 5.5.)

is_directed

A string value. TRUE indicates that the links are directed; FALSE indicates that the links are undirected (not directed).

srid

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 Developer's Guide).

no_of_dims

Number of dimensions for the spatial data.

node_table_name

Name of the node table to be created. (The node table is explained in Section 5.9.1.) If this parameter is null, the node table name will be in the form <network-name>_NODE$.

node_geom_column

Name of the column of type SDO_GEOMETRY in the node table. (The node table is explained in Section 5.9.1.) If this parameter is null, the geometry column name will be GEOMETRY.

node_cost_column

Name of the cost column in the node table. (The node table is explained in Section 5.9.1.) If this parameter is null, the cost column name will be COST.

link_table_name

Name of the link table to be created. (The link table is explained in Section 5.9.2.) If this parameter is null, the link table name will be in the form <network-name>_LINK$.

link_geom_column

Name of the column of type SDO_GEOMETRY in the link table. (The link table is explained in Section 5.9.2.) If this parameter is null, the geometry column name will be GEOMETRY.

link_cost_column

Name of the cost column in the link table. (The link table is explained in Section 5.9.2.) If this parameter is null, the cost column name will be COST.

path_table_name

Name of the path table to be created. (The path table is explained in Section 5.9.3.) If this parameter is null, the path table name will be in the form <network-name>_PATH$.

path_geom_column

Name of the column of type SDO_GEOMETRY in the path table. (The path table is explained in Section 5.9.3.) If this parameter is null, the geometry column name will be GEOMETRY.

path_link_table_name

Name of the path-link table to be created. (The path-link table is explained in Section 5.9.4.) If this parameter is null, the path-link table name will be in the form <network-name>_PLINK$.

sub_path_table_name

Name of the subpath table to be created. (The subpath table is explained in Section 5.9.5.) If this parameter is null, the subpath table name will be in the form <network-name>_SPATH$.

sub_path_geom_column

Name of the column of type SDO_GEOMETRY in the path table. (The path table is explained in Section 5.9.3.) If this parameter is null, the geometry column name will be GEOMETRY.

is_complex

Reserved for future use. Ignored for the current release.

Usage Notes

This procedure creates a spatial (SDO) network in a network memory object, the use of which is explained in Section 5.8.

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 in memory. When you save the network objects to the database using the SDO_NET_MEM.NETWORK_MANAGER.WRITE_NETWORK procedure, the node, link, path, and path-link tables for the network are created, and the appropriate information is inserted in the xxx_SDO_NETWORK_METADATA views (described in Section 5.10.1).

Examples

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.DEREGISTER_CONSTRAINT

Format

SDO_NET_MEM.NETWORK_MANAGER.DEREGISTER_CONSTRAINT(

     constraint_name IN VARCHAR2);

Description

Unloads (removes) the class for the specified network constraint from the Java repository in the database, and deletes the row for that constraint from the USER_SDO_NETWORK_CONSTRAINTS view (described in Section 5.10.2).

Note:

This procedure is deprecated, and it will not be supported in a future release. You are encouraged to use the SDO_NET.DEREGISTER_CONSTRAINT procedure instead.

Parameters

constraint_name

Name of the network constraint. Must match a value in the CONSTRAINT column of the USER_SDO_NETWORK_CONSTRAINTS view.

Usage Notes

Use this procedure if you want to disable a network constraint that you had previously enabled, such as by using the SDO_NET_MEM.NETWORK_MANAGER.REGISTER_CONSTRAINTprocedure. For more information about network constraints, see Section 5.6.

This procedure is analogous to using the deregisterConstraint method of the NetworkManager class of the client-side Java API (described in Section 5.11.2).

Examples

The following example deregisters (disables) a network constraint named GivenProhibitedTurn.

EXECUTE SDO_NET_MEM.NETWORK_MANAGER.DEREGISTER_CONSTRAINT('GivenProhibitedTurn');

SDO_NET_MEM.NETWORK_MANAGER.DISABLE_REF_CONSTRAINTS

Format

SDO_NET_MEM.NETWORK_MANAGER.DISABLE_REF_CONSTRAINTS(

     network IN VARCHAR2);

Description

Disables referential integrity constraints on the link and path tables.

Parameters

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.

Usage Notes

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.8.

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.11.2).

Examples

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

Format

SDO_NET_MEM.NETWORK_MANAGER.DROP_NETWORK(

     net_mem IN VARCHAR2);

Description

Drops (deletes) the network.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

Usage Notes

This procedure deletes the network in a network memory object, the use of which is explained in Section 5.8.

This procedure is analogous to using the dropNetwork method of the NetworkManager class of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.NETWORK_MANAGER.ENABLE_REF_CONSTRAINTS(

     network IN VARCHAR2);

Description

Enables referential integrity constraints on the link and path tables.

Parameters

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.

Usage Notes

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.8.

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.11.2).

Examples

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

Format

SDO_NET_MEM.NETWORK_MANAGER.FIND_CONNECTED_COMPONENTS(

     net_mem IN VARCHAR2

     ) RETURN NUMBER;

Description

Returns the number of groups of connected components.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

Usage Notes

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.8.

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.13.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.11.2).

Examples

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.13.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

Format

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;

Description

Returns the node ID numbers of nodes that can be reached by a path from a specified source node.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

source_node_id

Node ID of the source node.

constraint

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.)

Usage Notes

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.8.

If no results can be found that match the criteria, this function returns a null value.

This function is analogous to using the findReachableNodes method of the NetworkManager class of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NETWORK_MANAGER.FIND_REACHING_NODES(

     net_mem IN VARCHAR2,

     target_node_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns the node ID numbers of nodes that can reach (by a path) a specified target node.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

target_node_id

Node ID of the target node.

Usage Notes

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.8.

If no results can be found that match the criteria, this function returns a null value.

This function is analogous to using the findReaching_Nodes method of the NetworkManager class of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

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;

Description

Checks if a specified target node can be reached by a path from a specified source node.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

source_node_id

Node ID of the source node.

target_node_id

Node ID of the target node.

constraint

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.)

Usage Notes

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.8.

This function is analogous to using the isReachable method of the NetworkManager class of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NETWORK_MANAGER.LIST_NETWORKS() RETURN VARCHAR2;

Description

Returns a list of networks.

Parameters

None.

Usage Notes

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.8.

Examples

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.13.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

Format

SDO_NET_MEM.NETWORK_MANAGER.MCST_LINK(

     net_mem IN VARCHAR2

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns the minimum cost spanning tree.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

Usage Notes

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.8.

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.11.2).

Examples

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.13.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

Format

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;

Description

Returns the path ID numbers of paths leading to nodes that are the nearest neighbors (determined by total cost) of a specified start node.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

start_node_id

Node ID of the start node.

no_of_neighbors

Maximum number of path IDs to return.

constraint

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.)

Usage Notes

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.8.

If no results can be found that match the criteria, this function returns a null value.

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.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK(

     net_mem IN VARCHAR2,

     allow_updates IN VARCHAR2);

or

SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK(

     net_mem IN VARCHAR2,

     network IN VARCHAR2,

     xmin IN NUMBER,

     ymin IN NUMBER,

     xmax IN NUMBER,

     ymax IN NUMBER,

     allow_updates IN VARCHAR2);

Description

Creates a network memory object in virtual memory cache containing all network objects in a network (first format), or those objects completely inside a specified minimum bounding rectangle (MBR) (second format).

Parameters

net_mem

For the first format: name of the network, all of whose network objects (nodes, links, paths, subpaths) are to be copied into a network memory object that has the same name as the network. For the second format: user-specified name for the network memory object to contain only those network objects completely inside the MBR specified by the xmin, xmax, ymin, and ymax parameters for the network specified by the network parameter.

network

Name of the network from which to add network objects (nodes, links, paths) into the network memory object. Only those objects in the MBR specified by the xmin, xmax, ymin, and ymax parameters are loaded.

xmin

Minimum X coordinate value of the MBR from which objects in the specified network are to be added to the network memory object.

ymin

Minimum Y coordinate value of the MBR from which objects in the specified network are to be added to the network memory object.

xmax

Maximum X coordinate value of the MBR from which objects in the specified network are to be added to the network memory object.

ymax

Maximum Y coordinate value of the MBR from which objects in the specified network are to be added to the network memory object.

allow_updates

TRUE specifies that the network memory object is updatable; that is, you can perform editing operations in the cache and have them written back to the database. FALSE specifies that the network memory object is read-only; that is, you cannot perform editing operations in the cache and have them written back to the database.

Usage Notes

This procedure creates a network memory object, the use of which is explained in Section 5.8.

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.

If allow_updates is specified as TRUE, rows in the network tables (node, link, path, and path-link) are locked at the database level (through SELECT ... FOR UPDATE NOWAIT statements). This prevents update or delete operations on the locked elements in other SQL sessions; however, insert operations in other sessions are allowed.

This procedure is analogous to using the readNetwork method of the NetworkManager class of the client-side Java API (described in Section 5.11.2).

Examples

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');

The following example places a copy of all network objects inside a specified area of the network named HILLSBOROUGH_NETWORK into a read-only ('FALSE' for allow_updates) network memory object named HILLS_PART1. The objects loaded are in the rectangular area with one corner at longitude/latitude coordinates (-71.64, 43.32) and the other corner at coordinates (-71.32, 43.64). (On a traditional map, these would be the lower-left and upper-right corners, respectively.)

SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK('HILLS_PART1', 'HILLSBOROUGH_NETWORK', -71.64, 43.32, -71.32, 43.64, 'FALSE');

SDO_NET_MEM.NETWORK_MANAGER.REGISTER_CONSTRAINT

Format

SDO_NET_MEM.NETWORK_MANAGER.REGISTER_CONSTRAINT(

     constraint_name IN VARCHAR2,

     class_name IN VARCHAR2,

     directory_name IN VARCHAR2,

     description IN VARCHAR2);

Description

Loads the compiled Java code for the specified network constraint into the Java class repository in the database, and loads the class name into the CLASS column of the USER_SDO_NETWORK_CONSTRAINTS view (described in Section 5.10.2).

Note:

This procedure is deprecated, and it will not be supported in a future release. You are encouraged to use the SDO_NET.REGISTER_CONSTRAINT procedure instead.

Parameters

constraint_name

Name of the network constraint.

class_name

Fully qualified name (including the name of the package) of the class that implements the network constraint.

directory_name

Name of the directory object (created using the SQL statement CREATE DIRECTORY) that identifies the location of the class file created when you compiled the network constraint.

description

Description of the network constraint.

Usage Notes

Before you call this procedure, you must insert a row into the USER_SDO_NETWORK_CONSTRAINTS view, compile the code for the Java class that implements the network constraint, and use the CREATE DIRECTORY statement to create a directory object identifying the location of the compiled class. For more information about network constraints, see Section 5.6.

To delete the row for the constraint from the USER_SDO_NETWORK_CONSTRAINTS view and thus disable the constraint, use the SDO_NET_MEM.NETWORK_MANAGER.DEREGISTER_CONSTRAINT procedure.

This procedure is analogous to using the registerConstraint method of the NetworkManager class of the client-side Java API (described in Section 5.11.2).

Examples

The following example registers a network constraint named GivenProhibitedTurn.

-- Set up the network constraint.
REM
REM Create the geor_dir on the file system first.
REM
-- Connect as SYSTEM.
DECLARE 
  -- This is the directory that contains the CLASS file generated when you
  -- compiled the network constraint.
  geor_dir varchar2(1000) := 'C:\my_data\files81\PROTOTYPES\NETWORK_CONSTRAINT\PLSQL_EXAMPLE';
BEGIN 
  EXECUTE IMMEDIATE 'CREATE OR REPLACE DIRECTORY work_dir AS''' || geor_dir || ''''; 
END;
/
GRANT read,write on directory work_dir to net_con;
 
-- Connect as the user that will register the constraint. 
 
REM
REM Compile GivenProhibitedTurn before you register the constraint.
REM
BEGIN
  SDO_NET_MEM.NETWORK_MANAGER.REGISTER_CONSTRAINT('GivenProhibitedTurn', 
     'com/network/constraints/ProhibitedTurn',
     'WORK_DIR', 'This is a network constraint that '||
     'prohibits certain turns');
 
END;
/

SDO_NET_MEM.NETWORK_MANAGER.SHORTEST_PATH

Format

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;

Description

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.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

start_node_id

Node ID of the start node.

goal_node_id

Node ID of the goal (end) node.

constraint

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.)

Usage Notes

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.8.

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.11.2).

Examples

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.13.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

Format

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;

Description

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.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

start_node_id

Node ID of the start node.

goal_node_id

Node ID of the goal (end) node.

constraint

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.)

Usage Notes

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.8.

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.11.2).

Examples

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.13.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

Format

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;

Description

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.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

nd_array

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.

is_closed

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).

use_exact_cost

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.

constraint

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.)

Usage Notes

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.8.

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.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NETWORK_MANAGER.VALIDATE_NETWORK_SCHEMA(

     net_mem IN VARCHAR2

     ) RETURN VARCHAR2;

Description

Validates the network tables.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

Usage Notes

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.8.

This function is analogous to using the validateNetworkSchema method of the NetworkManager class of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

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;

Description

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.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

start_node_id

Node ID of the start node.

cost_limit

Maximum total path cost.

constraint

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.)

Usage Notes

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.8.

If no results can be found that match the criteria, this function returns a null value.

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.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NETWORK_MANAGER.WRITE_NETWORK(

     net_mem IN VARCHAR2);

Description

Saves to the database the network objects in a network memory object.

Parameters

net_mem

Name of the network whose current network memory object (created using the SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK procedure) is to be used.

Usage Notes

This procedure saves the network objects in a network memory object, the use of which is explained in Section 5.8.

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.11.2).

Examples

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

Format

SDO_NET_MEM.NODE.GET_ADJACENT_NODE_IDS(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns the node ID numbers of nodes that are adjacent to a specified node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getAdjacentNodeArray method of the Node interface of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_CHILD_NODE_IDS(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns the node ID numbers of nodes that are child nodes of a specified node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getChildNodeArray method of the Node interface of the client-side Java API (described in Section 5.11.2).

For information about parent and child nodes and links in a network hierarchy, see Section 5.5.

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_COMPONENT_NO(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the component number of a specified node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

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.11.2).

To set the component number for a node, use the SDO_NET_MEM.NODE.SET_COMPONENT_NO procedure.

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_COST(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the cost value of a specified node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getCost method of the Node interface of the client-side Java API (described in Section 5.11.2).

To set the cost value for a node, use the SDO_NET_MEM.NODE.SET_COST procedure.

Examples

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.13.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_GEOM_ID

Format

SDO_NET_MEM.NODE.GET_GEOM_ID(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the geometry ID number of a node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getGeomID method of the Node interface of the client-side Java API (described in Section 5.11.2).

To set the geometry ID value for a node, use the SDO_NET_MEM.NODE.SET_GEOM_ID procedure.

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_GEOMETRY(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN SDO_GEOMETRY;

Description

Returns the spatial geometry for a node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getGeometry method of the Node interface of the client-side Java API (described in Section 5.11.2).

To set the spatial geometry for a node, use the SDO_NET_MEM.NODE.SET_GEOMETRY procedure.

Examples

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.13.3.)

res_geom := SDO_NET_MEM.NODE.GET_GEOMETRY(net_mem, 3);

SDO_NET_MEM.NODE.GET_HIERARCHY_LEVEL

Format

SDO_NET_MEM.NODE.GET_HIERARCHY_LEVEL(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the hierarchy level of a node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getHierarchyLevel method of the Node interface of the client-side Java API (described in Section 5.11.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.

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_IN_LINK_IDS(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns the link ID numbers of links that are inbound links to a node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getInLinks method of the Node interface of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_INCIDENT_LINK_IDS(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns the link ID numbers of links that are to (that is, incident upon) a node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getIncidentLinks method of the Node interface of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_MEASURE(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the measure value of a node in an LRS network.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getMeasure method of the Node interface of the client-side Java API (described in Section 5.11.2).

To set the measure value for a node, use the SDO_NET_MEM.NODE.SET_MEASURE procedure.

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_NAME(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Returns the name of a node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getName method of the Node interface of the client-side Java API (described in Section 5.11.2).

To set the name of a node, use the SDO_NET_MEM.NODE.SET_NAME procedure.

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_OUT_LINK_IDS(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns the link ID numbers of links that are outbound links from a node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getOutLinks method of the Node interface of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_PARENT_NODE_ID(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the node ID number of the parent node of a node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getParentNode method of the Node interface of the client-side Java API (described in Section 5.11.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.

Examples

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.13.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_SIBLING_NODE_IDS

Format

SDO_NET_MEM.NODE.GET_SIBLING_NODE_IDS(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns the node ID numbers of nodes that are sibling nodes of a node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getSiblingNodeArray method of the Node interface of the client-side Java API (described in Section 5.11.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.

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_STATE(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Returns the state of a node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

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.11.2).

To set the state of a node, use the SDO_NET_MEM.NODE.SET_STATE procedure.

Examples

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.13.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

Format

SDO_NET_MEM.NODE.GET_TYPE(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Returns the type of a node.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the getType method of the Node interface of the client-side Java API (described in Section 5.11.2).

To set the type of a node, use the SDO_NET_MEM.NODE.SET_TYPE procedure.

Examples

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.13.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

Format

SDO_NET_MEM.NODE.IS_ACTIVE(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a node is active.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the isActive method of the Node interface of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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_LOGICAL

Format

SDO_NET_MEM.NODE.IS_LOGICAL(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a node is in a logical network.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This function is analogous to using the isLogical method of the Node interface of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NODE.IS_TEMPORARY(

     net_mem IN VARCHAR2,

     node_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a node is temporary.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

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.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NODE.LINK_EXISTS(

     net_mem IN VARCHAR2,

     node_id1 IN NUMBER,

     node_id2 IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a link exists between two nodes.

Parameters

net_mem

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_id1

Node ID number.

node_id2

Node ID number.

Usage Notes

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.8.

This function is analogous to using the linkExists method of the Node interface of the client-side Java API (described in Section 5.11.2).

Examples

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.13.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

Format

SDO_NET_MEM.NODE.MAKE_TEMPORARY(

     net_mem IN VARCHAR2,

     node_id IN NUMBER);

Description

Makes a node temporary.

Parameters

net_mem

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

Node ID number.

Usage Notes

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.8.

This procedure is analogous to using the makeTemporary method of the Node interface of the client-side Java API (described in Section 5.11.2).

To check if a node in a network memory object is temporary, use the SDO_NET_MEM.NODE.IS_TEMPORARY function.

Examples

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.13.4.)

SDO_NET_MEM.NODE.MAKE_TEMPORARY(net_mem, 114);

SDO_NET_MEM.NODE.SET_COMPONENT_NO

Format

SDO_NET_MEM.NODE.SET_COMPONENT_NO(

     net_mem IN VARCHAR2,

     node_id IN NUMBER,

     no IN NUMBER);

Description

Sets the component number of a node.

Parameters

net_mem

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

Node ID number.

no

Component number.

Usage Notes

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.8.

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.11.2).

To get the node component value for a node, use the SDO_NET_MEM.NODE.GET_COMPONENT_NO function.

Examples

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.13.4.)

SDO_NET_MEM.NODE.SET_COMPONENT_NO(net_mem, 114, 987);

SDO_NET_MEM.NODE.SET_COST

Format

SDO_NET_MEM.NODE.SET_COST(

     net_mem IN VARCHAR2,

     node_id IN NUMBER,

     cost IN NUMBER);

Description

Sets the cost value of a node.

Parameters

net_mem

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

Node ID number.

cost

Cost value.

Usage Notes

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.8.

This procedure is analogous to using the setCost method of the Node interface of the client-side Java API (described in Section 5.11.2).

To get the cost value for a node, use the SDO_NET_MEM.NODE.GET_COST function.

Examples

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.13.4.)

SDO_NET_MEM.NODE.SET_COST(net_mem, 114, 40);

SDO_NET_MEM.NODE.SET_GEOM_ID

Format

SDO_NET_MEM.NODE.SET_GEOM_ID(

     net_mem IN VARCHAR2,

     node_id IN NUMBER,

     geom_id IN NUMBER);

Description

Sets the geometry ID value of a node.

Parameters

net_mem

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

Node ID number.

geom

Geometry ID number.

Usage Notes

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.8.

This procedure is analogous to using the setGeomID method of the Node interface of the client-side Java API (described in Section 5.11.2).

To get the geometry ID value for a node, use the SDO_NET_MEM.NODE.GET_GEOM_ID function.

Examples

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.13.3.)

SDO_NET_MEM.NODE.SET_GEOM_ID(net_mem, 7, 99);

SDO_NET_MEM.NODE.SET_GEOMETRY

Format

SDO_NET_MEM.NODE.SET_GEOMETRY(

     net_mem IN VARCHAR2,

     node_id IN NUMBER,

     geom IN SDO_GEOMETRY);

Description

Sets the geometry for a node.

Parameters

net_mem

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

Node ID number.

geom

Spatial geometry object.

Usage Notes

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.8.

This procedure is analogous to using the setGeometry method of the Node interface of the client-side Java API (described in Section 5.11.2).

To get the geometry for a node, use the SDO_NET_MEM.NODE.GET_GEOMETRY function.

Examples

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

Format

SDO_NET_MEM.NODE.SET_HIERARCHY_LEVEL(

     net_mem IN VARCHAR2,

     node_id IN NUMBER,

     level IN NUMBER);

Description

Sets the hierarchy level of a node.

Parameters

net_mem

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

Node ID number.

level

Hierarchy level number.

Usage Notes

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.8.

This procedure is analogous to using the setHierarchyLevel method of the Node interface of the client-side Java API (described in Section 5.11.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.

Examples

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

Format

SDO_NET_MEM.NODE.SET_MEASURE(

     net_mem IN VARCHAR2,

     node_id IN NUMBER,

     measure IN NUMBER);

Description

Sets the measure value of a node in an LRS network.

Parameters

net_mem

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

Node ID number.

measure

Measure value.

Usage Notes

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.8.

This procedure is analogous to using the setMeasure method of the Node interface of the client-side Java API (described in Section 5.11.2).

To get the measure value of a node, use the SDO_NET_MEM.NODE.GET_MEASURE function.

Examples

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.13.3.)

SDO_NET_MEM.NODE.SET_MEASURE(net_mem, 7, 30);

SDO_NET_MEM.NODE.SET_NAME

Format

SDO_NET_MEM.NODE.SET_NAME(

     net_mem IN VARCHAR2,

     node_id IN NUMBER,

     node_name IN VARCHAR2);

Description

Sets the name of a node.

Parameters

net_mem

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

Node ID number.

node_name

Node name.

Usage Notes

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.8.

This procedure is analogous to using the setName method of the Node interface of the client-side Java API (described in Section 5.11.2).

To get the name of a node, use the SDO_NET_MEM.NODE.GET_NAME function.

Examples

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.13.4.)

SDO_NET_MEM.NODE.SET_NAME(net_mem, 114, 'My favorite node');

SDO_NET_MEM.NODE.SET_PARENT_NODE

Format

SDO_NET_MEM.NODE.SET_PARENT_NODE(

     net_mem IN VARCHAR2,

     node_id IN NUMBER,

     parent_node_id IN NUMBER);

Description

Sets the parent node of a node.

Parameters

net_mem

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

Node ID number.

parent_node_id

Parent node ID number.

Usage Notes

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.8.

This procedure is analogous to using the setParentNode method of the Node interface of the client-side Java API (described in Section 5.11.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.

Examples

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.13.4.)

SDO_NET_MEM.NODE.SET_PARENT_NODE(net_mem, 114, 1);

SDO_NET_MEM.NODE.SET_STATE

Format

SDO_NET_MEM.NODE.SET_STATE(

     net_mem IN VARCHAR2,

     node_id IN NUMBER,

     state IN VARCHAR2);

Description

Sets the state of a node.

Parameters

net_mem

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

Node ID number.

state

Node state. Must be one of the following string values: ACTIVE or INACTIVE.

Usage Notes

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.8.

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.11.2).

To get the node state, use the SDO_NET_MEM.NODE.GET_STATE function.

Examples

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.13.4.)

SDO_NET_MEM.NODE.SET_STATE(net_mem, 111, 'INACTIVE');

SDO_NET_MEM.NODE.SET_TYPE

Format

SDO_NET_MEM.NODE.SET_TYPE(

     net_mem IN VARCHAR2,

     node_id IN NUMBER,

     type IN VARCHAR2);

Description

Sets the type of a node.

Parameters

net_mem

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

Node ID number.

type

Node type.

Usage Notes

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.8.

This procedure is analogous to using the setType method of the Node interface of the client-side Java API (described in Section 5.11.2).

To get the type value for a node, use the SDO_NET_MEM.NODE.GET_TYPE function.

Examples

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.13.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

Format

SDO_NET_MEM.PATH.COMPUTE_GEOMETRY(

     net_mem IN VARCHAR2,

     path_id IN NUMBER,

     tolerance IN NUMBER);

Description

Sets the spatial geometry for a path.

Parameters

net_mem

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

Path ID number.

tolerance

Tolerance value associated with geometries in the network. (Tolerance is explained in Chapter 1 of Oracle Spatial Developer's Guide.) This value should be consistent with the tolerance values of the geometries in the link table and node table for the network.

Usage Notes

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.8.

This procedure is analogous to using the computeGeometry method of the Path interface of the client-side Java API (described in Section 5.11.2).

To get the computed geometry, use the SDO_NET_MEM.PATH.GET_GEOMETRY function.

Examples

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

Format

SDO_NET_MEM.PATH.GET_COST(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the cost value of a path.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the getCost method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.GET_END_NODE_ID(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the node ID value of the end node of a path.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the getEndNodeID method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.GET_GEOMETRY(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN SDO_GEOMETRY;

Description

Returns the spatial geometry of a path.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

If you have not previously computed the geometry using the SDO_NET_MEM.PATH.COMPUTE_GEOMETRY procedure, the GET_GEOMETRY function returns a null result. To return the actual geometry, you must first call the SDO_NET_MEM.PATH.COMPUTE_GEOMETRY procedure.

This function is analogous to using the getPath method of the Path interface of the client-side Java API (described in Section 5.11.2).

To set the geometry ID value for a path, use the SDO_NET_MEM.PATH.SET_GEOMETRY procedure.

Examples

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

Format

SDO_NET_MEM.PATH.GET_LINK_IDS(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns an array of link ID values of the links in a path.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the getLinks method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.GET_NAME(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Returns the name of a path.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the getName method of the Path interface of the client-side Java API (described in Section 5.11.2).

To set the name for a path, use the SDO_NET_MEM.PATH.SET_NAME procedure.

Examples

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

Format

SDO_NET_MEM.PATH.GET_NO_OF_LINKS(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the number of links in a path.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the getNoOfLinks method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.GET_NODE_IDS(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN SDO_NUMBER_ARRAY;

Description

Returns an array of node ID values of the nodes in a path.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the getNodes method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.GET_START_NODE_ID(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN NUMBER;

Description

Returns the node ID value of the start node of a path.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the getStartNode method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.GET_TYPE(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Returns the type of a path.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the getType method of the Path interface of the client-side Java API (described in Section 5.11.2).

To set the type for a path, use the SDO_NET_MEM.PATH.SET_TYPE procedure.

Examples

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

Format

SDO_NET_MEM.PATH.IS_ACTIVE(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a path is active.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the isActive method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.IS_CLOSED(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a path is closed.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the isClosed method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.IS_CONNECTED(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a path is connected.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the isConnected method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.IS_LOGICAL(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a path is in a logical network.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the isLogical method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.IS_SIMPLE(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a path is simple.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

This function is analogous to using the isSimple method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.IS_TEMPORARY(

     net_mem IN VARCHAR2,

     path_id IN NUMBER

     ) RETURN VARCHAR2;

Description

Checks if a path is temporary.

Parameters

net_mem

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

Path ID number.

Usage Notes

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.8.

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.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.SET_GEOMETRY(

     net_mem IN VARCHAR2,

     path_id IN NUMBER,

     geom IN SDO_GEOMETRY);

Description

Sets the spatial geometry for a path.

Parameters

net_mem

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

Path ID number.

geom

Spatial geometry object.

Usage Notes

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.8.

This procedure is analogous to using the setGeometry method of the Path interface of the client-side Java API (described in Section 5.11.2).

To get the geometry for a path, use the SDO_NET_MEM.PATH.GET_GEOMETRY function.

Examples

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

Format

SDO_NET_MEM.PATH.SET_NAME(

     net_mem IN VARCHAR2,

     path_id IN NUMBER,

     path_name IN VARCHAR2);

Description

Sets the name of a path.

Parameters

net_mem

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

Path ID number.

path_name

Path name.

Usage Notes

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.8.

This procedure is analogous to using the setName method of the Path interface of the client-side Java API (described in Section 5.11.2).

To get the name of a path, use the SDO_NET_MEM.PATH.GET_NAME function.

Examples

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

Format

SDO_NET_MEM.PATH.SET_PATH_ID(

     net_mem IN VARCHAR2,

     path_id IN NUMBER,

     new_path_id IN NUMBER);

Description

Sets the path ID value of a path.

Parameters

net_mem

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

Path ID number.

new_path_id

New path ID number.

Usage Notes

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.8.

This procedure is analogous to using the setPathID method of the Path interface of the client-side Java API (described in Section 5.11.2).

Examples

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

Format

SDO_NET_MEM.PATH.SET_TYPE(

     net_mem IN VARCHAR2,

     path_id IN NUMBER,

     type IN VARCHAR2);

Description

Sets the type of a path.

Parameters

net_mem

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

Path ID number.

type

Path type.

Usage Notes

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.8.

This procedure is analogous to using the setType method of the Path interface of the client-side Java API (described in Section 5.11.2).

To get the type value for a path, use the SDO_NET_MEM.PATH.GET_TYPE function.

Examples

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');