[GRASS5] raster rendering bug

Hi folks,

I seem to remember seeing this sometime in the past, just ran across it
again today.

I have a raster created with 5.7's 'v.to.rast use=val val=123.4'. When
viewed with d.rast in 5.3 or 5.7 and zooming in, it displays incorrectly
(white band) on raster rows containing all the same value.

(r.colors col=rules < 0% red ; 100% red)

d.what.rast gives the correct answer both in & out of the band.

running [in 5.3 now]:
(test1 is the bad version [DCELL])

r.mapcalc test2="float(test1)"

this makes a new FCELL raster which displays properly.
converting this back to DCELL with double() produces a good raster.

but if I run:
r.mapcalc test3=test1

I get a new DCELL raster which still has the problem.

Is v.to.rast writing bad files? is the error limited to the display?

Hamish

(attachments)

rast_err.png

I seem to remember seeing this sometime in the past, just ran across it
again today.

I have a raster created with 5.7's 'v.to.rast use=val val=123.4'. When
viewed with d.rast in 5.3 or 5.7 and zooming in, it displays incorrectly
(white band) on raster rows containing all the same value.

(r.colors col=rules < 0% red ; 100% red)

.. the percentage part of r.colors seems to be the culprit:

r.info:
Data Type: DCELL
Range of data: min = 177.700000 max = 177.700000

r.colors col=rules
Enter rules, "end" when done, "help" if you need it.
fp: Data range is 177.6999999999999886313162278 to 177.6999999999999886313162278

0% red
100% red
end

If I set the rules to

170 red
180 red
end

it displays fine.

Hamish