<div dir="ltr">Hello Moritz,<div>I tried your solution and since I generated the path using the same v.net.path with the same -s flag (which preserves the segments) that you suggest, when I do the v.distance trying to "copy" the attribute cat from the net segments it seems not to work properly - I mean, it copies "something" but that "something" is wrong in the sense that it takes the category of the element NEAR the studied one, not 'under' even specifying a dmax=0..</div>
<div><br></div><div>v.net.path input='gridCat' output='tmpPath2' file='tmpCoord2' -s<br></div><div>v.db.droptable map='tmpPath2' -f<br></div><div>v.category input='tmpPath2' output='tmpPath4a' option='del'<br>
</div><div>v.category input='tmpPath4a' output='tmpPath2' option='add')<br></div><div>v.db.addtable map='tmpPath2' columns='cat integer,tmpcat integer'</div><div>v.distance from='tmpPath2' from_type='line' to='gridCat' to_type='line' upload='cat' column='tmpcat' dmax=0<br>
</div><div><br></div><div>here a pic of my situation: <a href="http://oi62.tinypic.com/2epopcj.jpg">http://oi62.tinypic.com/2epopcj.jpg</a></div><div>in red the tmpPath2 and tmpcat value as label</div><div>in black the gridCat and the value of the category as label</div>
<div><br></div><div>Thanks for all,</div><div>Annalisa</div><div><br></div><div>ps. ..and for the request too :)</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-24 17:10 GMT+01:00 Moritz Lennert <span dir="ltr"><<a href="mailto:mlennert@club.worldonline.be" target="_blank">mlennert@club.worldonline.be</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 20/03/14 11:41, Annalisa Minelli wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
Hi list,<br>
I have a maybe stupid question, but I should identify (by category) the<br>
net lines visited from going to one point to another along a net. I<br></div>
tried the <a href="http://v.net" target="_blank">v.net</a> <<a href="http://v.net" target="_blank">http://v.net</a>> module, but I'm not colpletely sure to<div class=""><br>
have understood what the 'nreport' option for the parameter 'operation'<br>
does.<br>
I don't necessarily need to generate the path, I should only identify<br>
the visited lines by printing category..<br>
</div></blockquote>
<br>
<br>
I don't think there is a direct way of doing this (except possibly by activating debugging and then filtering out the relevant info), but you can do it through a combination of v.net.path, v.category and v.distance. E.g. (using the North Carolina demo dataset):<br>

<br>
<a href="http://v.net" target="_blank">v.net</a> -s streets_wake points=schools_wake out=network op=connect thresh=500<br>
echo "1 166 1" | v.net.path -s network out=mypath<br>
#The result is a map with the same category value for all segments, but we need different category values for each segment<br>
<br>
v.category mypath op=del out=temp<br>
v.category -t temp op=add out=mypath_segs<br>
<br>
v.distance -p from=mypath_segs to=network upload=cat col=segcat<br>
<br>
#The result should be (I didn't verify) the list of the cat values of the lines in network that the path goes through.<br>
#If you need another attribute of these lines, just use upload=attr and tocolumn= in the v.distance call.<span class="HOEnZb"><font color="#888888"><br>
<br>
Moritz<br>
</font></span></blockquote></div><br></div>