[GRASS5] Re: mapset changing script

Glynn Clements glynn.clements at virgin.net
Wed Jun 9 08:15:58 EDT 2004


Hamish wrote:

> > > Flag for not erasing displays?  I'll often have 20 mapsets within a
> > > location specifying individual study sites, each with common map
> > > names. I then jump between them & d.redraw to quickly have a look at
> > > what is next door.
> > 
> > The main reason for the need to erase the monitor when switching
> > mapsets is that some d.* modules use the current region from the WIND
> > file, while others use the region which is stored on the monitor.
> > 
> > Consequently, it's recommended that you erase the monitor whenever the
> > current region changes. And changing the mapset will typically change
> > the current region.
> 
> Is there anything fundamentally wrong with forcing a "d.redraw" instead
> of a "d.erase" action?
>  (I'm not really arguing to change it, just curious)

Well, d.redraw calls d.erase.

But, in the general case, the commands which are stored in the monitor
won't normally be valid after you've changed the mapset. The case
where two mapsets are essentially just different "versions", with the
same set of maps, is sufficiently special that I'm not sure that it's
worth supporting at all.

In any case, we certainly shouldn't perform an automatic "d.redraw"
when changing mapsets, because it will normally fail. And, if erasing
the monitor when changing mapsets was to be made optional, erasing
should be the default.

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




More information about the grass-dev mailing list