[GRASS-dev] select issue with wingrass
Glynn Clements
glynn at gclements.plus.com
Sun Nov 18 12:32:48 EST 2007
Moritz Lennert wrote:
> select.tcl uses both the GISDBASE and MAPSET env variables. However,
> neither seem to be defined in wingrass (Init.sh sets them, but Init.bat
> doesn't).
Init.sh sets them as shell variables; they aren't exported to the
environment.
> So I tried the following:
>
> - enter GRASS
> - set GISDBASE=c:\GRASSDATA
> - run in tclsh
> % set location_path "$env(GISDBASE)/$env(LOCATION_NAME)/'
> % set dir "user1"
> % set element "vector"
> % set path "$location_path/$dir/$element/
> % glob -nocomplain $path/*
>
> This returns nothing.
> When I set GISDBASE=c:/GRASSDATA (forward slash), it returns the list of
> complete paths to all elements.
[I missed this part before.]
That makes sense. Tcl uses forward slash internally on all platforms.
It suspect that it requires the use of "file normalize ..." on
Windows.
> However, when I set GISDBASE and MAPSET at the command line before
> launching gis.m this does not solve the problem of nothing being listed in
> the select windows...
Yep; the startup code sets env(GISDBASE) etc via g.gisenv, which will
override any external settings (which shouldn't be there anyhow).
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list