2

I have a shapefile and made a DEM raster to create contours and slope analyze puttinggreen for a golf area . I have all i need except the slope values in degree (labeled directly in the map along with the slope direction).

I was able to label the slope with the degree few days ago but cant not find out how i did it (Goldfish memory).

Here is a screenshot of my current status, just missing the slope value label .

enter image description here

I think i used one of the tools from GDAL or SAGA but can not recall which one.

enter image description here

2 Answers 2

2

Here's a different approach. Since you mention that the raster layer "Helning" has the correct values, you can extract the values from this layer.

enter image description here

  1. Use the Centroids tool to create a new point layer from the centroids of the Gradient Vectors layer.
  2. Use the Sample raster values tool to copy the raster values into the attribute table of the point layer.
  3. Label the point layer with the new attribute. Set the symbology to "No symbols."

enter image description here

2
  • That worked. It gives me the same values i had before. i.sstatic.net/qrUev.png I have a follow up question. The resolution of the raster render is not so good. This area is about 15x15m but i was not able get better result then what the image shows. Is there a way to make the resolution higher?
    – DMAPPER
    Commented Aug 4, 2019 at 14:47
  • that should be a new question
    – csk
    Commented Aug 4, 2019 at 16:46
0

It looks like the arrows on your map represent the slope, with the arrow direction representing slope direction, and the arrow length representing slope steepness.

If that's the case, the slope steepness is probably stored as an attribute in the gradient vector layer. So you can label that layer with that attribute. See Setting a Label in the QGIS Manual.

Tips for remembering/figuring out how you did that one really useful thing a few days ago:

  • The "Recently used" section of the processing toolbox keeps track of tools that you used recently.

    enter image description here

  • Most layers created by a processing algorithm will have part of the name of that algorithm in the name of the layer. Even if you ran the algorithm through a menu, the same tool is probably accessible through the processing toolbox. You can often find the tool that was used to create a layer by searching the Processing Toolbox for tools with similar names similar. EG, you have a layer called "vector gradient;" when I search for "gradient" I find these 8 SAGA tools:

    enter image description here

3
  • I looked through the history of tools used and from what i could see i have already added it as a layer, either the slope tool or the vector gradient. Slope doesnt have attributes for it to label slope value, only by looking in the properties you could see slope values. Vector gradient has attributes but none of the default is showing slope angle values but it might be possible to add by using the field calculator i think. How to properly format a formel for slope values is out of my knowledg.
    – DMAPPER
    Commented Jul 26, 2019 at 6:15
  • Using the Field Calculator you can add a field with the line length. If my assumption is correct, that the length of each line is proportional to the slope angle, then you can extrapolate slope angle by multiplying line length by a conversion factor. You would need to know the actual slope angle at several points in order to estimate that conversion factor. The Field Calculator formula would then be $length*[conversion factor].
    – csk
    Commented Jul 26, 2019 at 14:42
  • I didnt get anywhere with the suggested solutions above. i.sstatic.net/S362s.png Values on the layer are right. Is there a way to add these to the map? they must derive from somewhere.
    – DMAPPER
    Commented Aug 4, 2019 at 8:00

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.