[GRASS-user] r.reclass with floating point result
Glynn Clements
glynn at gclements.plus.com
Thu Oct 21 05:05:35 EDT 2010
Hanlie Pretorius wrote:
> >> So, I have two problems here: 1) I can't get r.reclass to output an
> >> FCELL raster even though its help file suggest that only the input
> >> file needs to be a CELL raster.
> >
> > A reclass table maps integers to integers. You cannot generate a
> > floating-point map by reclassing.
>
> Could you perhaps suggest a method to do so? I tried r.mapcalc, but I
> also got a conversion to integers. Somehow the default raster is an
> integer raster?
r.mapcalc 'c83a_soils_infiltration_mm_per_3_hours = if(c83a_soils == 1,32.7,if(c83a_soils == 2,3,c83a_soils))'
Or you can use r.category to store the values in the category labels
then use:
r.mapcalc 'c83a_soils_infiltration_mm_per_3_hours = @c83a_soils'
Or you can use r.recode.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list