[GRASS-dev] discussion: replacing ps.map

Glynn Clements glynn at gclements.plus.com
Fri Apr 6 16:11:16 EDT 2007

S-Bören Gebbert wrote:-A

> >> 1.) If i use d.erase to erase the monitor, an ERASE statement is added to map.ps.
> >>      Using the d.erase command after i have added raster or vector maps results in
> >>      rerendering the "erased" content.
> >>      Is there a way to reset the map.ps file to avoid rerendering of
> >>      "old" maps after using d.erase?
> > 
> > Only ...
> > 
> >>      I need to stop the PS driver and restart it again to avoid rerendering.
> > 
> > ... like this.
> > 
> > The PS driver simply appends all output to $GRASS_PSFILE.
> > 
> > It could truncate the file (although that will only work for files,
> > not pipes or e.g. /dev/stdout) upon erase, or it could close and
> > re-open the file.
> > 
> > It's not entirely clear what the "correct" solution is.
> > 
> > Is there a reason why you might want to send graphics to the driver
> > when you are subsequently going to erase them?
> Well, i was expecting a similar behaviour like the XDRIVER.
> Erasing the monitor to visualize new maps. In case of the PS driver
> i'm using kghostview or gv as monitor.

If you want to use the PS driver interactively, then the existing
behaviour is correct. E.g.:

GRASS_PSFILE=/dev/stdout d.mon start=PS | gs -q -dNOPAUSE -dBATCH -sDEVICE=x11 - >&/dev/null &

As the driver's output is going to a pipe, there's no way to "erase"
any PostScript commands which have already been written. But sending
"erasepage" (which is the default implementation of the ERASE
procedure) will clear the display.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list