[GRASS-windows] grass_width, grass_heigt and grass_pngfile

Liu, Huili HLiu at ap.org
Fri Mar 2 15:27:46 EST 2012


Hi grass experts,

I am trying to create a python script to get an image file as below:

#get_img.py
import os.path
import sys # the sys module [2]
from grass.script import core as grass # the core module [3]
def main():
    grass.run_command('d.his i=elevation_shade h=elevation')

if __name__ == "__main__": # this allows the script to be used as a module in other scripts or as a standalone script
    #options, flags = grass.parser() #
    sys.exit(main())

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.

Thanks for an advance!
Willie



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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-windows/attachments/20120302/c26565fa/attachment.html


More information about the grass-windows mailing list