.TH v.net.allpairs 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBv.net.allpairs\fR\fR - Computes the shortest path between all pairs of nodes in the network. .SH KEYWORDS vector, network, shortest path .SH SYNOPSIS \fBv.net.allpairs\fR .br \fBv.net.allpairs help\fR .br \fBv.net.allpairs\fR [\-\fBga\fR] \fBinput\fR=\fIname\fR \fBoutput\fR=\fIname\fR [\fBlayer\fR=\fIinteger\fR] [\fBcats\fR=\fIrange\fR] [\fBwhere\fR=\fIsql_query\fR] [\fBafcolumn\fR=\fIname\fR] [\fBabcolumn\fR=\fIname\fR] [\-\-\fBoverwrite\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Flags: .IP "\fB\-g\fR" 4m .br Use geodesic calculation for longitude-latitude locations .IP "\fB\-a\fR" 4m .br Add points on nodes without points .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .PP .SS Parameters: .IP "\fBinput\fR=\fIname\fR" 4m .br Name of input vector map .IP "\fBoutput\fR=\fIname\fR" 4m .br Name for output vector map .IP "\fBlayer\fR=\fIinteger\fR" 4m .br Layer number .br A single vector map can be connected to multiple database tables. This number determines which table to use. .br Default: \fI1\fR .IP "\fBcats\fR=\fIrange\fR" 4m .br Category values .br Example: 1,3,7-9,13 .IP "\fBwhere\fR=\fIsql_query\fR" 4m .br WHERE conditions of SQL statement without 'where' keyword .br Example: income = 10000 .IP "\fBafcolumn\fR=\fIname\fR" 4m .br Name of arc forward/both direction(s) cost column .IP "\fBabcolumn\fR=\fIname\fR" 4m .br Name of arc backward direction cost column .PP .SH DESCRIPTION \fIv.net.allpairs\fR computes the shortest path between each selected node and all other selected nodes. An attribute table is created and linked to layer 1 of the output map. The table contains three columns: \fIcat\fR, \fIto_cat\fR, \fIcost\fR. Each entry denotes the cost of the shortest path from \fIcat\fR to \fIto_cat\fR. If the cost is negative then no path exists. If points are specified by \fBcats, layer\fR or \fBwhere\fR parameters then the table is filled only for the selected points. .PP If \fBabcolumn\fR is not given then then the same costs are used for forward and backward arcs. .PP Contrary to other v.net.* modules, \fIv.net.allpairs\fR does not allow to use arcs and nodes from separate layers. This means that you have to put both types of features into the same layer, but with distinct category numbers in order to allow accessing specific nodes only. See the example below. .SH NOTES If the \fB-a\fR flag is set then new points are added on nodes without nodes. These points have the largest category. Precisely, the category value of each new point is larger than any of the old categories. Note that these new points are not included in the output table. .br .SH EXAMPLE Find shortest path along roads between schools (North Carolina sample dataset): \fC .DS .br #check cat values in arcs layer (streets_wake here): .br v.category streets_wake op=report .br .br #take the existing cat values of the points in schools_wake and add .br 50000 (because the cat values in streets_wake go up to just under 50000) .br v.category schools_wake out=schools op=sum cat=50000 .br .br #now link the nodes with their new categories to the arcs, with node category values in layer 1 .br v.net streets_wake points=schools op=connect thresh=200 out=network .br nlayer=1 .br .br #then launch your analysis indicating the cat values of the points which you want to use .br v.net.allpairs network cats=50000-50167 out=allpairs .br .br #get distance matrix .br v.db.select allpairs .br .DE \fR .SH SEE ALSO \fI v.net.path, v.net.distance \fR .SH AUTHORS Daniel Bundala, Google Summer of Code 2009, Student .br Wolf Bergenheim, Mentor .br Markus Metz .PP \fILast changed: $Date: 2012-10-24 10:13:53 +0200 (Wed, 24 Oct 2012) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team