5

I have used the automated r.watershed tool in QGIS 2.18 (GRASS plugin) to conduct a watershed analysis (basin boundaries, flow direction, flow accumulation etc).

I'm stuck on the following operations:

1. Visualising flow direction arrows. I tried to convert the flow direction raster to a vector point file using GRASS>r.to-vect, but it keeps crashing (not responding/no error message). Please can anyone recommend a workflow for this (converting the file + visualising arrows)?

2. Burning stream network into the DEM. I created a polyline file from the flow accumulation raster, to join up 'missing' channels. After converting the polyline to a raster, the new raster has a smaller extent than the original DEM. Thus, the SAGA>Hydrology>'Burn stream network into DEM' tool won't operate with rasters of different extents.

2
  • How large is the flow raster and how long did you wait for the function r.to.vect? Was one CPU core still used at 100%?
    – Matte
    Commented Feb 8, 2017 at 11:04
  • @Matte The raster is 1913x2831 cells (2m cell size). I waited 5 mins on QGIS 2.18, then tried again on 2.4 - the latter seems to be working, but went 'not responding' once it reached '100% processing algorithm' - like that for ~@30 mins. Not sure about CPU.
    – Michael_01
    Commented Feb 8, 2017 at 11:49

3 Answers 3

3

Regarding your first question (it's usually better to focus on one question per post):

In GRASS you can display vectors with direction arrows. In the gui there's a checkbox "Display direction of linear features".

So if you have run r.watershed, then you probably have created a raster stream network. With two addition commands you can convert this to a vector map of streams then display with direction arrows.

First do r.thin to make sure that the raster stream network is thinned to only a width of only one cell all along the streams. Then run r.to.vect ... type=line to convert to vector. The resulting vector will automatically have the line directions in the direction of flow.

6
  • Thank you for your answer @Micha. I am particularly interested in flow directions across the catchment, not just the stream network. I have a flow direction grid, but could not convert it into a vector file in order to display flow direction arrows.
    – Michael_01
    Commented Feb 22, 2017 at 17:10
  • Based on your original post, the raster extent of 1913x2831 would mean about 5.5 million cells. I suppose you could convert that to a vector but what would you do with it? How would you display 5.5 million tiny arrows??
    – Micha
    Commented Feb 23, 2017 at 20:01
  • Good point! @Micha I have clipped the raster to a smaller area and resampled to a 6M cell size (mode), then converted to a vector point file with arrows. I now need to symbolise the values (1-8) with arrows according to their directions - do you know which directions correspond with each value? Thanks! (I have Googled this with surprisingly little results.)
    – Michael_01
    Commented Feb 24, 2017 at 10:32
  • Ok, based on this link (it's for Arc not QGIS) I have symbolised 1-8 starting from 1=east, going clockwise to 8. help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//…
    – Michael_01
    Commented Feb 24, 2017 at 10:51
  • 1
    Maybe this post surfaces.co.il/flow-direction-from-grass-to-arcgis of mine will help you.
    – Micha
    Commented Feb 25, 2017 at 14:35
1

For visualising flow direction with arrows you can use the Crayfish plugin. After installing you'll find in the Processing Toolbox a tool Crayfish | Conversions | Saga Flow to GRIB. Drag the GRIB mesh layer from the browser panel to the map canvas and style it with arrows using the mesh styling options. Here's a video: https://youtu.be/YfkPKmTgWhE

For burning the stream network, I demonstrate the procedure using the GRASS r.carve tool in QGIS in this video: https://youtu.be/ZyM1jnxFamU

0

To address query 2 try:

  • In raster calculator convert all of your DEM values to a high random value (which won't be anything like the value you'll use to rasterise your polylines) using something like DEM/DEM * 9999.
  • Save this as a new raster.

  • Use the QGIS rasterise tool to convert your polyline streams to raster. Select the raster you created above as the save raster - this will 'stamp' the stream values onto this raster so it will have the same extent as the DEM Use the raster calculator to get rid of the 999 values and set them to 0

You should end up with a stream raster which has the same extent as the original DEM because it is built on the original DEM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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