Feature request #7581
raster calculator really needs support for conditional statements (to allow reclassify rasters)
|Target version:||Future Release - High Priority|
|Platform version:||Pull Request or Patch supplied:||No|
One of the most common tasks a user can do in a raster workflow is to reclassify raster maps.
At this stage the raster calculator does not support conditional statements, so it is not possible to say (for example):
(ASTGTM2_N37W026_dem@1<=30)=1 OR (ASTGTM2_N37W026_dem@1>30)=2 OR (ASTGTM2_N37W026_dem@1>200)=5
the workaround is awful
(ASTGTM2_N37W026_dem@1<=30)*1 + (ASTGTM2_N37W026_dem@1>30)*2 + (ASTGTM2_N37W026_dem@1>200)*3
as the raster calc just return 1 or 0, so the user must multiply for the needed value doing also a few sums along the way (because it is not possible to use conditions).