I'm developing a QGIS plugin where users can enter some parameters (like distance, depth, area...) and by submiting the plugin interact with a PostGIS database and extract informations form vector and raster layers.
I want to classify a DEM raster by substituting the pixel values, for example:
If 200 < val < 210 Then val = 205
If 211 < val < 220 Then val = 215
This classification is based on the value entered by users using a TextBox or LineEdit
I'm using the query bellow and it's working but manually not automatically:
This query took 2 seconds for a DEM raster with (X:6000 , Y:5000) and (MIN(val):200,MAX(val):2400)
So each time I need to specify the gap.
Is there any way to allow to users to specify the interval they want to be applied for all values of raster?