2

I searched on the net but could not get the specific answer. Request for the same.

I have slope map of the area (in percent, derived from r.slope.aspect). I need 4 classes, as, area of slopes less than 5%, 5 to 15, 15 to 20 & above 20%. I got it done using singleband psuedocolour. Now I need the net area for these 4 classes.

How to achieve this in Qgis? Raster to Vector conversion should be avoided as possible. r.stats or r.report gives huge reports. It counts the individual cell instead of class & process accordingly, I think. I only need area for above 4 categories.

Or should I generate all together new raster maps, using raster calculator and with expression as Rasterlayer@1 < 5, etc... & again merge/ integrate into one final..

  • Thanks. I have not yet migrated to V 3.0. Will check soon. But in my case, there can be hundreds of cells which have vaues in between 0 to 5 and not unique, as against all the cells in that area having value, say, number X, upto 5 petcent slope and then calculate this area. – PraxisNFP May 31 '18 at 5:15
2

You need to reclassify your slope percent data into unique integer values. Otherwise you cannot calculate the area for each slope range. To do that, you need to use QGIS 2.X.X. Specifically, you need to use Reclassify values tool from Processing toolbox → SAGA → Raster tools → Reclassify values

enter image description here

Use the following steps to reclassify the slope raster data:

  • Select Slope percent file
  • Method: Simple table
  • Lookup Table click on the … a new window will open (See the figure and description below↓). You need to put your own slope range.

enter image description here

  • New value for no data values → -9999
  • New value for other values → -9999
  • Reclassified grid: write a name for the new classified slope data.

After classifying your data, you need to use QGIS 3.x so you can use Raster layer unique values report tool from Processing toolbox -> Raster Analysis -> Raster layer unique values report

enter image description here

It will create an html report showing every class with the corresponding area in square meter. The following is part of the output (due to privacy issue):

enter image description here

  • @PraxisNFP I updated my answer to show how to reclassify your slope data. Please use @ and my name to see your comment. – ahmadhanb May 31 '18 at 6:49
  • Thanks a lot. I have not done it but damn sure that it will solve my problrm. Thank you. – PraxisNFP May 31 '18 at 9:26
  • @PraxisNFP When the solution works for you, do not forget to accept the answer :) – ahmadhanb May 31 '18 at 11:28

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.