[GRASS5] comments on test of grass 5.7 Mac OSX

A couple of weeks ago I was able to install Mac OSX binaries of GRASS 5.7 (previously called GRASS 5.1) thanks to the efforts of Markus and the GRASS development team. I've tried a number of things using archaeological data from Spain and here offer a first bug/success report. Markus and Radim asked that I post it to the list to maintain an archive and so that others could have access to this information. The posting is rather lengthy.

First, information on the context:

I have been running this on a Macintosh PowerBook Titanium 1GHz G4 with 512Mb RAM and the most recent version of OS X 10.2.8 (I don't yet have 10.3 and don't expect to have it until after the first of the coming year). I have the December 2002 developer tools installed, along with a number of UNIX apps and libs installed within FINK (a very handy debian package tool and archive for OSX).

GRASS 5.7 was installed from precompiled binaries for OSX

I installed a new version of the needed GDAL libaries that includes OGR, compiled by Markus. The version I had (installed via fink) did not include OGR.

GRASS 5.7 requires PROJ4 to run correctly. There is a version in the CVS for the fink packaging service. However, it doesn't seem to produce a libproj.0.dylib that is required to run GRASS 5.7. I compiled PROJ4 from source and this produced the needed dylib. I've written the PROJ4 maintainer for fink about this.

The comments are below.
____________________
C. Michael Barton, Professor
Department of Anthropology
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671

- - - - - - GRASS 5.7 COMMENTARY (note dates in USA format - M/D/Y)- - - - - -
10/11/03

Error when I try to create a new location in Grass 5.7
Had similar error when creating location from TCL interface in Grass 5.1

Starting GRASS ...
: command not found10_10_2003/etc/Init.sh:
ERROR: Invalid return code from gis_set.tcl.
Please advise GRASS developers of this error.
/usr/local/grass57-10_10_2003/etc/Init.sh: LOCATION_NAME: parameter null or not set

>>>>>>>>>>>>>>>>>>>
FIXED BY GOING INTO .grassrc57 and manually configuring to known location and mapset.

Markus also suggested starting grass with grass57 -text to create new locations (this is what I have to do for GRASS 5.0.x) and returning to the GUI by restarting grass with grass57 -gui. Might have to delete $HOME/.grassrc57 first.

*********************
10/13/03

d.m is a very nice interface. Very slick and easy to use. Still a bit buggy of course. But I like the direction it is going. It builds on the GRASS 5 display manager, and looks to make GRASS much easier for a wider group of users. A couple suggestions for d.m. I have a couple of suggestions for the display manager. A button for a scale bar would be nice. It would also be nice if a command could be attached to a button, allowing the user to customize the display manager somewhat. However, I very much miss the tcltkgrass menu bar of version 5.0.x that has most commands in GUI so I don't have to remember all of them. I hope something like this returns to final version of GRASS 6. If it could be somehow incorporated into the display manager it would make this a very complete interface--perhaps as a floating pallet with tabs for raster, vector, region, settings, etc.

**********************
g.mapsets crashes with following error

GRASS 5.7.0-cvs > g.mapsets
Error in startup script: child killed: bus error
     while executing
"exec g.mapsets -l"
     invoked from within
"split [exec g.mapsets -l] " \n""
     invoked from within
"lsort [split [exec g.mapsets -l] " \n"] "
     invoked from within
"set msts [ lsort [split [exec g.mapsets -l] " \n"] ]"
     (file "/usr/local/grass57-10_10_2003/etc/g.mapsets.tcl" line 34)

KIlls d.m too

g.mapsets -l crashes with error

Bus error

g.mapsets -p works
g.mapsets addmapsets= works

******************************

g.region (and at least some of the other general commands) gui dialog does not have buttons to browse files. At least they don't show up in my version. This seems like a strange omission given the consistency of all the rest of the gui dialogs for the commands.

*************************
Registered a shape file of points with data (i.e., a dbf file with multiple attributes for each point).

Tried to query the points, but got error

child killed: write on pipe with no readers
     while executing
"exec d.what.vect map=punxo_i_augers.shp >@stdout 2>@stdout"
     ("eval" body line 1)
     invoked from within
"eval "exec $cmd >@stdout 2>@stdout""
     (procedure "Dm::execute" line 12)
     invoked from within
"Dm::execute $cmd"
     (procedure "DmVector::query" line 24)
     invoked from within
"DmVector::query $sel"
     ("vector" arm line 2)
     invoked from within
"switch $type {
         raster {
             DmRaster::query $sel
         }
         labels {
             DmLabels::query $sel
         }
         vector ..."
     (procedure "Dm::query" line 10)
     invoked from within
"Dm::query"
     ("uplevel" body line 1)
     invoked from within
"uplevel \#0 $cmd"
     (procedure "Button::_release" line 18)
     invoked from within
"Button::_release .mainframe.topf.tb0.bbox1.b4"
     (command bound to event)

>>>>>>>>>>
NOTE: I successfully queried archsites in spearfish test data set after I converted the grass 5.0.x site file to 5.7 vector format.

*******************

Tried nviz

Intro dialog comes up, but when I click the 'run' button I get the following error

can not find channel named "couldn't execute "nviz2.2_script": no such file or directory"
can not find channel named "couldn't execute "nviz2.2_script": no such file or directory"
     while executing
"fconfigure $msg -blocking 0"
     invoked from within
".run invoke"
     ("uplevel" body line 1)
     invoked from within
"uplevel #0 [list $w invoke]"
     (procedure "tk::ButtonUp" line 22)
     invoked from within
"tk::ButtonUp .run
"
     (command bound to event)

Seems to be there, but grass can't find it. Need to move it or make a link?? Checked out nviz script, nviz2.2_script and various other related configuration scripts. All seem identical to versions in 5.0.2. Can 't see what's wrong.

***********************
10/14/03
************************
d.m error

Tried to rearrange items (maps) listed in d.m display tree. Dragged top item below bottom item. Endless error loop. Error below:

node "" does not exist
     while executing
"Tree::parent .mainframe.frame.pw.f0.frame.sw.tree {}"
     ("eval" body line 1)
     invoked from within
"eval Tree::$cmd .mainframe.frame.pw.f0.frame.sw.tree $args"
     (procedure ".mainframe.frame.pw.f0.frame.sw.tree" line 1)
     invoked from within
"$from parent $node"
     (procedure "DmTree::drop" line 14)
     invoked from within
"DmTree::drop .mainframe.frame.pw.f0.frame.sw.tree .mainframe.frame.pw.f0.frame.sw.tree widget default TREE_NODE vector:1"
     ("uplevel" body line 1)
     invoked from within
"uplevel \#0 $cmd [list $path $source $data(dnd,node) $op $type $dnddata"
     (procedure "Tree::_drop_cmd" line 13)
     invoked from within
"Tree::_drop_cmd .mainframe.frame.pw.f0.frame.sw.tree .mainframe.frame.pw.f0.frame.sw.tree 277 269 default TREE_NODE vector:1"
     ("uplevel" body line 1)
     invoked from within
"uplevel \#0 $drop(dropcmd) [list $_target $_source $X $Y $_curop $_type $_data"
     (procedure "DropSite::_release" line 12)
     invoked from within
"DropSite::_release 277 269"
     (command bound to event)

*************************
v.in.ogr

Tried to import shape file. Received the following error. File shows up as vector, but won't display. No data??

v.in.ogr dsn=/Users/Shared/projects/SpainSurvey/Gorgos/Arcview/ output=Gorgos.OGRtest.topo.shp layer=gorgos_topo50 min_area=0.0001 snap=0.001
WARNING: Vector 'Gorgos.OGRtest.topo.shp' already exists and will be
          overwritten.
WARNING: coor files of vector 'Gorgos.OGRtest.topo.shp@grass57test' is
          larger than it should be (14 bytes excess).
WARNING: Table 'Gorgos.OGRtest.topo.shp' linked to vector did not exist.
Layer: gorgos_topo50
DBMI-DBF driver error: (null)
ERROR: Cannot create table: create table Gorgos.OGRtest.topo.shp (cat
        integer, GORGOS_TOP integer, ELEVATION integer)

Tried to import MapInfo file. Discovered that only MIF would import (need to indicate on instructions). However, when I tried to import it I got a similar error to that from shape file.

I WAS able to bring in a shape file by registering it. This latter method seems to work consistently.

******************************
10/15/03
*****************************
Display manager locking up periodically. Maybe due to region setting problems???

Did a zoom. Then when I tried to zoom again, I got following error and can't zoom any more:

child process exited abnormally
     while executing
"exec d.zoom >@stdout 2>@stdout"
     ("eval" body line 1)
     invoked from within
"eval "exec $cmd >@stdout 2>@stdout""
     (procedure "Dm::execute" line 12)
     invoked from within
"Dm::execute $cmd "
     (procedure "Dm::zoom" line 4)
     invoked from within
"Dm::zoom"
     ("uplevel" body line 1)
     invoked from within
"uplevel \#0 $cmd"
     (procedure "Button::_release" line 18)
     invoked from within
"Button::_release .mainframe.topf.tb0.bbox1.b2"
     (command bound to event)
***************************
d.m
v.digit buttom doesn't do anything unless an existing vector file is selected. That is, you can't create a NEW vector file from d.m

***************************

v.digit

I liike the interface a lot, but am having problems using module.

Mainly, can't get background to display. Sometimes it won't parse commands (d.rgb). Others seem to parse but don't get results. E.g., I included the command

d.rast map=ASTER.4509.vnir.2@satellite

and got the following message in the dialog box for v.digit

v.digit map=Alcoi_bridges2 bgcmd=d.rast map=ASTER.4509.vnir.2@satellite -n
Map does not exist.
New empty map created.
WARNING: A map which is not in the current mapset cannot be opened for
          update.

ERROR: Required parameter <map> not set:
     (Raster map to be displayed).

Description:
  Displays and overlays raster map layers in the active display frame on the graphics monitor.

Usage:
  d.rast [-oi] map=name [catlist=cat[-cat][,cat[-cat],...]]
    [vallist=val[-val][,val[-val],...]] [bg=color]

Flags:
   -o Overlay (non-null values only)
   -i Invert catlist

Parameters:
       map Raster map to be displayed
   catlist List of categories to be displayed (INT maps)
   vallist List of values to be displayed (FP maps)
        bg Background color (for null)
             options: white,black,red,green,blue,yellow,magenta,cyan,aqua,
                      grey,gray,orange,brown,purple,violet,indigo

I've gone into settings for v.digit and tried to insert display command there, but get inconsistent results. Once, it seemed to try to display something.

*****************
10/19/03
****************

v.digit

I can now get a background raster map to display, but only by using the background command panel in settings. In the startup dialog, it recognizes the d.rast command, but not the arguments that follow.

Something squirrelly is going on or I don't understand how v.digit operates (or maybe some of both). It **looks** like v.digit is supposed to automatically create a table for each new vector file it creates, but this doesn't seem to happen. I try to make a polygon. But when I go to close it, it says "Database table for this field is not defined"

If I try to create a new table in settings, it says "Cannot open database $GISDBASE/$LOCATION_NAME/$MAPSET/dbf by driver dbfDBMI-DBF driver error: Cannot open dbf database: /Users/Shared/grassdata//Spain/satellite/dbf/"

Not clear why it can't open a database. Also, I am working in ..../Spain/grass57test not .../Spain/satellite. However, the **background** is located in the .../Spain/satellite folder.

Finally, if I go to open a vector file after using v.digit, the file I tried to create is there, but its name includes the name of the background file. For example, I tried to create new vector file "Polop.barranc", using the raster image "studyregion.25m.colorshade" as a background. But the created file is listed as "Polop.barranc, studyregion.25m.colorshade". Needless to say, it won't open. And trying to open it tends to lock up grass.

The upshot is that so far, I haven't been able to digitize anything in the new v.digit.

*************

That's it for now.

On Monday 27 October 2003 12:05, Michael Barton wrote:

d.m ...
A button for a scale bar would be
nice. It would also be nice if a command could be attached to a button,
allowing the user to customize the display manager somewhat.

There is "Create new command" icon in d.m, which creates new layer,
where you can manualy write any command.

v.in.ogr dsn=/Users/Shared/projects/SpainSurvey/Gorgos/Arcview/
output=Gorgos.OGRtest.topo.shp layer=gorgos_topo50 min_area=0.0001
snap=0.001

Vector names must follow SQL restrictions, don't use '.', try
output=Gorgos_OGRtest_topo_shp

v.digit map=Alcoi_bridges2 bgcmd=d.rast map=ASTER.4509.vnir.2@satellite

All options containing spaces must be doublequoted,
bgcmd="d.rast map=ASTER.4509.vnir.2@satellite"

v.digit
Something squirrelly is going on or I don't understand how v.digit
operates (or maybe some of both). It **looks** like v.digit is supposed
to automatically create a table for each new vector file it creates,
but this doesn't seem to happen. I try to make a polygon. But when I go
to close it, it says "Database table for this field is not defined"

If I try to create a new table in settings, it says "Cannot open
database $GISDBASE/$LOCATION_NAME/$MAPSET/dbf by driver dbfDBMI-DBF
driver error: Cannot open dbf database:
/Users/Shared/grassdata//Spain/satellite/dbf/"

Not clear why it can't open a database. Also, I am working in
..../Spain/grass57test not .../Spain/satellite. However, the
**background** is located in the .../Spain/satellite folder.

Does g.gisenv realy print 'MAPSET=grass57test'?

Radim

On Mon, Oct 27, 2003 at 03:35:43PM +0100, Radim Blazek wrote:

On Monday 27 October 2003 12:05, Michael Barton wrote:

[...]

> v.in.ogr dsn=/Users/Shared/projects/SpainSurvey/Gorgos/Arcview/
> output=Gorgos.OGRtest.topo.shp layer=gorgos_topo50 min_area=0.0001
> snap=0.001

Vector names must follow SQL restrictions, don't use '.', try
output=Gorgos_OGRtest_topo_shp

I have added a test vector map names (function Vect_open_new() ) in CVS.
Now new vector names are tested for SQL compliance.

[...]

Markus