Skip to content

v.net.connectivity

Computes vertex connectivity between two sets of nodes in the network.

v.net.connectivity input=name [arc_layer=string] [node_layer=string] [arc_column=name] [arc_backward_column=name] output=name [node_column=name] [set1_cats=range] [set1_where=sql_query] [set2_cats=range] [set2_where=sql_query] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

v.net.connectivity input=name output=name

grass.script.run_command("v.net.connectivity", input, arc_layer="1", node_layer="2", arc_column=None, arc_backward_column=None, output, node_column=None, set1_cats=None, set1_where=None, set2_cats=None, set2_where=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("v.net.connectivity", input="name", output="name")

Parameters

input=name [required]
    Name of input vector map
    Or data source for direct OGR access
arc_layer=string
    Arc layer
    Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
    Default: 1
node_layer=string
    Node layer
    Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
    Default: 2
arc_column=name
    Arc forward/both direction(s) cost column (number)
arc_backward_column=name
    Arc backward direction cost column (number)
output=name [required]
    Name for output vector map
node_column=name
    Node cost column (number)
set1_cats=range
    Set1 category values
    Example: 1,3,7-9,13
set1_where=sql_query
    Set1 WHERE conditions of SQL statement without 'where' keyword
    Example: income < 1000 and population >= 10000
set2_cats=range
    Category values
    Set2 category values
set2_where=sql_query
    Set2 WHERE conditions of SQL statement without 'where' keyword
    Example: income < 1000 and population >= 10000
--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

input : str, required
    Name of input vector map
    Or data source for direct OGR access
    Used as: input, vector, name
arc_layer : str, optional
    Arc layer
    Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
    Used as: input, layer
    Default: 1
node_layer : str, optional
    Node layer
    Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
    Used as: input, layer
    Default: 2
arc_column : str, optional
    Arc forward/both direction(s) cost column (number)
    Used as: input, dbcolumn, name
arc_backward_column : str, optional
    Arc backward direction cost column (number)
    Used as: input, dbcolumn, name
output : str, required
    Name for output vector map
    Used as: output, vector, name
node_column : str, optional
    Node cost column (number)
    Used as: input, dbcolumn, name
set1_cats : str, optional
    Set1 category values
    Example: 1,3,7-9,13
    Used as: input, cats, range
set1_where : str, optional
    Set1 WHERE conditions of SQL statement without 'where' keyword
    Example: income < 1000 and population >= 10000
    Used as: input, sql_query, sql_query
set2_cats : str, optional
    Category values
    Set2 category values
    Used as: input, cats, range
set2_where : str, optional
    Set2 WHERE conditions of SQL statement without 'where' keyword
    Example: income < 1000 and population >= 10000
    Used as: input, sql_query, sql_query
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

v.net.connectivity computes vertex connectivity between two sets, i.e. the minimum number of vertices whose removal would separate two given sets.

NOTES

Two sets (set1 and set2) are specified by respective layer, where and cats parameters. Similarly to v.net.flow module, capacities of nodes can be given by node_column option. v.net.connectivity finds the set of nodes of minimum total capacitiy separating the two given sets and outputs map containing points on the positions of these nodes. Default capacity, which is used when no column is specified, is one.

EXAMPLE

The following command finds the minimum number of intersections separating roads on the left bank from roads on the right bank.

v.net.connectivity input=roads output=roads_conn set1_where="bank=left" \
      set2_where="bank=right"
v.net.connectivity input=airtraffic output=connectivity \
      set1_where="name=JFK" set2_where="name=Heathrow" node_column=capacity

SEE ALSO

v.net, v.net.flow, v.net.bridge

AUTHORS

Daniel Bundala, Google Summer of Code 2009, Student
Wolf Bergenheim, Mentor

SOURCE CODE

Available at: v.net.connectivity source code (history)
Latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f