Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 2241

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: v.net.visibility</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>v.net.visibility</b></em>  - Visibility graph construction.
<h2>KEYWORDS</h2>
vector, path, visibility
<h2>SYNOPSIS</h2>
<b>v.net.visibility</b><br>
<b>v.net.visibility help</b><br>
<b>v.net.visibility</b> <b>input</b>=<em>name</em> <b>output</b>=<em>name</em>  [<b>coordinate</b>=<em>x,y</em>[,<i>x,y</i>,...]]   [<b>vis</b>=<em>string</em>]   [--<b>overwrite</b>]  [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>--overwrite</b></DT>
<DD>Allow output files to overwrite existing files</DD>
<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>input</b>=<em>name</em></DT>
<DD>Name of input vector map</DD>

<DT><b>output</b>=<em>name</em></DT>
<DD>Name for output vector map</DD>

<DT><b>coordinate</b>=<em>x,y[,<i>x,y</i>,...]</em></DT>
<DD>One or more coordinates</DD>

<DT><b>vis</b>=<em>string</em></DT>
<DD>Add points after computing the vis graph</DD>

</DL>
<h2>DESCRIPTION</h2>

<p><em>v.net.visibility</em> Computes the visibility graph of a vector map containing lines, areas ( boundaries ) and points. The visibility graph is the graph where the nodes are the end point of the lines, boundaries or simply the points. There is an edge between two nodes if they are 'visible'. Two nodes are visibible if there is no segments in between them, i.e. the edge doesn't intersect any line or boundary in the vector map. This is useful to compute the sortest path in a vector map from any two points. To do this, first you need to compute the visibility graph and from it compute the shortest path using v.net.path or d.path.
</p>

<b>IMPORTANT : the algorithm doesn't work well with intersecting lines ( that includes overlapping )</b>

<p>
If you compute a shortest path after computing the visibility graph you will notice that this path might go through a vertix of a line. If this is not wanted you might to run the map through <em>v.buffer</em> first whith a small value. Example:
<div class="code"><pre>
v.buffer input=map output=bufferedmap buffer=1 type=point,line,area,boundary
</pre></div>
</p>


<p>
The first argument is the input map. It supports lines, boudaries ( so areas ) and points. For the algorithm to work lines and boundaries must not be intersecting ( that includes overlapping ).
<div class="code"><pre>
input=map
</pre></div>


The result map containing the visibility graph is given in the output map
<div class="code"><pre>
output=map2
</pre></div>


If you need to add additional points to compute a shortest path between them afterwards you can use the <em>coordinate</em> parameter.
<div class="code"><pre>
coordinate=25556200,6686400,25556400,6686600
</pre></div>
where 25556200,6686400 are the coordinate of the first point and 25556400,6686600 are the coordinates of the second point. Of course you can give as many points as you want. They will be added to the visibility graph and edges from them will be computed. You can always add those points after computing the visibility graph. Simply use the <em>vis</em> parameter. The input will be the original vector map, the vis will be the computed visibility graph and the output the new visibility graph which will be the vis + the new points given with coordinate ( edges will be computed as well ).
<div class="code"><pre>
v.net.visibility input=map vis=vis_map output=new_vis_map coordinate=25556200,6686400,25556400,6686600
</pre></div>
</p>

<h2>EXAMPLE 1</h2>
A simple example showing how to use the module
<div class="code"><pre>
v.net.visibility input=lines output=graph <br>
d.vect graph <br>
d.vect lines col=red <br>
</pre></div>

<h2>EXAMPLE 2</h2>
An example on how to use <em>v.buffer</em> with the module 
<div class="code"><pre>
v.buffer input=lines output=buffered_lines buffer=1
v.net.visibility input=buffered_lines output=graph <br>
d.vect graph <br>
d.vect lines col=red <br>
</pre></div>


<h2>EXAMPLE 3</h2>
An example on how to use the coordinate parameter. This will compute the visibility graph of the vector map lines with the point 2555678,6686343
<div class="code"><pre>
v.net.visibility input=lines output=graph coordinate=2555678,6686343<br>
d.vect graph <br>
d.vect lines col=red <br>
</pre></div>

<h2>EXAMPLE 4</h2>
An example on how to use the coordinate parameter with the vis parameter. Here the vector map graph is computed then a new visibility graph is computed from it with the point 2555678,6686343 extra
<div class="code"><pre>
v.net.visibility input=lines output=graph <br>
d.vect graph <br>
d.vect lines col=red <br>
v.net.visibility input=lines vis=graph output=new_graph coordinate=2555678,6686343<br>
d.erase
d.vect new_graph
d.vect lines col=red
</pre></div>

<h2>KNOWN BUGS</h2>
In some cases when 3 points or nodes are collinear, some wrong edges are added. This happens only really rarly and shouldn't be a big problem.
When two points have the exact same x coordinate and are visible, some wrong edges are added.

<h2>SEE ALSO</h2>

<em><a HREF="d.path.html">d.path</a></em>,
<em><a HREF="v.net.html">v.net</a></em>,
<em><a HREF="v.net.alloc.html">v.net.alloc</a></em>,
<em><a HREF="v.net.iso.html">v.net.iso</a></em>,
<em><a HREF="v.net.salesman.html">v.net.salesman</a></em>,
<em><a HREF="v.net.steiner.html">v.net.steiner</a></em>,
<em><a HREF="v.to.db.html">v.to.db</a></em>

<h2>AUTHOR</h2>
Maximilian Maldacker<br>
Mentor : Wolf Bergenheim

<p><i>Last changed: $Date: 2007-11-06 08:04:10 +0100 (Tue, 06 Nov 2007) $ </i>
<HR>
<P><a href="index.html">Main index</a> - <a href="vector.html">vector index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>