1v.net.visibility(1)           Grass User's Manual          v.net.visibility(1)
2
3
4

NAME

6       v.net.visibility  - Performs visibility graph construction.
7

KEYWORDS

9       vector, network, shortest path, visibility
10

SYNOPSIS

12       v.net.visibility
13       v.net.visibility --help
14       v.net.visibility   input=name   output=name    [coordinates=east,north]
15       [visibility=name]    [--overwrite]   [--help]   [--verbose]   [--quiet]
16       [--ui]
17
18   Flags:
19       --overwrite
20           Allow output files to overwrite existing files
21
22       --help
23           Print usage summary
24
25       --verbose
26           Verbose module output
27
28       --quiet
29           Quiet module output
30
31       --ui
32           Force launching GUI dialog
33
34   Parameters:
35       input=name [required]
36           Name of input vector map
37           Or data source for direct OGR access
38
39       output=name [required]
40           Name for output vector map
41
42       coordinates=east,north
43           Coordinates
44
45       visibility=name
46           Name of input vector map containing visible points
47           Add points after computing the visibility graph
48

DESCRIPTION

50       v.net.visibility computes the visibility graph of a vector map contain‐
51       ing lines, areas (boundaries) and points. The visibility graph  is  the
52       graph  where  the  nodes  are the end point of the lines, boundaries or
53       simply points. There is an edge between two nodes if they are ’visible’
54       to  each  other.  Two  nodes  are visibible if there are no segments in
55       between of them, i.e. the edge does not intersect any line or  boundary
56       in  the  vector  map.  This is useful to compute the shortest path in a
57       vector map from any two points. To do this, first you need  to  compute
58       the  visibility  graph and from that to compute the shortest path using
59       v.net.path or d.path.
60
61       IMPORTANT: the algorithm doesn’t  work  well  with  intersecting  lines
62       (that includes overlapping)
63

NOTES

65       If you compute a shortest path after computing the visibility graph you
66       will notice that this path might go through a vertex of a line. If this
67       is  not  what you wanted you might need to process the map in v.buffer,
68       initially with a small value. Example:
69       v.buffer input=map output=bufferedmap buffer=1 type=point,line,area,boundary
70
71       The first argument is the input map. It supports lines, boundaries (so,
72       areas)  and  points.  For the algorithm  was written to work with lines
73       and boundaries not intersecting each other (that includes overlapping).
74       The resulting map containing the visibility graph is given in the  out‐
75       put map.
76
77       If you need to add additional points to compute a shortest path between
78       them afterwards you can use the coordinates parameter, e.g.:
79       coordinates=25556200,6686400,25556400,6686600
80       where 25556200,6686400 are  the  coordinate  of  the  first  point  and
81       25556400,6686600 are the coordinates of the second point. Of course you
82       can give as many points as you need. They will be added to the visibil‐
83       ity  graph  and  edges  from  them will be computed. You can always add
84       those points after computing the visibility graph. Simply use the visi‐
85       bility  parameter.  The  input will be the original vector map, the vis
86       will be the computed visibility graph and the output the new visibility
87       graph  which  will  be  the  vis + the new points given with coordinate
88       (edges will be computed as well).
89       v.net.visibility input=map visibility=vis_map output=new_vis_map \
90             coordinates=25556200,6686400,25556400,6686600
91

EXAMPLES

93   Example 1
94       A simple example (North Carolina sample data) showing how  to  use  the
95       module:
96       v.extract input=zipcodes_wake output=areas_7_11_25 cats=7,11,25
97       g.region vector=zipcodes_wake
98       d.mon wx0
99       d.vect areas_7_11_25
100       v.net.visibility input=areas_7_11_25 output=graph
101       d.vect graph
102       d.vect areas_7_11_25 color=red type=boundary
103
104   Example 2
105       An example on how to use v.buffer along with the module:
106       v.buffer input=lines output=buffered_lines buffer=1
107       v.net.visibility input=buffered_lines output=graph
108       d.vect graph
109       d.vect lines col=red
110
111   Example 3
112       An  example  on  how to use the coordinate parameter. This will compute
113       the  visibility  graph  of  the  vector  map  lines  with   the   point
114       2555678,6686343:
115       v.net.visibility input=lines output=graph coordinates=2555678,6686343
116       d.vect graph
117       d.vect lines col=red
118
119   Example 4
120       An  example  (North  Carolina sample data) on how to use the coordinate
121       parameter with the vis parameter.  Here the vector map  graph  is  com‐
122       puted  then  a  new visibility graph is computed from it with the point
123       669547.97,208348.20 extra:
124       v.extract input=zipcodes_wake output=areas_7_11_25 cats=7,11,25
125       g.region vector=zipcodes_wake
126       d.mon wx0
127       d.vect areas_7_11_25
128       v.net.visibility input=areas_7_11_25 output=graph
129       v.net.visibility input=areas_7_11_25 visibility=graph output=new_graph \
130             coordinates=669547.97,208348.20
131       d.erase
132       d.vect areas_7_11_25
133       echo "symbol basic/star 20 669547.97 208348.20 black red" | d.graph -m
134       d.vect new_graph
135       d.vect areas_7_11_25 color=red type=boundary
136
137   Example 5
138       An example for connections of points (Spearfish):
139       v.net.visibility input=archsites output=graph
140       g.region vector=archsites
141       d.mon wx0
142       d.vect graph
143       d.vect archsites col=red
144
145   Example 6
146       Here is an example with artificial data.
147
148       Load data using here document syntax (Bash and unix-like commands lines
149       only):
150       v.in.ascii input=- output=simple format=standard <<EOF
151       VERTI:
152       B  6
153        82.19908257  75.21788991
154        81.67889908  71.40321101
155        83.58623853  71.72522936
156        84.3293578   75.21788991
157        82.24862385  76.06009174
158        82.19908257  75.21788991
159       C  1 1
160        82.88897401  73.66318782
161        1     1
162       C  1 1
163        90.72645705  75.61248675
164        1     2
165       C  1 1
166        89.37944702  69.51012912
167        1     3
168       C  1 1
169        81.60108979  67.78669725
170        1     4
171       B  5
172        89.92752294  73.95458716
173        92.37981651  75.11880734
174        91.56238532  77.29862385
175        88.96146789  75.88669725
176        89.92752294  73.95458716
177       B  10
178        88.54036697  70.70963303
179        87.92192518  70.04087417
180        87.89633028  69.00045872
181        88.66460807  68.13372867
182        90.15108904  68.23290821
183        90.9426344   68.97588202
184        90.86880734  70.11513761
185        90.00144697  70.78336312
186        89.06055046  70.95733945
187        88.54036697  70.70963303
188       B  9
189        78.73119266  71.35366972
190        80.76238532  68.90137615
191        84.20550459  66.91972477
192        89.87798165  65.35917431
193        83.23494031  66.27685175
194        80.34278748  68.00837238
195        78.38484005  71.40292009
196        78.40917431  72.27018349
197        78.73119266  71.35366972
198       EOF
199       Compute the graph:
200       v.net.visibility input=simple output=graph
201

KNOWN ISSUES

203       In  some  cases  when 3 points or nodes are collinear, some wrong edges
204       are added. This happens only really rarly and shouldn’t be a big  prob‐
205       lem.  When two points have the exact same x coordinate and are visible,
206       some wrong edges are added.
207

SEE ALSO

209        d.path, v.net, v.net.alloc, v.net.iso, v.net.salesman,  v.net.steiner,
210       v.to.db
211

AUTHOR

213       Maximilian Maldacker
214       Mentor: Wolf Bergenheim
215
216       Last changed: $Date: 2016-09-09 04:35:18 +0200 (Fri, 09 Sep 2016) $
217

SOURCE CODE

219       Available at: v.net.visibility source code (history)
220
221       Main  index  | Vector index | Topics index | Keywords index | Graphical
222       index | Full index
223
224       © 2003-2019 GRASS Development Team, GRASS GIS 7.4.4 Reference Manual
225
226
227
228GRASS 7.4.4                                                v.net.visibility(1)
Impressum