[GRASS5] $LOCATION or not $LOCATION ?

Helena hmitaso at unity.ncsu.edu
Wed May 15 10:45:46 EDT 2002


Glynn Clements wrote:

> Markus Neteler wrote:
>
> > for some time the $LOCATION variable is gone now and must
> > be constructed with 'g.gisenv'. As far as I know the underlying
> > idea was to allow for GRASS parallel sessions.
>
> The motivation was to allow changing the location/mapset within a
> session.

This is a pretty big (and welcome) change which is not explained anywhere
and not really tested, so I would very much encourage everybody to run
their
scripts and programs to see what kind of problems it may (or hopefully
will not) create.


> > Since that feature is not (yet) functional,
>
> AFAICT, it is functional:
>
>         g.gisenv set=LOCATION_NAME=spearfish
>         d.rast elevation.dem
>         g.gisenv set=LOCATION_NAME=global
>         d.rast nations
>
> Except that anything which uses the monitor's "list" pad (auto-redraw,
> d.save, d.redraw etc) won't work. But that's a fundamental design
> flaw, with no simple fix.
>
> Note that the above example would have worked before the settings were
> removed from Init.sh. However, anything which used the environment
> variables (e.g. tcltkgrass, nviz, and most scripts) would continue to
> use the settings with which the session was started.

this is really confusing and if we want to keep the change it needs to be
clearly
explained at a prominent place when downloading the new release. Do I
understand
it correctly that in the previous example if I do

nviz nations

the map won't be there because nviz would still use the original LOCATION?

Do the current scripts released with GRASS which use $LOCATION work
correctly? -
or what is the correct behavior - as I understand it they would use the
original LOCATION
and not the one set by g.gisenv?
Or am I completely missing something here?

Helena

>
>
> Reflecting $GISRC into the environment was a partial work-around for
> broken programs. The simplest way to find the bugs is to remove the
> work-around.
>
> > should we re-enable
> > the $LOCATION (e.g. in ETC/Init.sh) until GRASS parallel sessions
> > become possible? $LOCATION is pretty often used and quite
> > convenient over constructing (more or less) on the fly with g.gisenv.
>
> No.
>
> If users want to set LOCATION for their own use, they can do it in
> ~/.grass.bashrc. If it's set in Init.sh, there's a danger that it
> might get used by programs or scripts.
>
> --
> Glynn Clements <glynn.clements at virgin.net>
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5




More information about the grass-dev mailing list