~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to vector/v.net.iso/v.net.iso.html

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<h2>DESCRIPTION</h2>
 
2
 
 
3
<em>v.net.iso</em> splits a network into bands between cost isolines 
 
4
(distance from center). Center nodes must be opened (costs &gt;= 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 
 
11
<br>
 
12
length / speed = 10 km / (100 km/h) = 0.1 h.
 
13
<br>
 
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.
 
17
<p>
 
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.
 
20
 
 
21
<h2>NOTES</h2>
 
22
 
 
23
Nodes and arcs can be closed using cost = -1. 
 
24
<p>
 
25
Nodes must be on the isolines.
 
26
 
 
27
<h2>EXAMPLES</h2>
 
28
 
 
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>.
 
31
 
 
32
<p>
 
33
Isonetwork using distance:
 
34
<p>
 
35
<img src="vnetiso.png" alt="v.net.iso example with distance" border="1">
 
36
 
 
37
<p>
 
38
Isonetwork using time:
 
39
<p>
 
40
<img src="vnetisotime.png" alt="v.net.iso example with traveling time" border="1">
 
41
 
 
42
<h4>Subdivision of a network using distance:</h4>
 
43
 
 
44
<div class="code"><pre>
 
45
# Spearfish
 
46
 
 
47
# start node:
 
48
echo "591280.5|4926396.0|1" | v.in.ascii in=- out=startnode
 
49
g.copy vect=roads,myroads
 
50
 
 
51
# connect point to network
 
52
v.net myroads points=startnode out=myroads_net op=connect thresh=200
 
53
 
 
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
 
56
</pre></div>
 
57
 
 
58
The network is divided into 4 categories:
 
59
 
 
60
<div class="code"><pre>
 
61
v.category myroads_net_iso option=report
 
62
# ... reports 4 categories:
 
63
#cat | distance from point in meters
 
64
#1          0 - &lt; 1000
 
65
#2       1000 - &lt; 2000
 
66
#3       2000 - &lt; 5000
 
67
#4             >= 5000
 
68
</pre></div>
 
69
 
 
70
To display the result, run for example:
 
71
 
 
72
<div class="code"><pre>
 
73
g.region n=4928200 s=4922300 w=589200 e=596500
 
74
d.mon x0
 
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
 
80
</pre></div>
 
81
 
 
82
<h4>Subdivision of a network using traveling time:</h4>
 
83
 
 
84
Prepare the network as above:
 
85
<div class="code"><pre>
 
86
# Spearfish
 
87
 
 
88
# start node:
 
89
echo "591280.5|4926396.0|1" | v.in.ascii in=- out=startnode
 
90
g.copy vect=roads,myroads
 
91
 
 
92
# connect point to network
 
93
v.net myroads points=startnode out=myroads_net op=connect thresh=200
 
94
</pre></div>
 
95
 
 
96
Define costs as traveling time dependent on speed limits:
 
97
<div class="code"><pre>
 
98
# set up costs
 
99
 
 
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
 
102
 
 
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"
 
105
 
 
106
# copy road type to layer 3
 
107
v.to.db myroads_net_time layer=3 qlayer=1 opt=query qcolumn=label columns=label
 
108
 
 
109
# upload road length in miles
 
110
v.to.db myroads_net_time layer=3 type=line option=length col=length unit=miles
 
111
 
 
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'"
 
119
 
 
120
# define traveling costs as traveling time in minutes:
 
121
 
 
122
# set forward costs
 
123
v.db.update myroads_net_time layer=3 col=cost val="length / speed * 60"
 
124
# set backward costs
 
125
v.db.update myroads_net_time layer=3 col=bcost val="length / speed * 60"
 
126
 
 
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
 
129
</pre></div>
 
130
 
 
131
To display the result, run for example:
 
132
 
 
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)"
 
136
# labels
 
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"
 
141
# colors
 
142
# cats=1: blue
 
143
v.db.update map=myroads_net_iso_time layer=1 column=GRASSRGB value="000:000:255" where="cat = 1"
 
144
# cats=2: green
 
145
v.db.update map=myroads_net_iso_time layer=1 column=GRASSRGB value="000:255:000" where="cat = 2"
 
146
# cats=3: orange
 
147
v.db.update map=myroads_net_iso_time layer=1 column=GRASSRGB value="255:128:000" where="cat = 3"
 
148
# cats=4: magenta
 
149
v.db.update map=myroads_net_iso_time layer=1 column=GRASSRGB value="255:000:255" where="cat = 4"
 
150
 
 
151
# show results
 
152
g.region n=4928200 s=4922300 w=589200 e=596500
 
153
d.mon x0
 
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
 
156
</pre></div>
 
157
 
 
158
<h2>SEE ALSO</h2>
 
159
 
 
160
<em>
 
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>
 
168
</em>
 
169
 
 
170
<h2>AUTHOR</h2>
 
171
 
 
172
Radim Blazek, ITC-Irst, Trento, Italy<br>
 
173
Documentation: Markus Neteler, Markus Metz
 
174
 
 
175
<p><i>Last changed: $Date: 2014-12-24 15:44:33 +0100 (Wed, 24 Dec 2014) $</i>