I am trying to create a shapefile with polygons representing areas of different slopes. I am running into some problems using the following workflow.

  1. I start with a digital elevation model and using Raster>Analysis>Slope I am converting to a slope raster.

  2. I am using "Layer Properties" to assign different colors to different slopes. Layer Properties So far everything looks right. enter image description here

  3. Next, I'm using Raster>Conversion>Polygonize. The result shows many polygons where only one field of color existed in the raster. enter image description here I want a single closed polygon for each field of color.

Does anyone know how to achieve this?


3 Answers 3


Assigning new colors to the grid does not mean that the pixel values are categorized. The raster values remain untouched. The polygonize tool does not know anything about this categorization.

So first you need to reclassify the raster. Check this: Link and do it with the Grass r.reclass tool --> it works perfectly. Once you have the ammount of categories you want you can polygonize the raster.


You could classify your raster trough the raster calculator with a simple formula like this:

("Slopes@1" > 15) + ("Slopes@1" > 30) + ("Slopes@1" > 45) + ("Slopes@1" > 60) + ("Slopes@1" > 100)

Each condition returns a 1 if true, so the raster output will have 0 values for source pixels less or equal to 15, 1 values for source pixels greater than 15 but less or equal to 30, 2 values for source pixels greater than 30 but less or equal to 45, etc.

Then, polygonize that raster.


After reclass your data, you can use r.to.vect from GRASS in Processing

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.