[GRASS-dev] [bug #3069] (grass) r.mapcalc - warning/errorr amibiguity

Maciej Sieczka tutey at o2.pl
Wed Jul 19 15:05:24 EDT 2006


Hamish napisa?(a):
>>> GRASS 6.0.cvs:~ > r.mapcalc 'lake=kpn65'
>>> WARNING: 'cell/kpn65' was found in more mapsets (also found in topo).
>>> ERROR: 'cell/kpn65' was found in more mapsets (also found in topo).
>> This is still a bug. Not serious at all for a Grass whiz, but 6.1
>> newbies will be scared. I think WARNING will be enough (at least not
>> both warning and error).
> 
> 
> g.mapsets includes "topo" as a secondary mapset in the path?

I don't have this particular location at hand now, so I'll use another
one, OK? I hope the commands below will explain enough:

$ g.mapsets -p
nic PERMANENT

$ g.gisenv
GISDBASE=/home/grassdata
LOCATION_NAME=xy
MAPSET=nic
GRASS_GUI=text

$ g.list rast
----------------------------------------------
raster files available in mapset nic:
map

raster files available in mapset PERMANENT:
map

----------------------------------------------

$ r.mapcalc 'map2=map'
WARNING: 'cell/map' was found in more mapsets (also found in nic).
ERROR: 'cell/map' was found in more mapsets (also found in nic).


$ g.list rast
----------------------------------------------
raster files available in mapset nic:
map

raster files available in mapset PERMANENT:
map

----------------------------------------------



And so the 'map2' is not created as you can see...

I though about this once more, and I'm wondering:

Should only error be issued and information that implicit '@mapset' has
to be put for r.mapcalc to work in case of identical names?

Or should r.mapcalc default to 'map' in the current mapset, issuing a
warning only that an identical raster exists in other mapset/s?

The firt approach looks more user-error proof (paranoid?), the latter
will be more convenient in daily use.

How do other modules handle identical names in different mapsets? (I
guess they default to current mapset and don't even care for other
mapsets, unless implicit @mapset is used...).

Maciek




More information about the grass-dev mailing list