I've started to use Qgis recently. I have a logical question. I'm trying to reclassify a raster. The values in the raster are depths, obtained by an interpolation. The original depth values (of the vector) are: 1 = <30° 2 = 30°-60° 3 = >60° after the interpolation with IDW I get a set of continuous values and I need to convert them into discrete ones. If I round up/down the continuous values I will obtain an over-estimation of the central values (2) Is there a better (more logical) method to reclassify this values?
We may view 1, 2, 3 as coarse representations of the original depths where 1 represents 15 degrees, 2 is 45 degrees, and 3 is 75 degrees (all to within plus or minus 15 degrees). To coarsen the IDW results in the same way, note that 30 degrees would translate to a coarse value of 1.5 (halfway between 15 and 45 degrees) and 60 degrees would translate to 2.5. Therefore, simply add 0.5 and truncate the result. This is readily done in the QGIS raster calculator using an expression like
By checking the special cases 1.5 and 2.5 it is clear that all interpolated values less than 1.5 will be reclassified to 1 and all interpolated values greater than or equal to 2.5 will be reclassified to 3.
As Jake points out in a comment, these data are so coarse that the results won't be very accurate. Using other forms of interpolation won't help much. Interpolating the midpoints will make no difference whatsoever because replacing 1 by 15, 2 by 45, and 3 by 75 is mathematically the same as multiplying by 30 and subtracting 15: this linear change won't affect most interpolation methods, including IDW (and it shouldn't, because it's just a way of re-expressing exactly the same numbers using a different unit of measurement). You would be better off interpolating the original pre-coarsened depth values and then reclassifying the resulting grid if need be.