[GRASS-dev] [GRASS GIS] #2053: r.recode: 0.0 or 1.0 as limits do not seem to be taken into account

Paulo van Breugel p.vanbreugel at gmail.com
Sun Nov 2 23:53:05 PST 2014


On Sun, Nov 2, 2014 at 10:10 PM, GRASS GIS <trac at osgeo.org> wrote:

> #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?
>

+1 for rounding to the nearest integer

>
> --
> Ticket URL: <http://trac.osgeo.org/grass/ticket/2053#comment:14>
> GRASS GIS <http://grass.osgeo.org>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20141103/b0f376f6/attachment.html>


More information about the grass-dev mailing list