[GRASS-dev] why d.vect.thematic won't run on WinGRASS - d.mon problem

Glynn Clements glynn at gclements.plus.com
Wed Jan 23 20:42:19 EST 2008


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.

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.

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


More information about the grass-dev mailing list