[GRASS-dev] [GRASS GIS] #3475: r.mapcalc expression does not accept fully qualified map name as an output

#3475: r.mapcalc expression does not accept fully qualified map name as an output
-------------------------+-------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: minor | Milestone:
Component: Raster | Version: svn-trunk
Keywords: r.mapcalc | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
All raster and vector modules should accept fully qualified map name as an
output parameter and ignore @mapset part as long as mapset == current
mapset. This is implemented in Vect_open_new() and G_open_raster_new().
Still r.mapcalc is failing with an error:
{{{
mapcalc> sample@mapset=1
syntax error, unexpected '@', expecting '('
}}}
See extra discussion at bug #676
I'll try to fix r.grow code to strip @mapset part as a workaround as at
the moment it fails to overwrite an existing map when called from WXGUI.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3475&gt;
GRASS GIS <https://grass.osgeo.org>

#3475: r.mapcalc expression does not accept fully qualified map name as an output
--------------------------+-------------------------
  Reporter: marisn | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: minor | Milestone: 7.2.4
Component: Raster | Version: svn-trunk
Resolution: | Keywords: r.mapcalc
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by Nikos Alexandris):

Is there any activity on this? I have the following pending for a recently
published add-on:

{{{#!python
/osgeo/grasstrunk/dist.x86_64-pc-linux-gnu/scripts/r.estimap.recreation
--overwrite land=land_suitability@examples potential=potential
syntax error, unexpected '@', expecting '('
Parse error
ERROR: parse error
Traceback (most recent call last):
   File "/osgeo/grasstrunk/dist.x86_64-pc-linux-
gnu/scripts/r.estimap.recreation", line 4103, in <module>
     sys.exit(main())
   File "/osgeo/grasstrunk/dist.x86_64-pc-linux-
gnu/scripts/r.estimap.recreation", line 3631, in main
     r.mapcalc(subset_land)
   File "/osgeo/grasstrunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/modules/interface/module.py",
line 651, in __call__
     return self.run()
   File "/osgeo/grasstrunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/modules/interface/module.py",
line 772, in run
     self.wait()
   File "/osgeo/grasstrunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/modules/interface/module.py",
line 797, in wait
     module=self.name, errors=stderr)
grass.exceptions.CalledModuleError: Module run r.mapcalc
r.mapcalc expression=tmp.5319.8.land_suitability@examples =
land_suitability@examples region=current ended with error
Process ended with non-zero return code 1. See errors in the
(error) output.
Removing temporary files
}}}

  Reading Glynn's last comment
https://trac.osgeo.org/grass/ticket/676#comment:12, do I understand
correctly that I should take care to strip '@mapset' part at the add-
on/module level?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3475#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3475: r.mapcalc expression does not accept fully qualified map name as an output
--------------------------+-------------------------
  Reporter: marisn | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: minor | Milestone: 7.6.2
Component: Raster | Version: svn-trunk
Resolution: | Keywords: r.mapcalc
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by martinl):

* milestone: 7.2.4 => 7.6.2

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3475#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>