[GRASSLIST:3627] Re: very low fp values problem

Maciek Sieczka werchowyna at pf.pl
Tue Jun 8 12:26:17 EDT 2004


thanks for the detailed explanation!

> Am I correct in assuming that the values in the map are all of a
> magnitude of ten-to-the-minus-N where N is a "large" value (e.g. 10 or
> more)?

yes

> The simplest workaround would be to scale the values by a large
> constant such that printf("%f") retains sufficient accuracy.

could you please explain what is that 'printf("%f")'?

> The maximum value is mapped to an intensity value of exactly 255, but
> rounding error in the lookup probably results in a value of 254.9999,
> which gets truncated to 254.

> I suspect that G__interpolate_color_rule() should probably be rounding
> the result to the nearest integer, rather than truncating it.

absolutely! rounded is closer to the actual value than the trunctated one,
isn't it?

Is there a way to learn about the value range etc. in case of such a low
value raster in Grass 5.03?
Hamish suggested I should try compiling the new version of r.univar in
src/raster/r.univar2 - would that do? (But then I have to go for the Grass
5.3, right?)

Maciek




More information about the grass-user mailing list