Re: [GRASS-user] r.reclass with floating point result
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 gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.reclass with floating point result
2010/10/19, Glynn Clements gl...@gclements.plus.com: 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? -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.reclass with floating point result
Hi, I'm trying to reclassify a raster with these categories: |#|description |- |1|Sandy Loam |2|Sandy Clay Loam |*|no data To this: |#|description |- |1|32.7 |2|3 |*|no data So, I use a text file with the followin rules: 1 = 32.7 2 = 3 And the command r.reclass --overwrite input=c83a_soils output=c83a_soils_infiltration_mm_per_3_hours rules=infiltration_reclass_mm3hr.txt title=Saturated infiltration rate in mm per 3 hours 33.20 rounded up to 33 (Tue Oct 19 15:46:10 2010) Command finished (1 sec) The result is a raster with: | #|description |- | 3| |33| | *|no data I have also tried a rule file that says: 1 = 32.7 Sandy Loam 2 = 3 Sandy Clay Loam With the result | #|description |- | 3|Sandy Clay Loam |33|Sandy Loam | *|no data 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. 2) I don't understand how r.reclass uses the rules file. Can someone perhaps help me? Thanks Hanlie ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.reclass with floating point result
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. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user