[GRASS-user] Looping in GRASS GUI and accessing GUI monitor from command line

Markus Metz markus.metz.giswork at googlemail.com
Mon Jun 20 03:16:21 EDT 2011


Hi Ralf,

the script you use draws all raster maps on the same monitor using the
current region extents. That means that the next d.rast command will
draw a new raster map on top of the raster map of the previous d.rast
command. If all raster maps have identical extents, you will in the
end only see the last map drawn.

You can
1) draw each raster map in its own monitor
2) divide the monitor in frames and put each raster map in its own frame
3) use the GUI (tcl/tk or wx) and manually add all your raster maps to
the layer manager, then (de-)activate the maps as needed. The order in
the layer manager reflects the order of drawing, i.e. the topmost map
will be drawn on top of all other maps.

HTH,

Markus M


2011/6/19 Ralf Schäfer <senator at ecotoxicology.de>:
> Hello,
>
> I think my last post was a bit misleading since I confused some english words.
>
> I was trying to use a loop (not slope!!!) with scripting to display raster data (see below).
> -  Is it possible to display from the command line in the GUI (I found an answer 1 year ago, but may be it is possible now)?
> - is it possible to construct a loop and assign variables in the command console of the GUI (assignment of variables did not work)?
>
> Thanks in advance
> Ralf
>
>
>> I used scripting to store my maps in a variable:
>> my=$(g.mlist type=rast pattern='E14' -r)
>>
>> and then a slope for plotting:
>> d.mon x0
>> for i in $my; do d.rast $i; done
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>


More information about the grass-user mailing list