0

I am creating a land cover raster using QGIS 3. I have developed a bunch of land classes but I would like to lump some features together to reduce the number of classes I have. I have been using a provincial forestry layer, canopy height models and a Depth to Water index. With these rasters, I have been mapping out landcover/vegetation community data.

Each raster has the following codes (just giving examples, and not listing all of them).

1 number codes (Land cover) 1 - Agriculture 2-Barrens 3-Cutovers 4 - softwood Forests 5 - hardwood forests 6-mixedwood forests 7 - urban 8 ...etc etc.

10 number codes (wetness class):

0 - well drained soils 10 - poorly drained soils (wetland conditions)

100 Height Classes

100 - Herbaceous (0-1 m vegetation height) 200 - Regenerative/shrub (1 - 6 m vegetation height) 300 - Immature/young forests (6 - 11 m vegetation height) 400 - Mature forests (>11 m vegetation height)

I then added all rasters together using the Raster Calculator and for the most part, got results I wanted. For example:

415 - Mature Hardwood forested wetland 113 - herbaceous cutover wetland etc.

The issue is that in some cases I get values that don't make sense. For example, I may get a code such as 117 which would indicate a wet urban area. In cases like this, I would like to 'override' these values so all urban areas (regardless if wet or not) are grouped together.

I tried using the reclassify by table tool but it didn't seem to work. Most of my values will stay the same, I just want to change a select few.

Ideas?

1 Answer 1

1

Reclassify by table is exactly what you need. Here is how you could merge classes (pixel values) 1 and 5 to class 4. Make sure that you press OK and not Back (blue arrow), otherwise the results will not be saved:

enter image description here

Also make sure that you select the correct parameters (depends on your raster):

enter image description here

2
  • Thanks but it doesn't seem to change any of the values for some reason. Do I have to type in all the values, even the ones that don't change? Or do I just need to type in the values that I need to change?
    – Erioderma
    Feb 28, 2022 at 20:47
  • @Erioderma Only those that are needed. You may upload a small sample of your data for testing. Mar 1, 2022 at 4:08

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.