1

This question already has an answer here:

I am very new to QGIS for the primary purpose of creating a slopes layer so we know where slopes are above 15% or 20% or whatever we finally decide.

I have used our DEM to create a slope geotif and have used that to try and create a classified layer, but that is where my problems seem to begin. I used this formula to create my classified layer ((slope@1 < 15) OR (slope@1 > 60)) = 0 and while I get a new layer I am not able to view it, no matter how I manipulate the properites. I also tried to follow the instructions for the display that says to do this:

9.4.16. Setting the style for the reclassified layers

  • Open the Style tab in the layer’s Properties dialog as usual.
  • Under the heading Load min / max values from band, select the Actual (slower) radio button.
  • Click the Load button.

The Custom min / max values fields should now populate with 0 and 1, respectively. (If they do not, then there was a mistake with your reclassification of the data, and you will need to go over that part again.)

  • Under the heading Contrast enhancement, set the Current dropdown list to Stretch To MinMax.
  • Click OK.

I do not come up with the 0 and 1 that the instructions speak of (I am not using their tutorial data) but it seems that I should be able to see the layer.

marked as duplicate by Andre Silva, whyzar, xunilk, ArMoraer, aldo_tapia Jan 3 '18 at 10:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Which values do you get? The raster created by our formula is binary. A cell can only be 0 or 1. – underdark Jun 6 '14 at 19:28
  • 1
    To follow along with @underdark's comment, it sounds like the step before (9.4.15) is where you have a problem. What are the values in your slope tiff? Are they integers between 0 and 100, or are they decimal between 0 and 1? If the latter, that formula is going to set your entire raster to 0 since all values are less than one (and therefore less than 15). – Chris W Jun 7 '14 at 2:23
1

It might be easiest just to adjust the rendering styles of your DEM with Layer-Properties-Style. So no need to create new layers but you can play with colours on-the-fly. See the image below. Don't pay attention to labels, the values are what are used for classification. Classes 0-20, 20-30 and 30-40 are painted with colours, all above 40 is white. It is often fastest to get a usable sketch by doing preliminary classification with the "Classify" button and fine tune the result by adjusting class ranges and colours manually.

DEM classified with QGIS

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