6.99 SDO_NET.SPATIAL_PARTITION

Format

SDO_NET.SPATIAL_PARTITION(      
  network              IN VARCHAR2,      
  partition_table_name IN VARCHAR2,      
  max_num_nodes        IN NUMBER,      
  log_loc              IN VARCHAR2,      
  log_file             IN VARCHAR2,      
  open_mode            IN VARCHAR2 DEFAULT 'A',      
  link_level           IN NUMBER DEFAULT 1);

Description

Partitions a spatial network, and stores the information in the partition table.

Parameters

network

Network name.

partition_table_name

Name of the partition table, which is created by this procedure. (If an existing table with the specified name already exists, it is updated with partition information for the specified link level.) The partition table is described in Partition Table.

max_num_nodes

Maximum number of nodes to include in each partition. For example, if you specify 5000 and if the network contains 50,000 nodes, each partition will have 5000 or fewer nodes, and the total number of partitions will be 10 or higher.

log_loc

Directory object that identifies the path for the log file. To create a directory object, use the SQL*Plus command CREATE DIRECTORY.

log_file

Log file containing information about spatial network operations, including any possible errors or problems.

open_mode

A one-character code indicating the mode in which to open the log file: W for write over (that is, delete any existing log file at the specified location and name, and create a new file), or A (the default) for append (that is, append information to the existing specified log file). If you specify A and the log file does not exist, a new log file is created.

link_level

Network link level on which to perform the partitioning (default = 1). The link level reflects the priority level for the link, and is used for network analysis, so that links with higher priority levels can be considered first in network computations.

Usage Notes

After you use this procedure to create the partitions, consider using the SDO_NET.GENERATE_PARTITION_BLOBS procedure, to enable better performance for many network analysis operations, especially with large networks.

Examples

The following example creates partitions for link level 1 in the MY_PARTITIONED_NET network, and creates the MY_PARTITIONED_NET_TAB table. The maximum number of nodes to be placed in any partition is 5000. Information about the operation is added (open_mode => 'a') to the my_partitioned_net.log file, located in the location associated with the directory object named LOG_DIR.

EXECUTE SDO_NET.SPATIAL_PARTITION(network => 'MY_PARTITIONED_NET', -
  partition_table_name => 'my_partitioned_net_tab',-
  max_num_nodes => 5000,-
  log_loc => 'LOG_DIR', log_file=> 'my_partitioned_net.log',-
  link_level => 1, open_mode => 'a');