[GRASS-user] Re: r.out.xyz problem floating point

Hamish hamish_b at yahoo.com
Mon Jan 24 19:02:22 EST 2011


Clémentine écrit :
> Is it possible to specify the number of significant digits in
> r.out.xyz?

No, sorry. r.out.xyz is just a wrapper around the r.stats module
which has no option.

the correct solution to the problem, I think, is not to
immediately add a dp= option to r.stats, but rather fix r.stats
for bug #335 ("export floats and doubles with correct
precision"). Or at least fix that before reassessing if a dp=
option is really needed.

currently the code for r.stats in 6.5svn prints out floating point
numbers as "%.10f" (raw_stats.c) and that should probably be
the more flexible "%.7g" for floats and "%.15g" for doubles.

If there are no objections, I'll go ahead and do that.


Hamish



      


More information about the grass-user mailing list