[GRASS-dev] [GRASS-SVN] r65264 - grass/trunk/lib/cairodriver

Glynn Clements glynn at gclements.plus.com
Thu May 21 01:04:45 PDT 2015


Vaclav Petras wrote:

> Unfortunately knowing that doesn't change for me that
> 
> d.mon cairo output=vectormap.svg width=800 height=800
> d.rast elevation
> 
> looks nicer then
> 
> export GRASS_RENDER_IMMEDIATE=cairo
> export GRASS_RENDER_FILE=vectormap.svg
> export GRASS_WIDTH=800
> export GRASS_HEIGHT=800
> d.rast elevation
> 
> even for scripting.

Whether it "looks nicer" isn't the issue. The d.mon example will
overwrite the user's display settings.

Write a d.mon-based example that preserves the user's display
settings, then see which one looks nicer. Bonus marks if it correctly
handles the case where the script aborts if any command fails.

There were two main reasons why GRASS 7 abandoned the "monitor"
concept, and one of them is that its statefulness made it
next-to-impossible to write *robust* scripts involving display
commands.

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


More information about the grass-dev mailing list