Bug report #7206

Raster Calculator doesn't work with spaces in layer names

Added by Jonathan Moules almost 10 years ago. Updated over 9 years ago.

Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:16247


Using Master 5ed164a

This seems like quite a bad one because it appears to work but actually doesn't give feedback that its not or why not.

The following expression does "work" - it passes "expression valid" and the layer names are correct (I double-clicked them):

((IR [email protected] - RGB [email protected]) / (IR [email protected] + RGB [email protected]))

The problem is, the output result is "0" across the board.

To actually get a proper NDVI result, I need to rename my layers and use this:

(([email protected] - [email protected]) / ([email protected] + [email protected]))

So its not working when layers have spaces in their names.


#1 Updated by Giovanni Manghi over 9 years ago

  • Priority changed from High to Normal

#2 Updated by Alexander Bruy over 9 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

Duplicates #4586

Also available in: Atom PDF