[GRASS-dev] [GRASS GIS] #2053: r.recode: 0.0 or 1.0 as limits do not seem to be taken into account
GRASS GIS
trac at osgeo.org
Sun Nov 2 00:06:30 PDT 2014
#2053: r.recode: 0.0 or 1.0 as limits do not seem to be taken into account
----------------------------------------------------+-----------------------
Reporter: nikosa | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: unspecified
Keywords: r.recode, DCELL, CELL, rules, needinfo | Platform: Unspecified
Cpu: Unspecified |
----------------------------------------------------+-----------------------
Comment(by glynn):
Replying to [comment:12 annakrat]:
> I attached the diff for this, I decided for floor(x+0.5) logic (but we
could use just floor if someone is against this). I would rather get some
approval from other developers for this.
The advantage of floor() is that it will produce identical results to the
existing implementation for positive values.
The main disadvantage of floor() is that minuscule rounding errors can
result in the wrong value, e.g. (CELL)floor(1.9999999) is 1 rather than 2.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2053#comment:13>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list