Is there a way to perform a reclassify of a raster image in QGIS?

In ArcGIS you can do that in Spatial analyst Tools→Reclass→Reclassify

Any ideas?

screenshot of Reclassify window


Using GRASS and the r.reclass module, yes. However, you actually need to use the keyword "thru".

Example: For a raster elevation grid, to be reclassified into values based on 100m-intervals:

500 thru 599.99 = 500

600 thru 699.99 = 600

700 thru 799.99 = 700

Etc.. And you save that into a notepad text document(with no spaces between lines). Then when opening the r.reclass module, you will simply load that rulefile into the gui and away you go.

Experience: I just performed a reclassification on a DEM for my thesis project in Tajikistan over the weekend using this method and it worked a treat.

*Note(caveat): You might look into modeling this process or even using GDAL to output a *.prj file alongside the output for use in Arc, as the outputs I've seen from this thus far contain no projection definition readable by Arc. If you're sticking with QGIS, tho, then you should be good-to-go.

One more thing, as with any QGIS/GRASS/GDAL processes, ensure you have downloaded the OSGeo4W Installer which ensures you have everything up-to-date: http://trac.osgeo.org/osgeo4w/

Hope this helps.

  • 3
    r.reclass only accepts integers
    – nickves
    Apr 3 '13 at 23:26
  • Just used GRASS r.reclass on a 12 million pixel slope raster with a reclass rules text file (5 secs), then polygonize (10 mins), and this solved a problem with holes using other methods. GDAL_contour of a raster with -amin, -amax and -p gives a better result, but takes days! Smoothing the polygons from rasters gives a perfectly acceptable result, with good geometry. Correct to remind us that integers are needed, but not a significant problem if you use raster and/or field calculator to get real values after polygonizing. Feb 25 '20 at 3:26

I was able to reclassify a raster using the raster calculator

Here the "Habitat" raster is reclassed from continuous values (0-1) to discrete values of 1,2,3

("Habitat@1"  < 0.3)* 1 + (("Habitat@1" >= 0.3) AND ("Habitat@1" < 0.6)) *2  + ("Habitat@1"  >=0.6)* 3

QGIS now has two native raster reclassify algorithms

Reclassify by layer - allows you to use a vector layer to dictate your ranges

Reclassify by table - works much like ArcGIS raster reclassify spatial analyst tool.

These were added in QGIS 3.2 see the change log here.

  • 4
    Reclassify by table is an exact copy of the ArcGIS tool. This should be an accepted answer. Jul 5 '20 at 7:57
  • Reclassify By Table / "native:reclassifybytable" is simple to use and easy to understand. I agree this should be the accepted answer.
    – grego
    Oct 19 '21 at 21:28

With the Advanced Interface option of the toolbox, I use the Reclassify Grid Values from the SAGA GIS, It a really intuitive tool with options of reclassification by single value, range and using a table.

I prefer this over the r.reclass because you do not have to create additional files.


The easier way is to use GRASS (also using the QGIS/GRASS plugin) and the r.reclass module.

You will need to create a reclassification rule file, where you can use the keyword "through" or the wildcard "*" to reclassify multiple values in one rule.


I guess my post doesn´t aswer the question accurately, but it could maybe provide some help. I haven´t found a simple way to do this in QGIS, like Bryce I use GRASS modules. However, if have ArcGIS but no Spatial Analyst, there´s another great tool: GME (http://www.spatialecology.com/gme/). It´s dependent on ArcGIS and R and has a multitude of really great features, one of them beeing 'reclassify'. Here, just like in GRASS, you need to create a text file containing the class definitions. I´ve used ArcMap to visualize the raster in question in different ways first to get a better idea of what the data looks like. Then I´ve defined the new classes based on that info. Its worked like a charm for me. I don´t know if GME will run on a system without ArcGIS, I´d be curious to know.


Raster calculator is your best bet if you don't like grass interface

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