[GRASS5] g.region region= bug

Hi,

I found an (at least undesired) error which prevents
me from setting the region to settings stored in other than
current mapset (Spearfish example):

GRASS 6.0.cvs:~ > g.region region=county
ERROR: can't read region <county> in <PERMANENT>

GRASS 6.0.cvs:~ > g.gisenv |grep -i mapset
MAPSET='user1';

-> we are in user1, not in PERMANENT

GRASS 6.0.cvs:~ > g.list region
----------------------------------------------
region definition files available in mapset user1:
zoom_temp

region definition files available in mapset PERMANENT:
9961 county subregion.NW

---------------
Related code of general/g.region/cmd/main.c :

  /* region= */
  if (name = parm.region->answer)
  {
    mapset = G_find_file ("windows", name, "");
    if (!mapset)
      G_fatal_error ("region <%s> not found", name);
    if (G__get_window (&window, "windows", name, mapset) != NULL)
      G_fatal_error ("can't read region <%s> in <%s>", name, mapset);
  }

I am not sure why it doesn't work as expected.

Markus

On Fri, Jan 28, 2005 at 11:03:49AM +1300, Hamish wrote:

> I found an (at least undesired) error which prevents
> me from setting the region to settings stored in other than
> current mapset (Spearfish example):

cat PERMANENT/windows/county

cat PERMANENT/windows/county
proj: 1
zone: 13
north: 4940200.00
south: 4887200.00
east: 624700.00
west: 574200.00
e-w res: 100.00
n-s res: 100.00

old vs new 3D region format?

Probably it's not accepted (and not automagically updated or whatever).

g.region -d

g.region -dp3
projection: 1 (UTM)
zone: 13
datum: nad27
ellipsoid: clark66
north: 4928010
south: 4913700
west: 589980
east: 609000
top: 1.00000000
bottom: 0.00000000
nsres: 30
nsres3: 30
ewres: 30
ewres3: 30
tbres: 1
rows: 477
rows3: 477
cols: 634
cols3: 634
depths: 1

One solution seems to be to update the Sparfish sample data set.

Markus