I am trying to use the Raster Calculator but, I get a raster with Nan values. My rasters are in the same projection system but, one of them, it is a classified landsat map which covers only some part of the other map that I am trying to use. Can I actually do that? They should be of the same extent?
No. Rasters can have different resolutions and extents for use in raster calculator. Not different CRS (projection) though.
- Different projection
- Default extent of output layer is set by first raster in the list which might be different to rasters you use in calculation
- Calculation is always limited only to minimum overlap of extents of all rasters. So if one (or more) of the rasters do not share the extent with others there wont be anything to calculate and all become NULL
- QGIS raster calculator is not able to operate with NULL (NaN) value which means whatever you do NULL in any input raster will become NULL in output