[GRASS-windows] grass_width, grass_heigt and grass_pngfile

Liu, Huili HLiu at ap.org
Sun Mar 4 08:18:38 EST 2012


It works. Thanks Markus for your help.
-Willie
________________________________________
From: grass-windows-bounces at lists.osgeo.org [grass-windows-bounces at lists.osgeo.org] on behalf of Markus Neteler [neteler at osgeo.org]
Sent: Sunday, March 04, 2012 4:22 AM
To: Glynn Clements
Cc: Liu, Huili; grass-windows at lists.osgeo.org
Subject: Re: [GRASS-windows] grass_width, grass_heigt and grass_pngfile

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:
http://grass.osgeo.org/wiki/GRASS_and_Python#Controlling_the_PNG_display_driver

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

Markus
_______________________________________________
grass-windows mailing list
grass-windows at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-windows


The information contained in this communication is intended for the use
of the designated recipients named above. If the reader of this 
communication is not the intended recipient, you are hereby notified
that you have received this communication in error, and that any review,
dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this communication in error, please 
notify The Associated Press immediately by telephone at +1-212-621-1898 
and delete this email. Thank you.
[IP_US_DISC]

msk dccc60c6d2c3a6438f0cf467d9a4938



More information about the grass-windows mailing list