Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am sitting with an elevation raster, trying to produce a calculation for slope angle. I have a cell size of 2,-2 and I am trying to figure out how to calculate cell value difference between adjacent cells. Or is there another way to visualize the slopiest slopes in my raster? I am currently using QGIS and SAGA.

share|improve this question
add comment

2 Answers

I know this is not addressing your query directly, i.e., I can't give you info on calculating slope yourself. But you can calculate slope using a built in tool, well, a plugin.

This link: http://www.gistutor.com/quantum-gis/20-intermediate-quantum-gis-tutorials/48-quantum-gis-qgis-raster-based-terrain-analysis-techniques.html shows you how.

If you want to calculate it yourself then let me know and we can find out how to do raster calculations manually. Here's how to calculate it: http://en.wikipedia.org/wiki/Geographic_information_system#Slope_and_aspect

share|improve this answer
add comment

You can do the slope calculation on your own using GRASS plugin from QuantumGIS or you can use a predefined function that compute slope available also in GRASS or SAGA plugin.

For your own calculation you must run raster calculator which is a GRASS function. To use GRASS within QGIS you must have installed one of the latest version of QGIS, for example 1.7.4. If you do right click on the top of QGIS window you can choose to reveal GRASS toolbox. Then you will see the GRASS toolbox, where you must create or open a MAPSET. The you can Open GRASS tools and use r.mapcalc to run this (called 2FD algorithm):

atan(sqrt(((raster@PERMANENT[0,-1]-raster@PERMANENT[0,1])/(2*resolution))^2+((raster@PERMANENT[-1,0]-raster@PERMANENT[1,0])/(2*resolution))^2))

where

  • raster is the name of your raster
  • resolution is the cell size
  • [0,-1] points to the northern pixel from central pixel
  • [0, 1] points to the southern pixel from central pixel

For calculations already implemented you will find in GRASS tools the r.slope.aspect.slope function.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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