[GRASS-dev] GRASS_RENDER_IMMEDIATE in GRASS7

Glynn Clements glynn at gclements.plus.com
Fri Jul 8 00:35:41 EDT 2011


Martin Landa wrote:

> AFAIU GRASS_RENDER_IMMEDIATE is used in GRASS7 to set up the display
> driver, e.g. `cairo` or `ps`. Values TRUE or FALSE are ignored. In
> this case I would suggest to rename this variable to GRASS_DISPLAY or
> something similar.

Note that 6.x also understands e.g. "GRASS_RENDER_IMMEDIATE=PS" (the
only "immediate" drivers available in 6.x are PNG and PS; others
require the use of a monitor).

IOW, the usage is the same in 6.x and 7.0, except that 7.0 doesn't
recognise "FALSE" (you'll just get the default driver; cairo if it's
available, PNG otherwise).

But if we don't need compatibility, the names can be whatever we want.

> Similarly GRASS_PNGFILE is used in cairo to set up for e.g. pdf file
> (GRASS_PNGFILE=map.pdf), `ps` drivers defines GRASS_PSFILE. I would
> suggest to use only one - generic variable, something like
> GRASS_MAPFILE, GRASS_OUTFILE or GRASS_FILENAME.
> 
> Any opinions?

I have no particular opinion on the exact names. However, before
changing anything, we might want to consider whether these should be
environment variables or GRASS variables.

Over the years, GRASS has "collected" environment variables like
people collect stamps or coins, and the collection has become rather
large.

Some of these environment variables might be better off as GRASS
variables; this would allow them to be controlled through modules,
rather than requiring the user to set them on the command line.

The downside is that scripts (and wxGUI) would need to create a
temporary $GISRC file rather than just using a modified environment.

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


More information about the grass-dev mailing list