<br><div class="gmail_quote">On Mon, Oct 15, 2012 at 4:34 PM, Michael Barton <span dir="ltr"><<a href="mailto:Michael.Barton@asu.edu" target="_blank">Michael.Barton@asu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div>One thing that is confusing is that the text for both entries alayer and nlayer shows up as "Layer number or name" instead of the text that is actually in the description field "Arc layer" and "Node layer". Any idea why this is so?</div>
<div><br>
</div></div></blockquote><div style="word-wrap:break-word"><br>The label for the standard option G_OPT_V_FIELD is by default set to "Layer number or name", and the label, if set, is used as text next to the option key. Having "Arc layer" or "Node layer" next to the key can be easily done be making "Arc layer" or "Node layer" option labels, which should then be done for all v.net.* modules.<br>
</div><div><br>Markus M <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><div class="im"><div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
<br>
</div><div><div class="h5"><div>
<div>On Oct 13, 2012, at 5:15 AM, Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com" target="_blank">markus.metz.giswork@gmail.com</a>> wrote:</div>
<br>
<blockquote type="cite">On Mon, Oct 8, 2012 at 6:18 PM, Moritz Lennert<br>
<<a href="mailto:mlennert@club.worldonline.be" target="_blank">mlennert@club.worldonline.be</a>> wrote:<br>
<blockquote type="cite">On 08/10/12 18:09, Markus Metz wrote:<br>
<blockquote type="cite"><br>
On Mon, Oct 8, 2012 at 5:28 PM, Moritz Lennert<br>
</blockquote>
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">In trunk, the result is a vector map of nodes with an attribute table<br>
linked<br>
to these nodes which provides a distance matrix across the network for<br>
all<br>
pairs of nodes.<br>
<br>
I agree that this is suboptimal output. I think the following outputs<br>
would<br>
be interesting:<br>
<br>
- a table with the distance matrix, but this does not have to be linked<br>
to a<br>
map (cf v.distance table option)<br>
</blockquote>
<br>
<br>
+1<br>
I would prefer output as a matrix to a file (or stdout) with a custom<br>
field separator instead of an attribute table. I guess (at least I<br>
would take that route) that post-processing of that output is done<br>
outside GRASS.<br>
</blockquote>
<br>
<br>
I guess that could be left to the user (e.g. table=- for stdout ?).<br>
Sometimes it can be handy to have that table in the same database as the<br>
vector attribute layers as you might want to use it in a view which you can<br>
then attach back to the vector map or in another type SQL statement linked<br>
to your mapset...<br>
<br>
<br>
<blockquote type="cite"><br>
There is a bug in the current implementation of v.net.allpairs: there<br>
are multiple entries for the same category and layer in the output<br>
attribute table. This is not supported by GRASS.<br>
</blockquote>
<br>
<br>
Right. Didn't even think about that when I saw the table.<br>
<br>
<br>
<blockquote type="cite"><br>
<blockquote type="cite">- a map with all the paths<br>
<br>
I would guess that the code is in the <a href="http://v.net" target="_blank">v.net</a> modules (notably v.net.path)<br>
to<br>
easily create a map of paths. MarkusM ?<br>
</blockquote>
<br>
<br>
Yes, that should be easy. I would suggest to change v.net.allpairs<br>
such that the output contains all the paths. Each path gets its own<br>
category, and the attribute table holds information about the start<br>
node, end node, and cost to get from the start node to the end node.<br>
Additionally, a matrix can be printed to file or stdout with the costs<br>
of travelling from the start node to the end node. This matrix is not<br>
symmetric because the cost of travelling from A to B is not<br>
necessarily equal to the cost of travelling from B to A (one-way<br>
streets for example).<br>
</blockquote>
<br>
<br>
+1, although I'm still not convinced that the matrix as a table cannot be<br>
useful if you don't want the whole map, but only the info. But I won't make<br>
an issue out of it, as you can use the attribute table of the map to get the<br>
same results.<br>
</blockquote>
<br>
I have changed the output of v.net.allpairs in r53379 to hold the<br>
selected nodes and all paths between them. The attribute table for the<br>
paths has the entries cat, from_cat, to_cat, cost with cat = category<br>
of path, from_cat and to_cat = categories of start and end point, and<br>
cost = cost.<br>
<br>
Printing the costs out in matrix form is not implemented, but would be<br>
easy to add.<br>
<br>
Markus M<br>
</blockquote>
</div>
<br>
</div></div></div>
</div>
</div>
</blockquote></div><br>