I'm trying to create a Flow or directional raster map (with arrows) from an SRTM elevation map that I downloaded from CGIAR.

I already created an aspectMap to be used for the d.rast.arrow. I used the script: d.rast.arrow map=aspectMap type=grass

and it only displayed a map that is solid green without any arrows.

I also tried the script: d.rast.arrow map=aspectMap type=grass skip=50

and it displayed dots on the screen for every 50th cell. I already zoomed in to its max, but still I cannot see the arrows.

Is there a problem with my script? or is there an alternative way to create the arrows?


The length of the arrows is determined by the magnitude_map (which would usually be the slope). If you want the arrows to be of uniform length, you can just create a new map of ones (r.mapcalc ones=1) and use that as the magnitude map. You can then control the length of the arrows using the scale factor:

d.rast.arrow map=aspectMap skip=50 magnitude_map=ones scale=40

By default, arrows are drawn at the size of a cell and cannot be seen if the raster map is relatively close in scale. You can use the skip option to draw arrows every n-th cell in both directions if you are working with relatively high resolutions. It may be useful to disable the grid in this case, which is accomplished by setting its color to "none", i.e. grid_color=none.

Just remember:

d.rast.arrow [map=string] [type=string] [arrow_color=string] [grid_color=string] [x_color=string] [unknown_color=string] [skip=integer] [magnitude_map=string] [scale=float] [--verbose] [--quiet]

  • I already disabled the grid and used skip=30 but it still produced no arrows. just dots – teamAngat Feb 9 '11 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.