4

I would like to delete several values as they are equal to zero. In my example, 0 -5 - 6 - 7 - 8 ...

I couldn't find an answer on the internet.

enter image description here

6

If you right-click the layer and press Save As, at the bottom of the Save As dialog you can define custom NoData-ranges. That way you can save a copy of the raster where those numbers are considered as NoData (I think it needs to be a single band raster for this though.)

If you have SAGA GIS installed, you can use Reclassify Grid Values in the Processing Toolbox.

[edit 2] It seems the table method in the SAGA module is the simplest one. Just select Simple table as method, and click the button shown in the image below. There you can map up what ranges you want to change into what in one go:

Simple table GUI

Be sure to uncheck the box "Replace other values" as well if you want to keep the values that you are not reclassing. I'll keep my original edit showing the range method below for completeness.

[edit]

Here is an image showing the SAGA reclass tool where I'm using the Range method to reclass all cell values in the range 0 to 10 to 10. As you can see I've chosen Range as method, and but min value as 0 and max value as 10 to be reclassified, and the output value as 10.

SAGA Reclass with range

You would have to chain these if you want to reclass several values. For example, say you would want to reclass 1-3 to 1, 4-6 to 2, and 7-9 to 3. You could first reclassify your raster with the range 1 to 3 to 2, and then take that output and reclassify the range 4-6 to 2 in that, and so on.

The method Table might be a more effective way of doing this, but I've never used it myself.

8
  • Thanks for your answer. I tried the first solution, but then it merges my classes 1 - 2 - 3 into one class. While I want to keep them seperate!
    – Morgane B
    Oct 22 '15 at 7:26
  • Please, any other advice?
    – Morgane B
    Oct 22 '15 at 8:19
  • Then you probably need to install SAGA or GRASS. It's pretty easy to do if you use the OSGeo4W Network Installer from the QGIS download site: qgis.org/en/site/forusers/download.html
    – hexamon
    Oct 22 '15 at 8:35
  • Ok, I've installed SAGA. But I can't work with .tiff and I don't really understand how the Reclassify Grid Values works...
    – Morgane B
    Oct 22 '15 at 11:06
  • I've updated my answer with info on the reclassify tool.
    – hexamon
    Oct 22 '15 at 11:52

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.