[GRASS-dev] [GRASS GIS] #2286: Duplicate calls to d.rast when using wx monitor and d.rast command line

#2286: Duplicate calls to d.rast when using wx monitor and d.rast command line
---------------------+------------------------------------------------------
Reporter: hcho | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------
When I do
{{{
d.mon wx0
d.rast elev
}}}
"d.rast elev" renders the raster map and saves its command to the command
file. Then, the wx monitor calls "d.rast elev" again because it's trying
to redraw previously added raster maps and overlay them with "elev".

IMO, to avoid duplicate calls to d.rast, if we call d.rast from the
command line and the selected monitor is wx, it should simply add d.rast
commands to the command file and let the monitor handle actual drawing.

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

#2286: Duplicate calls to d.rast when using wx monitor and d.rast command line
---------------------+------------------------------------------------------
Reporter: hcho | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: d.mon | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------
Changes (by neteler):

  * keywords: => d.mon

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2286#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2286: Duplicate calls to d.rast when using wx monitor and d.rast command line
---------------------+------------------------------------------------------
Reporter: hcho | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: d.mon | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by hcho):

Ugly hack:
{{{
d.mon wx0
echo "d.rast elev" > `g.gisenv MONITOR_WX0_CMDFILE`
}}}

or for multiple raster maps:
{{{
#!/bin/sh
maps=`g.mlist rast pattern="n[0-9]*w[0-9]*_1" sep=,`
g.region rast=$maps res=00:01:00
d.erase
monitor=`g.gisenv MONITOR`
cmdfile=`g.gisenv MONITOR_${monitor}_CMDFILE`
(
for i in `echo $maps | sed 's/,/ /g'`
do
         echo d.rast $i
done
) > $cmdfile
}}}

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

#2286: Duplicate calls to d.rast when using wx monitor and d.rast command line
---------------------+------------------------------------------------------
Reporter: hcho | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: d.mon | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by wenzeslaus):

Replying to [ticket:2286 hcho]:
> IMO, to avoid duplicate calls to d.rast, if we call d.rast from the
command line and the selected monitor is wx, it should simply add d.rast
commands to the command file and let the monitor handle actual drawing.

Hm, I actually thought that this is how it was designed and what it is
doing. I this is the case, then what you are saying is clear bug and you
can safely fix it.

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

#2286: Duplicate calls to d.rast when using wx monitor and d.rast command line
------------------------------+---------------------------------------------
Reporter: hcho | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: d.mon, rendering | Platform: Linux
      Cpu: x86-64 |
------------------------------+---------------------------------------------
Changes (by wenzeslaus):

  * keywords: d.mon => d.mon, rendering

Comment:

Do you think this is related to (or the same as) comment:5:ticket:2509
(creating unnecessary map.png in current directory when `d.mon wx0` is
active)?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2286#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#2286: Duplicate calls to d.rast when using wx monitor and d.rast command line
------------------------------+---------------------------------------------
Reporter: hcho | Owner: martinl
     Type: defect | Status: assigned
Priority: major | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: d.mon, rendering | Platform: Linux
      Cpu: x86-64 |
------------------------------+---------------------------------------------
Changes (by martinl):

* cc: grass-dev@… (added)
  * owner: grass-dev@… => martinl
  * status: new => assigned

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2286#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#2286: Duplicate calls to d.rast when using wx monitor and d.rast command line
----------------------+------------------------------
  Reporter: hcho | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Resolution: fixed | Keywords: d.mon, rendering
       CPU: x86-64 | Platform: Linux
----------------------+------------------------------
Changes (by martinl):

* status: assigned => closed
* resolution: => fixed

Comment:

This issue has been already solved in trunk. I am taking liberty to close
the ticket, feel free to open if needed.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2286#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>