[GRASS5] GRASS environment variables

Markus Neteler neteler at itc.it
Wed Apr 17 11:32:09 EDT 2002


On Wed, Apr 17, 2002 at 05:22:50PM +0200, Markus Neteler wrote:
> Hi,
> 
> the recent change to the environment variables, forcing to evaluate
> g.gisenv in all scripts, leads to a problem for me:
> 
> In some PERL scripts written by other, 
> $loc=$ENV{ LOCATION};
> 
> is used. Since $LOCATION does not exist any more, I have to
> evaluate that in perl as well. Any hints for a perl newbie?
> 
> Thanks,
> 
>  Markus

A followup: Also NVIZ is affected
(Image dump -> Max resolution)

can't read "env(GISDBASE)": no such variable
    while executing
"set last_dir $env(GISDBASE)/$env(LOCATION_NAME)/$env(MAPSET)/images"
    (file
"/mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/etc/nviz2.2/scripts/fileBrowser.tcl"
line 7)
    invoked from within
"source
/mpa_sw/ssi/BIO/software/GRASS5.0.0/grass5bin_cvs/grass5/etc/nviz2.2/scripts/fileBrowser.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $auto_index($name)"
    (procedure "auto_load" line 13)
    invoked from within
"auto_load $name [uplevel 1 {namespace current}]"
    (autoloading "create_file_browser")
    invoked from within
"create_file_browser .file_browser 1"
    invoked from within
".top2.panelarea.menu.file.m.img invoke active"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke active]"
    (procedure "tkMenuInvoke" line 47)
    invoked from within
"tkMenuInvoke .top2.panelarea.menu.file.m.img 1
"
    (command bound to event)

It seems we have to search for env(GISDBASE) and other stuff everywhere.

Markus



More information about the grass-dev mailing list