<div dir="ltr">Hi,<br><br>I was testing the v.net.distance (in QGIS) and noticed something strange. Apparently the route is calculated in a reverse way.<br><br>If you see in this screencast<br><br><a href="https://dl.dropboxusercontent.com/u/5772257/qgis/processing_grass_v_net_distance.ogv">https://dl.dropboxusercontent.com/u/5772257/qgis/processing_grass_v_net_distance.ogv</a> <br><br>I have a network of streets with two-way (green) and some with only one-way (in red, with the arrow indicating the direction of traffic). The two-way cost is in "dois_senti" field of the attribute table, and the sections of one-way have -1 value in the "um_senti" field of the attribute table.<br><br>The starting point is the orange pentagon ("ponto_inicio"), and the destination point is the green star ("ponto_chegada").<br><br>As you can see, v.net.distance calculate the route in the reverse way, that is, when I choose "ponto_inicio" as "from", and "ponto_chegada" as "to" (first run in the screencast), it gives me the route by the south ("ponto_chegada" -> "ponto_inicio"). In the second run, I choose "ponto_chegada" as "from", and "ponto_inicio" as "to", and it uses the one-way street. So, the topology is respected, but it seems that "from" and "to" are used in a reverse manner.<br><br>I thought it might be a mistake in implementing the tool in QGIS Processing, but then I performed the same procedure on GRASS 7.0.2 native, and the result is the same. <br><br>Médéric Ribreux has done also some tests and concluded that from_layer is used as to_layer.<br><br>It seems to be a GRASS problem because the point layers order is correct:<br>- layer 2 is imported from FROM_CENTERS QGIS layer.<br>- layer 3 is imported from TO_CENTERS QGIS layer.<br>- layer 2 is used as from_layer in v.net.distance.<br>- layer 3 is used as to_layer in v.net.distance.<br><br>He has tried with v.net.path and got the same results than for v.net.distance.<br><br>Could it be a mis-interpretation of forward and backward costs? A bug? Or simply how the tool works?<br><br>Thanks!<br><br>Best regards,<br>Pedro<br></div>