[GRASS-user] v.out.ascii output is different than the original
ascii raster
Maciek Sieczka
werchowyna at epf.pl
Wed May 24 17:12:59 EDT 2006
On Sun, 21 May 2006 23:09:14 +0200 (CEST)
Roger Bivand <Roger.Bivand at nhh.no> wrote:
> On Sun, 21 May 2006, Maciek Sieczka wrote:
>
> > Hi,
> >
> > I've got double floating point Grass ASCII raster (dem.asc,
> > attached).
> >
> > I do:
> >
> > r.in.ascii -d input=dem.asc output=dem
> >
> > r.out.ascii input=dem output=dem2.asc
> >
> > and compare dem.asc vs dem2.asc, to notice that all values in
> > dem2.asc (attached) are slightly different (sometimes lower,
> > sometimes higher).
<snip>
> > A bug?
>
> No, the result of representing the input ASCII as a double (which
> will include fuzz), and writing it out with more digits of fuzz. The
> R FAQ sums it up nicely:
>
> http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
>
> or a link refered to there:
>
> http://docs.sun.com/source/806-3568/ncg_goldberg.html
>
> To a computer using 64 bits for a double, both will look the same
> within machine precision, so the tiny difference should have no
> practical impact.
>
> Hope this helps,
Yes, absolutely. Thank you very much!
Best,
Maciek
--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/
More information about the grass-user
mailing list