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

Vaclav Petras wenzeslaus at gmail.com
Wed May 20 05:32:35 PDT 2015


On Wed, May 20, 2015 at 7:35 AM, Glynn Clements <glynn at gclements.plus.com>
wrote:
>
>
> Vaclav Petras wrote:
>
> > I think this is exactly what I mean. Any reason for using the variables
> > instead of d.mon?
>
> d.mon isn't something you'd want to use from scripts or other
> programs. Ultimately, d.mon is just causing those environment
> variables to be set whenever you run a display command, so documenting
> the variables themselves is more general than documenting a specific
> mechanism used to set them. And if you don't need the convenience of
> the d.mon interface, setting the variables directly removes some
> complexity from the process.

Okay, so just let me rephrase to make sure I understand correctly. Unless
you something like scripting of d.mon wx0 or you wish to change resolution
as d.mon allows, you should use environmental variables in your scripts.
d.mon is meant to be used for direct/manual usage in command line.

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.

Thanks for the response,
Vaclav

> --
> Glynn Clements <glynn at gclements.plus.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150520/f4e3305e/attachment.html>


More information about the grass-dev mailing list