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

Ralf Schäfer senator at ecotoxicology.de
Mon Jun 20 03:40:25 EDT 2011


Hi Markus,

thanks for your quick response!

> 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.

I apologize for being not specific enough. I have set the g.region to the total area of all raster maps (from a vector map) and plot single tiles of raster data (ASTER DEM). I use the "-o" flag so that I can see all plotted raster data, that works fine. So basically I combine the ASTER DEM tiles and this works with the loop.

What I have not understood:
-Can I plot from the Shell command line (Terminal on Mac OS X) in the wxGUI graphics window now (1 year ago it was not possible according to a post - but I am wondering whether there should not be a way to address the wxGUI - other commands on the Shell command line also affect the project in the wxGUI (region and project settings)?
At the moment I can run the loop only in the SHell command line and  plot only in tcl/tk graphics window - not in the wxGUI graphics monitor.

> 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. 

Yes, my question was here: Can I run the script loop somehow inside the wxGUI to automatise the opening of raster maps? Inside the wxGUI there is a "command console" in the GRASS GIS Layer manager.
But not all commands that work on the Shell command line work in the wxGUI Command console - and I am wondering whether it is possible to construct a simple loop there. My script failed in the first step when I try to assign a variable:
>> my=$(g.mlist type=rast pattern='E14' -r)

Best regards
Ralf













More information about the grass-user mailing list