Bug report #4586

Raster calculator: fails if file name has spaces

Added by Paolo Cavallini almost 13 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Raster Calculator
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:14493

Description

Doing a simple expression like raster1@1 * raster 2@1 fails because one of the filenames has spaces

History

#1 Updated by Giovanni Manghi almost 13 years ago

  • Target version set to Version 1.7.4

#2 Updated by Paolo Cavallini over 12 years ago

  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Affected QGIS version set to master
  • Crashes QGIS or corrupts data set to No

#3 Updated by Paolo Cavallini about 12 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#4 Updated by Marco Hugentobler about 11 years ago

  • Status changed from Open to Feedback

This one should be fixed 2 weeks ago ba86804

Please test and report back.

#5 Updated by Paolo Cavallini about 11 years ago

Now raster names are surrounded by "" when added by double clicking, so the expression works. If they are written by hand without "", however, the result is all 0s

#6 Updated by Paolo Cavallini about 11 years ago

  • Status changed from Feedback to Open

#7 Updated by Jürgen Fischer over 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#8 Updated by Jürgen Fischer over 8 years ago

  • Category changed from C++ Plugins to Plugin Manager

#9 Updated by Jürgen Fischer over 8 years ago

  • Category changed from Plugin Manager to Raster Calculator

#10 Updated by Giovanni Manghi over 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#11 Updated by Alexander Bruy over 6 years ago

  • Status changed from Open to Feedback

IMHO this should be closed, as users should use correct syntax when writing expression by hands.

#12 Updated by Paolo Cavallini over 6 years ago

I don't agree: spaces in filenames are accepted by QGIS, so they should be escaped by calc engine.

#13 Updated by Giovanni Manghi over 6 years ago

Where do we stand with this?

#14 Updated by Paolo Cavallini over 6 years ago

Well, IMHO this is still an usability issue. What is your feeling?

#15 Updated by Jürgen Fischer almost 6 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed/implemented

identifiers with blanks in them have to be quoted - also in in "regular" expressions. So I don't see an issue here.

Also available in: Atom PDF