I've been running into a problem displaying raster maps in my 5.7 CVS build. When I start a monitor, and attempt to display a raster map, the monitor remains white. Vector maps display properly, and are promptly whitewashed when a raster map is added. For some reason, these maps are not using colour. It was working properly for awhile, and the problem arose while attempting to follow Markus' short course. I have tried restarting GRASS and restarting X11. If anyone has insight into this problem, I would appreciate some advice.
--
Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g )
Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia
>> I've been running into a problem displaying raster maps in my 5.7
>> CVS build. When I start a monitor, and attempt to display a raster
>> map, the monitor remains white.
...
It gives me the following error:
can't read "opttype(1)": no such variable
can't read "opttype(1)": no such variable
while executing
"if { $opttype($i) == "multi" } {
set domulti 0
for {set j 1} {$j <= $nmulti($i) } {incr j} {
if { $optval($i,$..."
(procedure "mkcmd" line 5)
invoked from within
"mkcmd "
invoked from within
".run invoke"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list $w invoke]"
(procedure "tk::ButtonUp" line 23)
invoked from within
"tk::ButtonUp .run"
(command bound to event)
Ok, that'll probably be the Tcl/Tk problem Glynn was speaking of then.
There is a Mac version and a UNIX/X11 version, GRASS needs to be built
and used with the UNIX/X11 version (usually from FINK). If you are using
Markus' binaries you can be pretty confident that it was built with the
X11 version, but you still need it installed on your system to use at
run time. The Tcl/Tk driver program is called 'wish' and as Glynn noted
you can force GRASS to use a non-default version by installing to
somewhere and then setting the enviromental variable GRASS_WISH in your
terminal before starting GRASS.
Is this breaking from the command line or from d.m? Does:
d.rast raster_name
by itself on the command line work?
hope it helps, sounds like you are 99% of the way there..
Hamish
On Dec 7, 2003, at 5:20 PM, Hamish wrote:
I've been running into a problem displaying raster maps in my 5.7
CVS build. When I start a monitor, and attempt to display a raster
map, the monitor remains white....
It gives me the following error:
can't read "opttype(1)": no such variable
while executing
"if { $opttype($i) == "multi" } {
set domulti 0
for {set j 1} {$j <= $nmulti($i) } {incr j} {
if { $optval($i,$..."
(procedure "mkcmd" line 5)
invoked from within
"mkcmd "
invoked from within
".run invoke"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list $w invoke]"
(procedure "tk::ButtonUp" line 23)
invoked from within
"tk::ButtonUp .run"
(command bound to event)Ok, that'll probably be the Tcl/Tk problem Glynn was speaking of then.
There is a Mac version and a UNIX/X11 version, GRASS needs to be built
and used with the UNIX/X11 version (usually from FINK). If you are using
Markus' binaries you can be pretty confident that it was built with the
X11 version, but you still need it installed on your system to use at
run time. The Tcl/Tk driver program is called 'wish' and as Glynn noted
you can force GRASS to use a non-default version by installing to
somewhere and then setting the enviromental variable GRASS_WISH in your
terminal before starting GRASS.
But, it *was* working for awhile, then stopped working. I am using my own build from CVS, with the OSX Tcl/Tk framework, which is used by the OpenOSX GRASS (which works fine on my system).
Is this breaking from the command line or from d.m? Does:
d.rast raster_name
by itself on the command line work?
This breaks from both the d.m and the command line.
hope it helps, sounds like you are 99% of the way there..
Hamish
Thanks!
--
Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g )
Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia
On Dec 7, 2003, at 5:20 PM, Hamish wrote:
I've been running into a problem displaying raster maps in my 5.7
CVS build. When I start a monitor, and attempt to display a raster
map, the monitor remains white....
It gives me the following error:
can't read "opttype(1)": no such variable
while executing
"if { $opttype($i) == "multi" } {
set domulti 0
for {set j 1} {$j <= $nmulti($i) } {incr j} {
if { $optval($i,$..."
(procedure "mkcmd" line 5)
invoked from within
"mkcmd "
invoked from within
".run invoke"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list $w invoke]"
(procedure "tk::ButtonUp" line 23)
invoked from within
"tk::ButtonUp .run"
(command bound to event)Ok, that'll probably be the Tcl/Tk problem Glynn was speaking of then.
There is a Mac version and a UNIX/X11 version, GRASS needs to be built
and used with the UNIX/X11 version (usually from FINK). If you are using
Markus' binaries you can be pretty confident that it was built with the
X11 version, but you still need it installed on your system to use at
run time. The Tcl/Tk driver program is called 'wish' and as Glynn noted
you can force GRASS to use a non-default version by installing to
somewhere and then setting the enviromental variable GRASS_WISH in your
terminal before starting GRASS.Is this breaking from the command line or from d.m? Does:
d.rast raster_name
by itself on the command line work?hope it helps, sounds like you are 99% of the way there..
Hamish
More information: when I use a different mapset, the monitor works properly again (i.e. displays raster maps). I must have done something to the spearfish layers to make them undisplayable! Very odd.
--
Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g )
Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia
Christopher Fonnesbeck wrote:
> Ok, that'll probably be the Tcl/Tk problem Glynn was speaking of then.
> There is a Mac version and a UNIX/X11 version, GRASS needs to be built
> and used with the UNIX/X11 version (usually from FINK). If you are
> using
> Markus' binaries you can be pretty confident that it was built with the
> X11 version, but you still need it installed on your system to use at
> run time. The Tcl/Tk driver program is called 'wish' and as Glynn noted
> you can force GRASS to use a non-default version by installing to
> somewhere and then setting the enviromental variable GRASS_WISH in your
> terminal before starting GRASS.But, it *was* working for awhile, then stopped working. I am using my
own build from CVS, with the OSX Tcl/Tk framework, which is used by the
OpenOSX GRASS (which works fine on my system).
The OpenOSX version of GRASS has some changes specifically to allow
the use of the native MacOSX version of Tcl/Tk. These are available
from:
http://grass.itc.it/grass5/binary/mac_os_x/OpenOSX-Additions-Grass-5.0.2.tar.bz2
However, there have been some changes to tcltkgrass since 5.0.2, so I
have no idea whether those patches will work on more recent versions.
--
Glynn Clements <glynn.clements@virgin.net>
Christopher Fonnesbeck wrote:
> Is this breaking from the command line or from d.m? Does:
> d.rast raster_name
> by itself on the command line work?
>
>
>
> hope it helps, sounds like you are 99% of the way there..More information: when I use a different mapset, the monitor works
properly again (i.e. displays raster maps). I must have done something
to the spearfish layers to make them undisplayable! Very odd.
Different mapset or different location?
White is normally used for NULL cells, unless you use the "-o" switch,
in which case NULL cells aren't drawn (i.e. transparent). An all-white
map normally means all cells are NULL. This could be because the map
lies entirely outside the current region (see g.region), or because
you have a mask set.
If the vector maps look correct, then the problem isn't due to the
region. Run "g.list rast", and see if you have a map named "MASK". If
so, delete it or rename it.
--
Glynn Clements <glynn.clements@virgin.net>
On Dec 7, 2003, at 9:52 PM, Glynn Clements wrote:
Christopher Fonnesbeck wrote:
Ok, that'll probably be the Tcl/Tk problem Glynn was speaking of then.
There is a Mac version and a UNIX/X11 version, GRASS needs to be built
and used with the UNIX/X11 version (usually from FINK). If you are
using
Markus' binaries you can be pretty confident that it was built with the
X11 version, but you still need it installed on your system to use at
run time. The Tcl/Tk driver program is called 'wish' and as Glynn noted
you can force GRASS to use a non-default version by installing to
somewhere and then setting the enviromental variable GRASS_WISH in your
terminal before starting GRASS.But, it *was* working for awhile, then stopped working. I am using my
own build from CVS, with the OSX Tcl/Tk framework, which is used by the
OpenOSX GRASS (which works fine on my system).The OpenOSX version of GRASS has some changes specifically to allow
the use of the native MacOSX version of Tcl/Tk. These are available
from:http://grass.itc.it/grass5/binary/mac_os_x/OpenOSX-Additions-Grass-5.0.2.tar.bz2
However, there have been some changes to tcltkgrass since 5.0.2, so I
have no idea whether those patches will work on more recent versions.
Thanks -- I got an important clue from the OpenOSX patches. Changing the $GRASS_GUI case in Init.sh from:
"$GISBASE/scripts/d.m" &
to:
echo "$GISBASE/scripts/d.m" | sh &
Seems to have done the trick.
--
Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g )
Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia
Christopher Fonnesbeck wrote:
> The OpenOSX version of GRASS has some changes specifically to allow
> the use of the native MacOSX version of Tcl/Tk. These are available
> from:
>
> http://grass.itc.it/grass5/binary/mac_os_x/OpenOSX-Additions-Grass
> -5.0.2.tar.bz2
>
> However, there have been some changes to tcltkgrass since 5.0.2, so I
> have no idea whether those patches will work on more recent versions.Thanks -- I got an important clue from the OpenOSX patches. Changing
the $GRASS_GUI case in Init.sh from:"$GISBASE/scripts/d.m" &
to:
echo "$GISBASE/scripts/d.m" | sh &
Seems to have done the trick.
That should be OK so long as d.m doesn't spawn any interactive
commands (or it spawns them in their own xterm). However, it will
result in d.m having its stdin set to a file (i.e. the d.m script)
rather than to the terminal. Consequently, any commands which d.m
spawns will also have their stdin set to that file.
--
Glynn Clements <glynn.clements@virgin.net>
On Mon, Dec 08, 2003 at 03:37:38AM +0000, Glynn Clements wrote:
Christopher Fonnesbeck wrote:
> > The OpenOSX version of GRASS has some changes specifically to allow
> > the use of the native MacOSX version of Tcl/Tk. These are available
> > from:
> >
> > http://grass.itc.it/grass5/binary/mac_os_x/OpenOSX-Additions-Grass
> > -5.0.2.tar.bz2
> >
> > However, there have been some changes to tcltkgrass since 5.0.2, so I
> > have no idea whether those patches will work on more recent versions.
>
> Thanks -- I got an important clue from the OpenOSX patches. Changing
> the $GRASS_GUI case in Init.sh from:
>
> "$GISBASE/scripts/d.m" &
>
> to:
>
> echo "$GISBASE/scripts/d.m" | sh &
>
> Seems to have done the trick.That should be OK so long as d.m doesn't spawn any interactive
commands (or it spawns them in their own xterm). However, it will
result in d.m having its stdin set to a file (i.e. the d.m script)
rather than to the terminal. Consequently, any commands which d.m
spawns will also have their stdin set to that file.
What about
exec "$GISBASE/scripts/d.m" &
?
Markus
Christopher Fonnesbeck wrote:
The OpenOSX version of GRASS has some changes specifically to allow
the use of the native MacOSX version of Tcl/Tk. These are available
from:http://grass.itc.it/grass5/binary/mac_os_x/OpenOSX-Additions-Grass
-5.0.2.tar.bz2However, there have been some changes to tcltkgrass since 5.0.2, so I
have no idea whether those patches will work on more recent versions.Thanks -- I got an important clue from the OpenOSX patches. Changing
the $GRASS_GUI case in Init.sh from:"$GISBASE/scripts/d.m" &
to:
echo "$GISBASE/scripts/d.m" | sh &
Seems to have done the trick.
That should be OK so long as d.m doesn't spawn any interactive
commands (or it spawns them in their own xterm). However, it will
result in d.m having its stdin set to a file (i.e. the d.m script)
rather than to the terminal. Consequently, any commands which d.m
spawns will also have their stdin set to that file.What about
exec "$GISBASE/scripts/d.m" &
No, it gives the same error as the original.
C.
Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g )
Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia
Markus Neteler wrote:
> > > The OpenOSX version of GRASS has some changes specifically to allow
> > > the use of the native MacOSX version of Tcl/Tk. These are available
> > > from:
> > >
> > > http://grass.itc.it/grass5/binary/mac_os_x/OpenOSX-Additions-Grass
> > > -5.0.2.tar.bz2
> > >
> > > However, there have been some changes to tcltkgrass since 5.0.2, so I
> > > have no idea whether those patches will work on more recent versions.
> >
> > Thanks -- I got an important clue from the OpenOSX patches. Changing
> > the $GRASS_GUI case in Init.sh from:
> >
> > "$GISBASE/scripts/d.m" &
> >
> > to:
> >
> > echo "$GISBASE/scripts/d.m" | sh &
> >
> > Seems to have done the trick.
>
> That should be OK so long as d.m doesn't spawn any interactive
> commands (or it spawns them in their own xterm). However, it will
> result in d.m having its stdin set to a file (i.e. the d.m script)
> rather than to the terminal. Consequently, any commands which d.m
> spawns will also have their stdin set to that file.What about
exec "$GISBASE/scripts/d.m" &
Technically, that's a syntax error; "exec" doesn't make sense in
conjunction with "&". Most shells appear to treat it as if you had
omitted the "exec". Which is fortunate; using "exec" is wrong in this
situation (without the "&", it would terminate the script).
--
Glynn Clements <glynn.clements@virgin.net>