[GRASS-windows] grass_width, grass_heigt and grass_pngfile

Markus Neteler neteler at osgeo.org
Sun Mar 4 04:22:09 EST 2012

On Sat, Mar 3, 2012 at 5:15 PM, Glynn Clements <glynn at gclements.plus.com> wrote:
> Liu, Huili wrote:
>> I am trying to create a python script to get an image file as below:
>> But I got the default image file name,  map.png with GRASS_WIDTH=640 and GRASS_HEIGHT=480.
>> Is there any way for me to setup  width and height and my image file name in grass.run_command?
>> I searched the doc for a while but I still can not get a correct syntax.
>        import os
>        os.environ['GRASS_PNGFILE'] = filename
>        os.environ['GRASS_WIDTH'] = str(width)
>        os.environ['GRASS_HEIGHT'] = str(height)

Added in rudimentary form to the Wiki page:

(feel free to improve there, just requires registration in the Wiki)


More information about the grass-windows mailing list