Opened 10 years ago
Closed 9 years ago
#2286 closed defect (fixed)
Duplicate calls to d.rast when using wx monitor and d.rast command line
| Reported by: | hcho | Owned by: | martinl |
|---|---|---|---|
| Priority: | major | Milestone: | 7.0.0 |
| Component: | Display | Version: | svn-trunk |
| Keywords: | d.mon, rendering | Cc: | grass-dev@… |
| CPU: | x86-64 | Platform: | Linux |
Description
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.
Change History (6)
comment:1 by , 10 years ago
| Keywords: | d.mon added |
|---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Replying to 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.
comment:4 by , 10 years ago
| Keywords: | rendering added |
|---|
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)?
comment:5 by , 10 years ago
| Cc: | added |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:6 by , 9 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
This issue has been already solved in trunk. I am taking liberty to close the ticket, feel free to open if needed.

Ugly hack:
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