Bug report #7206

Raster Calculator doesn't work with spaces in layer names

Added by Jonathan Moules over 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
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

Description

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.

History

#1 Updated by Giovanni Manghi about 7 years ago

  • Priority changed from High to Normal

#2 Updated by Alexander Bruy almost 7 years ago

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

Duplicates #4586

Also available in: Atom PDF