[GRASS-user] v.out.ascii output is different than the original ascii raster

Maciek Sieczka werchowyna at epf.pl
Sun May 21 15:57:37 EDT 2006


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).

Eg. the first floating point value in dem.asc is:

	104.999999999197

while in dem2.asc it's:

	104.9999999991970014

The 2nd one in dem.asc:

	104.999999999756

and the 2nd in dem2.asc:

	104.9999999997559996

And so on, all of them. Why aren't they equal?

I'm using r.out.ascii and r.in.ascii in a script to interface with
external program and I would expect Grass to preserve exact values.

A bug?

Maciek


--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dem.asc.bz2
Type: application/octet-stream
Size: 13992 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20060521/bb4effa2/dem.asc.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dem2.asc.bz2
Type: application/octet-stream
Size: 16906 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20060521/bb4effa2/dem2.asc.obj


More information about the grass-user mailing list