Bug report #11682
Raster calculator produces only 0 values with conditional expression
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | - | ||
Category: | Raster Calculator | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 19926 |
Description
Steps to reproduce:
1. Download file from http://webgis.uster.ch/temp/temp_test.tif
2. Create a new project and set EPSG:21781 as projection
3. Open the raster file in the project
4. Open the raster calculator and use the following expression:
(temp_test@1=249)*255 + (temp_test@1<249)*temp_test@1 + (temp_test@1>249)*temp_test@1
Expected outcome is that all raster values with value 249 are replaced with 255 and all other values would stay as they are. The actual outcome is that all values are set to zero.
Related issues
Associated revisions
raster calculator: allow unquoted raster references (fixes #11682)
History
#1 Updated by Andreas Neumann about 10 years ago
Carlos Cerdan suggests in this thread ( http://lists.osgeo.org/pipermail/qgis-user/2014-November/029847.html ) that I may have to reproject my data before using the raster calculator. However, this did not really helps and should not be necessary.
#2 Updated by Giovanni Manghi about 10 years ago
- Target version set to Version 2.8
#3 Updated by Giovanni Manghi about 10 years ago
- Affected QGIS version changed from 2.6.0 to master
#4 Updated by Jürgen Fischer almost 10 years ago
- Status changed from Open to Closed
Fixed in changeset b35a596af47d1f0108eedf014c5c56e34e111b55.