[GRASS-dev] g.mapset calling D_erase() ?

Glynn Clements glynn at gclements.plus.com
Fri Feb 8 17:30:34 EST 2008


Hamish wrote:

> g.mapset calls D_erase(), should it?

No. Nor should it call any R_* or D_* functions.

> Obviously the display will be stale after changing the mapset, but for me
> a typical use is to drop into the PERMANENT mapset for a minute to adjust
> something (say g.region -s or g.setproj), then back to my normal session.
> 
> any thoughts? Should g.mapset be like a soft-reboot of the GIS or a
> simple call to g.gisenv? Is it worth it to add a flag to g.mapset to
> skip the D_erase()?

Even if the existing behaviour is desirable, it should probably be
implemented by spawning d.erase rather than linking directly against
the raster and display libraries.

BTW, if you run g.mapset with GRASS_RENDER_IMMEDIATE=TRUE, you get a
chunk of libpngdriver boilerplate for each line in etc/monitorcap. 
(i.e. it calls R_open_driver() for each monitor; with
GRASS_RENDER_IMMEDIATE=TRUE, R_open_driver() never fails).

Another day, another example of a GRASS module which tries to do
something "clever" and ends up doing something stupid.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list