[GRASSLIST:4485] Re: r.mapcalc and alternate mapsets.
Gordon Keith
gordon.keith at csiro.au
Thu Sep 12 19:16:37 EDT 2002
On Thu, 12 Sep 2002 16:06, Eric G. Miller wrote:
> On Thu, Sep 12, 2002 at 03:45:41PM +1000, Gordon Keith wrote:
> > I can'te get r.mapcalc to work with maps from different mapsets.
> >
> > > r.mapcalc viz=gabo_bath at gabo
> >
> > viz = (gabo_bath[0,0])
> > ERROR: open_map: map [gabo_bath] not found
> >
> > Which is different from the error it gives if the map doesn't exist:
> > > r.mapcalc viz=gabo_Bath at gabo
> >
> > WARNING: unable to find [gabo_Bath at gabo] in [(null)]
> > viz = (gabo_Bath at gabo[0,0])
> > ERROR: open_map: map [gabo_Bath at gabo] not found
> >
> >
> > So it look like it's finding the map but can't open it.
> >
> > Any suggestions as to what is going on?
>
> Just to be sure, does g.mapsets -p list "gabo". If not,
> add it to the search set.
That fixes the problem.
BUT...
The behaviour of r.mapcalc is suspect.
For some commands (eg d.rast) map at mapset is sufficient and works as I
expected it to.
For r.mapcalc map at mapset errors if mapset is not in the g.mapsets path.
r.mapcalc map at mapset uses map at mapset0 instead of map at mapset, if mapset0
appears in the g.mapsets path before mapset and there is a map named
map in mapset0 - without any warning.
GRASS:/ > g.mapsets PERMANENT
GRASS:/ > r.mapcalc test=gabo_bath at gabo
test = (gabo_bath[0,0])
ERROR: open_map: map [gabo_bath] not found
GRASS:/ > g.mapsets gabo
GRASS:/ > r.mapcalc test=gabo_bath at gabo
test = (gabo_bath[0,0])
100%
GRASS:/ > r.info test
| Range of data: min = -142.218246 max = -111.183922
GRASS:/ > r.mapcalc gabo_bath=1
gabo_bath = (1)
100%
GRASS:/ > r.mapcalc test=gabo_bath at gabo
test = (gabo_bath[0,0])
100%
GRASS:/ > r.info test
| Range of data: min = 1.000000 max = 1.000000
which is value of gabo_bath in the current mapset not gabo_bath at gabo.
Is this a know 'feature'?
Regards
Gordon
--
Gordon Keith
Programmer/Data Analyst
Marine Acoustics
CSIRO Marine Research
http://www.marine.csiro.au
We love because God first loved us.
-- 1 John 4:19
More information about the grass-user
mailing list