[GRASS-user] grass70 and display monitor

Glynn Clements glynn at gclements.plus.com
Fri Dec 4 06:47:50 EST 2009


Roy Sanderson wrote:

> I have been very surprised by the discussion on the Grass user lists
> explaining the end of the d.mon and associated d.rast, d.vect commands
> in the new Grass 7 version.  I'd naively assumed that they were a
> permanent feature of the Grass environment.  From what I understand,
> their phasing out is primarily because to retain them would impose
> considerable technical challenges in a new Gui environment, would not
> match the philosophy behind Gui interfaces, and provide little real
> benefit.

Most of the d.* commands, including d.rast and d.vect, aren't going
anywhere.

The only change is that d.* commands now only support immediate
rendering (i.e. generating image files directly).

Much of what works in 6.x still works in 7.0. With regard to the
display architecture, the main differences are that:

1. Communication between d.* modules and the display architecture is
one-way. d.* modules tell the libraries to draw stuff and they draw
it. The mouse functions (wait for the user to press a mouse button and
report the coordinates) no longer exist, so any modules which depend
upon them have been removed, re-written, assimilated into the GUI, or
remain minus the mouse interaction (e.g. d.legend, d.barscale etc
still exist but lack the ability to use the mouse for placement).

2. There are no persistent monitor processes, so there are no commands
to start and stop monitors (d.mon), or to change the monitor state for
future commands (d.frame, d.font) or to read the current state
(d.save). Any parameters (font, encoding, text size, line width, frame
coordinates, etc) are passed via environment variables. It would be
fairly trivial to use $GISRC variables instead, if there was any
demand for it, although setting environment variables is slightly
simpler for the GUI.

One thing which has disappeared and hasn't yet returned in any form is
i.ortho.photo. Some people said that it was important, but no-one
seems to have found it important enough to work on a replacement. And
in a volunteer-run project, that's the only definition of "important"
which really matters. The alternative (indefinitely retaining the
awful messes which were the old graphics architecture and the vask
library for the sake of i.ortho.photo) isn't realistic.

Other than the display library, the vask library has been removed,
along with anything which tries to ask the user questions via the
terminal (e.g. G_ask_*).

Assuming that there even *is* a terminal is now considered a bug. This
bug used to manifest itself via the GUI hanging because it ran a
command which then tried to interact with the user via stdin/stdout
(even though stdin/stdout were probably either the ~/.xsession-errors
file on Unix or non-existent on Windows and Mac). Similar issues
affected batch jobs and web applications. Now, any such bugs would
show up as undefined references to the non-existent G_ask_* functions.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list