I'm trying to use ximgview for the first time but when I use this code: export GRASS_PNGFILE=map.bmp d.erase ximgview map.bmp & d.rast mde d.vect countries type=boundary export GRASS_PNG_MAPPED=TRUE
d.vect erases the mde raster map (the same with type=centroids). It draws what it is supposed to draw but erasing (covering?) the previous layer. I made a mistake or is ximgview just for simple stuff? Is there any possibility of keeping d.mon in grass 7.0 to support old scripts? Thanks El mié, 02-02-2011 a las 09:56 +0000, Glynn Clements escribió: > Patrick_schirmer wrote: > > > Does someone know how translate previous display commands into GRASS70, > > i.e. integrate a py-script that is called > > "d.mon x1=start" (or similar) into GRASS70 doing these command: > > > > #####start display in GRASS7.0 > > export GRASS_PNGFILE=map.bmp > > d.erase > > ximgview map.bmp & > > export GRASS_PNG_MAPPED=TRUE > > It can't be done that way. A program (or script) cannot change the > environment of its parent (e.g. the shell). This is why "export" has > to be a shell built-in rather than a program. > > You could write a *shell* script which is "source"d rather than > executed, or you could write a script which sets the environment > variables then spawns a new shell. > > But the only way that a "d.mon" program could be made to work would be > to change the drivers to read the settings from $GISRC rather than the > environment. > > However, environment variables are more convenient for scripts and the > GUI. Checking for environment variables first then $GISRC second would > satisfy both use cases, but could be confusing for the user, as the > $GISRC settings would be ignored if one of the environment variables > was set. > _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
