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.

Possible issues:

  1. Different projection
  2. Default extent of output layer is set by first raster in the list which might be different to rasters you use in calculation
  3. 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
  4. 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

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.