<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body >Hi Etienne,<div><br></div><div>Maybe you could use v.net.allpairs with negative/positve costs for up- and downstream direction and then select the smallest positive and negative distance for each dam to get the two neighbours.</div><div><br></div><div>Here what I found in the manual of v.net.distance which might also be useful for your purpose: </div><div><br></div><div>"In order to find nearest neighbors within a group of nodes, you can either loop through each node as to and all other nodes as from or create a complete distance matrix with v.net.allpairs and select the lowest non-zero distance for each node."</div><div><br></div><div>https://grass.osgeo.org/grass70/manuals/v.net.distance.html</div><div><br></div><div>Maybe a start...</div><div><br></div><div>/Johannes</div><div><br></div><br><br><div>-------- Original message --------</div><div>From: Etienne DELAY <etienne.delay@etu.unilim.fr> </div><div>Date:26/10/2015 15:15 (GMT+01:00) </div><div>To: Markus Neteler <neteler@osgeo.org> </div><div>Cc: GRASS user list <grass-user@lists.osgeo.org> </div><div>Subject: Re: [GRASS-user] river and dams in netwok analysis </div><div><br></div>Dear all dear Markus,<br>Above all great job GRASS dev team ! Grass 7 is so nice and powerful. <br>I'm always in the dark with my dams problem.<br><br>I would like to export dams points as node and for each node in the <br>attribute table 2 new column : dam before | dam after. I'm looking for <br>network analysis but it may be a wrong way ?<br><br>There is a way to do that in Grass?<br><br><br>Cordialement<br><br>Etienne DELAY (Skype : etienne.delay.tic)<br>Chaire: Capital environnemental et gestion durable des cours d'eau<br>laboratoire GEOLAB UMR 6042 CNRS<br>Université de Limoges, FLSH<br>39E rue Camille Guérin 87036 Limoges<br>blog : http://elcep.legtux.org<br><br>Le 18/10/2015 17:30, Markus Neteler a écrit :<br>> On Sat, Oct 17, 2015 at 11:17 AM, Etienne DELAY<br>> <etienne.delay@etu.unilim.fr <mailto:etienne.delay@etu.unilim.fr>> wrote:<br>> > Re,<br>> > I have read carefully the v.out.ogr as will said for tring to export the<br>> > network layer but I've got an error :<br>> ><br>> > v.out.ogr --overwrite input=network@PERMANENT type=point dsn=~/ layer=2<br>> > format=ESRI_Shapefile<br>> ><br>> > WARNING: 111738 line(s) found, but not requested to be exported. Verify<br>> > 'type' parameter.<br>> ...<br>><br>> (I guess that you need to set "type=line" and not "type=point")<br>><br>> ... this is why you may consider to upgrade to the current 7.0.x stable<br>> version. Note the differences:<br>><br>> https://grass.osgeo.org/grass64/manuals/v.out.ogr.html<br>> type=string[,string,...] Feature type(s).<br>> Combinations not supported by all output formats. Default: first type<br>> found in input.<br>> Options: point,line,boundary,centroid,area,face,kernel,auto<br>> Default: line,boundary<br>><br>> https://grass.osgeo.org/grass70/manuals/v.out.ogr.html<br>> type=string[,string,...] Feature type(s)<br>> Combination of types is not supported by all output formats.<br>> Default is to use first type found in input vector map.<br>> Options: point, line, boundary, centroid, area, face, kernel, auto<br>> Default: auto <<==<br>><br>> Less to think about, much faster vector data processing, improved<br>> network analysis along with new graphical frontend:<br>> https://grasswiki.osgeo.org/wiki/Vector_network_analysis#Screenshots<br>><br>> Best<br>> Markus<br>_______________________________________________<br>grass-user mailing list<br>grass-user@lists.osgeo.org<br>http://lists.osgeo.org/mailman/listinfo/grass-user</body>