[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 13:10:20 PST 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 annakrat):
Replying to [comment:13 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.
Thanks for the summary, but I was mainly asking for opinions which one
should we use. I prefer rounding to the nearest integer, even though it
can give different results. Anyone has the same/different opinion?
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2053#comment:14>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list