8

Is it possible to make slope direction with QGIS 2.16.1 like in this image?

enter image description here

Global Mapper steps:

  1. Made grid point
  2. Apply slope direction.

enter image description here

I made point grid 100x100m and I used DEM layer. In Global Mapper software, there is a tool which make slope direction (flow direction) field, and then in QGIS I made this map. This is attribute table made with Global Mapper.

enter image description here

@lynxlynxlynx:This is result: Red arrows are old arrows and blue are new arrows. I think this is no what I want. Maybe red arrows are interpolated some slopes. You can see with contour lines that result is not good.

enter image description here

enter image description here

@SaultDon: There is uncovered areas on this image.

enter image description here

@lynxlynxlynx: it is similar enter image description here


I found tool for this. That is Saga plugin called: Gradient vector from surface.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Frodo
  • 2,407
  • 1
  • 18
  • 36
  • 1
    Did you look at data-defined options for feature display? You can customise this under layer->preferences and choose different symbology. – lynxlynxlynx Aug 28 '16 at 14:23
  • Not a problem with symbols, the problem is how to get data for slope direction. This field I made with Global Mapper. Is there option in QGIS? – Frodo Aug 28 '16 at 14:33
  • 1
    @nagib You could try r.flow or r.terraflow (for large rasters) to get flow direction. It requires GRASS GIS to be installed and configured in QGIS processing providers (Processing > Options > Providers). – SaultDon Aug 28 '16 at 16:28
  • I was not able to generate r.flow and r.terra flow, there is something wrong with the parameters. My DEM terrain is GeoTIFF, is there a problem?Sometime ago I used to r.flow true path but the result was like a river down the hill. I prefer results with arrows. – Frodo Aug 28 '16 at 16:49
  • I made layer like terraflow and flow with other software and result is on the image below. – Frodo Aug 28 '16 at 17:24
  • You have been using this site for quite some time but you have not yet taken the 2-minute [Tour] that is intended to introduce all users to the site and its protocols. You appear to be unaware that the [edit] button beneath your question is the way to provide additional information. "Answers" should not be used for this purpose. – PolyGeo Aug 28 '16 at 21:53
  • @PolyGeo, how to put the picture in a comment? – Frodo Aug 29 '16 at 09:09
  • You cannot - that is what your question is for. Comments are temporary and should only be used for seeking clarifications from the poster, which in this case is you i.e. they ask in comments, you address by revising your question using the [edit] button beneath it. – PolyGeo Aug 29 '16 at 09:12
  • Did you draw the vectors using the slope aspect or slope itself? I've updated my answer to be a bit more clear. Comment there if you have further issues. – lynxlynxlynx Aug 29 '16 at 13:24
  • I drew the vectors using the slope aspect. – Frodo Aug 29 '16 at 15:09

2 Answers2

7

I found tool for this. That is Saga plugin called: Gradient vector from surface.

enter image description here

And result is: you have to choose in style manager, arrow for lines

enter image description here

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Frodo
  • 2,407
  • 1
  • 18
  • 36
  • I have SRTM hgt files. How can I generate a map like this using QGIS ? I am on windows 7 and I have the latest version of QGIS. I do not see a option Gradient vectors from surface. –  Jun 29 '17 at 13:54
  • https://docs.qgis.org/2.8/en/docs/user_manual/processing_algs/saga/index.html there is no such function gradient vector from surface –  Jun 29 '17 at 13:55
  • It is SAGA plugin. In processing toolbox. In the search box you have to write, gradient vector, and that is it – Frodo Jun 30 '17 at 15:09
  • The tool "Gradient vectors from surface" is in the Saga toolset. It works really well but.... Clip your input raster to only the area you need. It requires trial and error runs to get the sizes and spread of the direction arrows exactly how you want it. – Jakub Sisak GeoGraphics Apr 22 '18 at 14:58
6

You can generate the slope in several ways:

  1. Raster -> Analysis -> DEM -> Slope. Or via slope functions in the Processing framework (r.slope.aspect). Run it on your DEM. Do the same for the aspect.
  2. Create two new fields in your point layer (to hold the data).
  3. Use v.sample from Processing to assign values from the new rasters to your point layer. Or do it the long way by vectorizing the raster and then intersecting that with your point layer.

Note: To get correct results, I had to use the GDAL version of aspect calculator, the GRASS one was not satisfactory, similarly to your finding.

lynxlynxlynx
  • 4,247
  • 3
  • 29
  • 45
  • Testing doesn't give me satisfactory results though. My DEM is very dense (1x1m), but even with aggregated cells (10x10m), the aspect is mostly wrong and not just by an offset. Perhaps a bug, but I'm still on QGIS 2.14.3, not the latest one. – lynxlynxlynx Aug 29 '16 at 16:35
  • 1
    Ok, found a solution — use the GDAL aspect Processing module instead of the GRASS one. – lynxlynxlynx Aug 29 '16 at 17:17
  • Almost like original, but good result. – Frodo Aug 30 '16 at 16:57
  • The point grid looks shifted and considering the underlying cell size, that could account for all the differences. – lynxlynxlynx Aug 30 '16 at 19:56