[GRASS-dev] Grass Variables/ Perl

"Peter Löwe" peter.loewe at gmx.de
Thu Aug 3 04:01:11 EDT 2006


>%ENV gives you the environment variables,

>if ($ENV{GISBASE}){
>    &main();
>}
>else {
>    print "You have to run GRASS first!"
>}
>
>you can also read from stdin:
>
>@region = `g.region -g`

Hello Jachym,

that's true. However, neither `export GRASS_WIDTH=42` nor system "export GRASS_WIDTH=42" can be used to set the variables for later commands to make use of the settings (aka generate a huge PNG). Within the GRASS environment, the GRASS_HEIGHT/WIDTH will still default to 640/480.
A remarkably awkward workaround would be to create a shell-script from within the perl environment and run it later. but i believe theremust be a better way.

Peter
-- 
Dr. Peter Löwe

Diplom-Geograph

<loewe at geomancers.net>
<peter.loewe at gmx.de>





Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl




More information about the grass-dev mailing list