On Jan 23, 2008, at 6:42 PM, Glynn Clements wrote:
Michael Barton wrote:
In order for d.vect.thematic to run in the GUI (the only way it will
work in WinGRASS), it has to start and stop the PNG monitor.
To do this, it has to run d.mon--i.e., d.mon start=png and d.mon
stop=png.
However, d.mon will not run in WinGRASS, probably because it does not
have x11. I am betting that d.mon ALWAYS checks for an x11 monitor
when it attempts to do something.
Nope. d.mon doesn't work in WinGRASS because monitors don't work in
WinGRASS. This isn't due to the lack of X11 (which only affects
XDRIVER), but the lack of Unix-style sockets (by which, I mean sockets
which work with read() and write(), not necessarily Unix-domain
sockets).
I tried modifying the code to use TCP sockets, but I couldn't get it
to work. Well, using TCP sockets works on Unix, but the process of
converting the WinSock SOCKET to an fd which works with MSVCRT's
read() and write() didn't seem to work.
So, unless someone is willing to invest the effort to replicate the
communication between libraster and the drivers, monitors will remain
unavailable in the native WinGRASS version.
I was afraid that you were going to say something like that
If you just want d.vect.thematic to work with WinGRASS, changing it to
use GRASS_RENDER_IMMEDIATE=TRUE instead of "d.mon start=PNG" would
probably be less work than getting monitors working.
In fact, we recently had to change d.vect.thematic to set GRASS_RENDER_IMMEDIATE=FALSE so that it's multiple iterations of d.vect would composite in the PNG monitor and then be output as a PNG to the GUI.
If we want it to work with Windows, it will take considerably more coding. we have to set GRASS_RENDER_IMMEDIATE=TRUE, track all iterations of d.vect and use g.pnmcomp to composite them all. It might be possible to make use of existing TclTk code to do some of this, but I doubt it.
Michael
____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>