<br><br><div class="gmail_quote">2012/6/18 Markus Metz <span dir="ltr"><<a href="mailto:markus.metz.giswork@googlemail.com" target="_blank">markus.metz.giswork@googlemail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On Mon, Jun 18, 2012 at 3:13 PM, Roberto Marzocchi<br>
<<a href="mailto:roberto.marzocchi@gmail.com" target="_blank">roberto.marzocchi@gmail.com</a>> wrote:<br>
> Hi Markus,<br>
><br>
> many thannks for your changes. I think now the command is quite O.K..<br>
> Nevertheless I have encountered a new error:<br>
> I have tried with the command that you suggested me (to_type is point and<br>
> not line) and it works.<br>
><br>
><br>
> v.net.distance input=network_cat4 output=network_cat4_distance alayer=3<br>
> nlayer=4 afcolumn=lungh_a abcolumn=lungh_i flayer=4 from_cats=1-4 tlayer=4<br>
> to_type=point to_cats=5-6920 --overwrite<br>
><br>
> after I try to do the opposite, that is from the 6916 nodes of the network<br>
> (that are point!) to the firestations and it don't works<br>
><br>
> v.net.distance input=network_cat4 output=network_cat4_distance alayer=3<br>
> nlayer=4 afcolumn=lungh_a abcolumn=lungh_i tlayer=4 to_cats=1-4 flayer=4<br>
> to_type=point from_cats=5-6920 --overwrite<br>
><br>
><br>
><br>
>>> Building graph...<br>
>>> Registering arcs...<br>
>>>  100%<br>
>>> Flattening the graph...<br>
>>> Graph was built<br>
>>> ERROR: Requested feature id -1 is not reasonable(max features in vector<br>
>>> map<br>
>>>       <network_cat4@ospedali_grass7>: 15747)<br>
><br>
><br>
> I don't understand why...<br>
<br>
</div>Some of the 'from' features are not reachable within the network. For<br>
each 'from' feature, the module finds the nearest 'to' feature. That<br>
means that all 'from' features must be connected to the network, but<br>
it is ok if some 'to' features are not connected. This is why you got<br>
this error after you swapped the set of 'from' and 'to' features.<br>
<br>
Fixed in r52124. But maybe a warning would be useful if some 'from' or<br>
'to' features are not reachable.<br>
<br>
Markus M<br></blockquote><div><br></div><div>Dear Markus, </div><div><br></div><div>Now It works also for other points.  Obviously the nodes not connected are not considered.</div><div><br></div><div>I'm in agree with you, a warning can be very useful!</div>
<div><br></div><div>It is strange also that the points are not connected to the network. In fact I have created the nodes using <a href="http://v.net">v.net</a>. </div><div>I will check if there is any problem with <a href="http://v.net">v.net</a>.</div>
<div><br></div><div>Many thanks and best regards,</div><div>Roberto </div><div><br></div><div><br></div><div><br></div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><br>
><br>
> Thanks in advanced,<br>
> Roberto<br>
><br>
> 2012/6/16 Markus Metz <<a href="mailto:markus.metz.giswork@googlemail.com" target="_blank">markus.metz.giswork@googlemail.com</a>><br>
>><br>
>> On Fri, Jun 15, 2012 at 6:12 PM, Roberto Marzocchi<br>
>> <<a href="mailto:roberto.marzocchi@gmail.com" target="_blank">roberto.marzocchi@gmail.com</a>> wrote:<br>
>> > Dear all,<br>
>> ><br>
>> > I'm trying to use v.net.distance in grass7, which option seem be<br>
>> > corrected<br>
>> > respect of teh version of grass65 (alayer, nlayer and consequently<br>
>> > costs).<br>
>> ><br>
>> > First of all, I noted that the option output is reported two time, but<br>
>> > this<br>
>> > can be simply corrected removing line 134 of main.c command. If needed I<br>
>> > can<br>
>> > add in the svn.<br>
>> > Secondarly the program stop itself because if I correctly uderstand, the<br>
>> > number of lines not corresponding with the number of nodes.<br>
>> ><br>
>> > ERROR: Nodes not available for line 8819<br>
>><br>
>> v.net.distance should be fixed with r52069.<br>
>><br>
>> ><br>
>> > Unfortunately I'm not expert with vector grass libraries so I didn't<br>
>> > understand the problem..<br>
>> ><br>
>> ><br>
>> > --<br>
>> ><br>
>> > I'm using as a test the north carolina dataset and in particular I do<br>
>> > the<br>
>> > step of the tutorial of Trento university<br>
>> ><br>
>> > (<a href="http://www.ing.unitn.it/~grass/docs/tutorial_64_en/htdocs/esercitazione/network_analysis/index.html" target="_blank">http://www.ing.unitn.it/~grass/docs/tutorial_64_en/htdocs/esercitazione/network_analysis/index.html</a>) adding<br>


>> > also a 4th layer with the nodes. Attached a script to create the dataset<br>
>> > (grass70)<br>
>><br>
>> In the test script, use<br>
>><br>
>> v.net.distance input=network_cat4 output=network_cat4_distance<br>
>> alayer=3 nlayer=4 afcolumn=lungh_a abcolumn=lungh_i flayer=4<br>
>> from_cats=1-4 tlayer=3 to_type=line to_cats=6-6920<br>
>><br>
>> in order to get the shortest paths from the four selected firestations<br>
>> to the network. The 'from' features are always points, I have updated<br>
>> the description and manual accordingly.<br>
>><br>
>> Markus M<br>
>><br>
>> ><br>
>> ><br>
>> > Cheers,<br>
>> > Roberto<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > grass-dev mailing list<br>
>> > <a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>
>> > <a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
><br>
><br>
</div></div></blockquote></div><br>