I have multiple rasters for various data: LULC, Elevation classes, Slope steepnees classes, Soil types.
All those rasters have the same properties: all have the same number of columns and rows; same resolution (25m); same projection; same extent. I have also check for Null values in the dataset, and I don't have any.
Technically, I clipped all those rasters to the extent of shapefile of a study area.
If I count all the pixels belonging for each class, trying to obtain the area for each class and then the total area, the results are differing.
The correct area is 7103 square kilometers. My results are the following:
Elevation and soil classes: 7103 square kilometers
Slope classes (this was derived from the same DEM as elevation): 7089 square kilometers - this is the biggest error
LULC: 7106 square kilometers
What did I do wrong, or how can I fix this? My guess would be that it could be because of the clipping along the border of the study area, and maybe Null pixels are around the border, but then why Elevation and Soil rasters have the correct values, while the others don't?
EDIT: I think I have found the reason for the difference in area, but I don't know how to fix it. In the attached image, the pixels in red are part of the DEM, which are correct and within the study extent. However, when using the "Slope" tool, the result raster is not covering those pixels. The green pixels are the "Slope" ones and they don't overlap the same extent. Any idea how to fix it? Snap didn't work.