I have created a map with the flow directions using the d.rast.arrow. Can i query on the map to know where the direction of the arrows are? I am going to use the arrow directions in an algorithm. Or, is there a way to store the arrow directions in a text file so that I can import it in my code? Thanks!
|
The arrows directions are the Z value in the aspect map. The display (d.####) commands like d.rast.arrows only output to the display. You can export the aspect map as a text file, so you will have a file with coordinates and directiction of the flow. |
|||||||||||
|
|
Why don't you just run your algorithm directly on the map you used to create the arrows? If it's an aspect map, it will already contain the direction in degrees counter-clockwise from east. You can save the aspect map to a text file using
where Depending on how you're implementing your algorithm, you can also do the calculations directly in GRASS using
The mapcalc manual might be of interest to you. |
|||||
|