3
<em>v.net.iso</em> splits a network into bands between cost isolines
4
(distance from center). Center nodes must be opened (costs >= 0). The
5
costs of center nodes are used in the calculation.
6
<p>Costs may be either line lengths, or attributes saved in a database
7
table. These attribute values are taken as costs of whole segments, not
8
as costs to traverse a length unit (e.g. meter) of the segment.
9
For example, if the speed limit is 100 km / h, the cost to traverse a
10
10 km long road segment must be calculated as
12
length / speed = 10 km / (100 km/h) = 0.1 h.
14
Supported are cost assignments for both arcs and nodes,
15
and also different costs for both directions of a vector line.
16
For areas, costs will be calculated along boundary lines.
18
The input vector needs to be prepared with <em>v.net operation=connect</em>
19
in order to connect points representing center nodes to the network.
23
Nodes and arcs can be closed using cost = -1.
25
Nodes must be on the isolines.
29
The map must contain at least one center (point) on the vector network
30
which can be patched into with <a href="v.net.html">v.net</a>.
33
Isonetwork using distance:
35
<img src="vnetiso.png" alt="v.net.iso example with distance" border="1">
38
Isonetwork using time:
40
<img src="vnetisotime.png" alt="v.net.iso example with traveling time" border="1">
42
<h4>Subdivision of a network using distance:</h4>
44
<div class="code"><pre>
48
echo "591280.5|4926396.0|1" | v.in.ascii in=- out=startnode
49
g.copy vect=roads,myroads
51
# connect point to network
52
v.net myroads points=startnode out=myroads_net op=connect thresh=200
54
# define iso networks using distance:
55
v.net.iso input=myroads_net output=myroads_net_iso center_cats=1-100000 costs=1000,2000,5000
58
The network is divided into 4 categories:
60
<div class="code"><pre>
61
v.category myroads_net_iso option=report
62
# ... reports 4 categories:
63
#cat | distance from point in meters
70
To display the result, run for example:
72
<div class="code"><pre>
73
g.region n=4928200 s=4922300 w=589200 e=596500
75
d.vect myroads_net_iso col=blue cats=1
76
d.vect myroads_net_iso col=green cats=2
77
d.vect myroads_net_iso col=orange cats=3
78
d.vect myroads_net_iso col=magenta cats=4
79
d.vect myroads_net col=red icon=basic/triangle fcol=green size=12 layer=2
82
<h4>Subdivision of a network using traveling time:</h4>
84
Prepare the network as above:
85
<div class="code"><pre>
89
echo "591280.5|4926396.0|1" | v.in.ascii in=- out=startnode
90
g.copy vect=roads,myroads
92
# connect point to network
93
v.net myroads points=startnode out=myroads_net op=connect thresh=200
96
Define costs as traveling time dependent on speed limits:
97
<div class="code"><pre>
100
# create unique categories for each road in layer 3
101
v.category in=myroads_net out=myroads_net_time opt=add cat=1 layer=3 type=line
103
# add new table for layer 3
104
v.db.addtable myroads_net_time layer=3 col="cat integer,label varchar(43),length double precision,speed double precision,cost double precision,bcost double precision"
106
# copy road type to layer 3
107
v.to.db myroads_net_time layer=3 qlayer=1 opt=query qcolumn=label columns=label
109
# upload road length in miles
110
v.to.db myroads_net_time layer=3 type=line option=length col=length unit=miles
112
# set speed limits in miles / hour
113
v.db.update myroads_net_time layer=3 col=speed val="5.0"
114
v.db.update myroads_net_time layer=3 col=speed val="75.0" where="label='interstate'"
115
v.db.update myroads_net_time layer=3 col=speed val="75.0" where="label='primary highway, hard surface'"
116
v.db.update myroads_net_time layer=3 col=speed val="50.0" where="label='secondary highway, hard surface'"
117
v.db.update myroads_net_time layer=3 col=speed val="25.0" where="label='light-duty road, improved surface'"
118
v.db.update myroads_net_time layer=3 col=speed val="5.0" where="label='unimproved road'"
120
# define traveling costs as traveling time in minutes:
123
v.db.update myroads_net_time layer=3 col=cost val="length / speed * 60"
125
v.db.update myroads_net_time layer=3 col=bcost val="length / speed * 60"
127
# define iso networks using traveling time:
128
v.net.iso input=myroads_net_time output=myroads_net_iso_time arc_layer=3 node_layer=2 arc_column=cost arc_backward_column=bcost center_cats=1-100000 costs=1,2,5
131
To display the result, run for example:
133
<div class="code"><pre>
134
# add table with labels and coloring
135
v.db.addtable myroads_net_iso_time columns="cat integer,trav_time varchar(20),GRASSRGB varchar(11)"
137
v.db.update map=myroads_net_iso_time layer=1 column=trav_time value="0 - 1" where="cat = 1"
138
v.db.update map=myroads_net_iso_time layer=1 column=trav_time value="1 - 2" where="cat = 2"
139
v.db.update map=myroads_net_iso_time layer=1 column=trav_time value="2 - 5" where="cat = 3"
140
v.db.update map=myroads_net_iso_time layer=1 column=trav_time value="> 5" where="cat = 4"
143
v.db.update map=myroads_net_iso_time layer=1 column=GRASSRGB value="000:000:255" where="cat = 1"
145
v.db.update map=myroads_net_iso_time layer=1 column=GRASSRGB value="000:255:000" where="cat = 2"
147
v.db.update map=myroads_net_iso_time layer=1 column=GRASSRGB value="255:128:000" where="cat = 3"
149
v.db.update map=myroads_net_iso_time layer=1 column=GRASSRGB value="255:000:255" where="cat = 4"
152
g.region n=4928200 s=4922300 w=589200 e=596500
154
d.vect myroads_net_iso_time layer=1 -a rgb_col=GRASSRGB
155
d.vect myroads_net col=red icon=basic/triangle fcol=green size=12 layer=2
161
<a href="d.path.html">d.path</a>,
162
<a href="v.net.html">v.net</a>,
163
<a href="v.net.alloc.html">v.net.alloc</a>,
164
<a href="v.net.path.html">v.net.path</a>,
165
<a href="v.net.salesman.html">v.net.salesman</a>,
166
<a href="v.net.steiner.html">v.net.steiner</a>,
167
<a href="v.patch.html">v.patch</a>
172
Radim Blazek, ITC-Irst, Trento, Italy<br>
173
Documentation: Markus Neteler, Markus Metz
175
<p><i>Last changed: $Date: 2014-12-24 15:44:33 +0100 (Wed, 24 Dec 2014) $</i>