#2053: r.recode is buggy when minimum "from=0.0"
------------------------------------------+---------------------------------
Reporter: nikosa | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: unspecified
Keywords: r.recode, DCELL, CELL, rules | Platform: Unspecified
Cpu: Unspecified |
------------------------------------------+---------------------------------
Attempting to recode a double precision raster map to an integer by either
using a "rules" file or directly using "...<< EOF" with the following
sequence "0.0:1.0:0:255" does not work. Both stats and histogram of the
recoded raster map, e.g. a recoded image derived from a Red-Reflectance
image ranging in
{{{
min=0
max=0.774115699104528
}}}
are flattened out! The only values to be found in the recoded image are 0
and 255. However, using a minimum "from=" value of "0.001" produces the
expected recoded image, i.e. using a rules file that contains
{{{
0.001:1.0:0:255
}}}
produces a recoded image which is composed by many integer values, i.e.
ranging from 5 up to 197. The histogram of this recoded image looks
"nice" as well.
See also: [http://lists.osgeo.org/pipermail/grass-
dev/2013-August/065280.html]. Tested in GRASS 6.4.4svn, GRASS 7.0.svn
revision=57312
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2053>
GRASS GIS <http://grass.osgeo.org>