[GRASS5] d.rast behavior

Glynn Clements glynn.clements at virgin.net
Tue Apr 23 16:49:30 EDT 2002


rgrmill at rt66.com wrote:

> The d.rast source contains a couple lines (specifically in 
> src/display/d.rast/cmd/display.c following line 47) that were commented 
> out.  Those lines check for the overlay flag and if it is not set cause 
> d.rast to erase a previously displayed map;

Actually, it erases the entire window (frame), not just any raster
maps which were displayed within it.

> that is the documented behavior of d.rast and the behavior that this
> morning Helena and Jaro wanted reinstituted.
> 
> Does any one have a reason why d.rast shouldn't be reverted to it's 
> documented behavior?

The only reason which springs to mind is that the user might wish to
retain something which is displayed in the portion of the frame which
isn't overwritten, e.g. a legend. I've occasionally used an extreme
aspect ratio to ensure that d.rast *didn't* overwrite a legend.

As it stands, the user can have either behaviour; "d.rast ..." alone
just draws the raster, "d.erase ; d.rast ..." clears the window and
draws the raster.

Also, if the behaviour is so desirable when run without "-o", why not
when run with "-o"? Of course, getting it right for "-o" is much
harder to implement, but that doesn't mean that the issue ceases to
exist.

A related issue is whether "-o" should be the default behaviour, with
e.g. "-n" for "fill null cells". The existing behaviour is largely an
artifact of the lack of a distinct no-data value in 4.x, where only
the user knew if zero was zero or no-data.

IMHO, this should be addressed before release; it isn't practical to
change it afterwards.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list