[GRASS-dev] Re: grass-dev Digest, Vol 42, Issue 42

Michael Barton michael.barton at asu.edu
Fri Oct 16 12:47:45 EDT 2009

On Oct 16, 2009, at 7:33 AM, grass-dev-request at lists.osgeo.org wrote:

> Date: Fri, 16 Oct 2009 12:08:48 +0200
> From: Martin Landa <landa.martin at gmail.com>
> Subject: Re: [GRASS-dev] wxGUI: "Save display to graphic file" and
>        d.out.file      options
> To: Markus Neteler <neteler at osgeo.org>
> Cc: GRASS developers list <grass-dev at lists.osgeo.org>
> Message-ID:
>        <f8fe65c40910160308wf56281ck9131d2d0b3b30148 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> Hi,
> 2009/10/16 Markus Neteler <neteler at osgeo.org>:
>> resolution and such. Since d.out.file already generates wxpython code
>> could it be recycled in the GUI? (d.out.file fails and wants an X  
>> monitor).
> is there any reason why d.out.file requires X monitors? It would be
> cool to have d.out.file also in GRASS7.
> Martin

d.out.file started it's life as d.out.png, a script I wrote to create  
a graphics file from a GRASS screen display, way back in the early  
days of GRASS 5. It uses the command history function that requires an  
xmon to recreate the command sequence that produces the graphic  
display with the output set to PNG instead of an xmon. This does not  
work in the TclTk GUI or in wxPython because of the xmon requirement.

To make this work, it would need to be rewritten inside the GUI where  
it could capture the sequence of display commands from the rendering  
module and redirect them to a named graphic file instead of the  
internal PNM file that is displayed in the canvas. In that code, you  
could alter the output resolution by changing GRASS environmental  
variables to something other than screen resolution.

This is not an extremely difficult task, and I'd support putting it  
into the GRASS 7 queue as a desirable enhancement.


More information about the grass-dev mailing list