[GRASS-dev] Re: [SoC] GSoC Week 5 Report: Graphical User Interface for the hydrological tools r.stream* in GRASS GIS

Luca Delucchi lucadeluge at gmail.com
Fri Jun 24 02:47:33 EDT 2011


2011/6/24 Margherita Di Leo <dileomargherita at gmail.com>:
> Hi all,
>

Hi madi

> 2) How to convert the output of the command in a png file and how to export
> it in the temporary folder in G7? In grass 6.5 I simply would do:
>
>     grass.run_command( 'd.mon', start = 'x0' )
>     grass.run_command( 'd.rast', map = 'sc_elev' )
>     grass.run_command( 'd.out.file', output = os.path.join(fpath, prefix +
> '_elevation'), format = 'png', resolution = 2, flags = 't' )
>

for this you can use d.rast and environment variables, look here [0]

# Define driver settings (here: bash shell syntax)
export GRASS_RENDER_IMMEDIATE=PNG
export GRASS_TRUECOLOR=TRUE

# Display raster map and vector polygons
d.rast sc_elev

> Thanks for any suggestion..
>
> madi
>

[0] http://grass.osgeo.org/grass70/manuals/html70_user/pngdriver.html

-- 
best
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org


More information about the grass-dev mailing list