[GRASS5] updates to grass tcltk menus

Colleagues

Prompted by my previous query about r.colors and several related issues about access to grass functions, I continued working with the tcltkgrass menu system and produced the following series of new versions. I think they are improvements, but would like you folks to try them and see. If worthwhile, I would ask that they be uploaded to the CVS. I did them on grass 5.3 for MacOSX, but they should work on other OS's and on grass 5.0.3 as well as all are for grass commands that are common to both versions. There are no changes to grass commands, of course. All I have done is try to make a wider suite of grass functions more accessible by adding it to the menu system. While many people active on the list are GIS professionals who may find the command line more convenient, I think is is also useful to make the full power of GRASS more easily accessible to more casual users, individuals learning GIS, and and those who wanting to use GRASS for particular research projects. While the manual is pretty good, these folks may not even realize that a GRASS function exists to look it up. Those with relevant programming skills are already putting in a lot of time working on the more important command structure of GRASS. So I thought I might be able to contribute by helping with accessibility via the tcltk menus. While there are still some aspects of the menu structure that remain somewhat opaque, I think I've now got a handle on it well enough to do something useful. If those of you who test these find them useful, I am happy to continue with this effort.

My first and primary goal would be to make even more grass functions available on the menus. I've started with a suite of commands that I find particularly useful and wish were there for teaching about GIS--especially those related to simple querying of spatial and attribute data. I've also included a couple of display commands that I use a lot but are not available. If this goes well, I would like to consider streamlining the menu structure somewhat. At the moment, I have left that alone except for a bit of necessary tweaking (e.g., for the improved r.colors below). I would submit any organizational changes to the list for feedback, of course, prior to implementing them. Finally, I would like to contribute to a menu structure for GRASS 5.7. Anyway, I am submitting the work I've done so far so that the GRASS community can look it over and offer feedback.

For those unfamiliar with the menu structure, you can try these without any compiling. First, back up the $GISBASE/tcltkgrass directory. Expand the compressed files (tcltkgrass_updates.tgz) into the directory of your choice. Then copy menu.tcl to $GISBASE/tcltkgrass/main and copy the rest of the *.tcl files to $GISBASE/tcltkgrass/module. You will need to restart tcltkgrass to see the changes in effect.

Here is a summary of the changes to:

d.rast: Added entries for selecting which raster categories to display; added option to use a legend file to select categories to display and set their display color.

d.vect.area: Added entries for selecting which vector categories to display; added option to use a legend file to select categories to display and set their display color

d.rast.labels: Automatically labels raster areas; includes options to choose font, font color, font size, label background color, and label border color

d.vect.labels: Automatically labels vector features; includes options to choose font, font color, font size, label background color, and label border color

r.hillshade: Interactive dialog for accessing d.shade.rel, a script to produce a shaded pseudo-topography map (I changed the entry in menu.tcl for 'create shaded raster map' to 'drape raster map over shaded topography or aspect map' to make it more accurate).

r.colors: This is my solution to the r.colors issue. r.colors now does not have a switch for 'rules' (this change already implemented in the CVS). The main menu system (menu.tcl) now has a submenu for create color table. The selections now are 'Use predefined color tables' (the 'old' r.colors tcltk module), 'copy color table from another raster map', and 'create color table using rules'

r.colorsrast: Module for copying color table from one raster map to another (see r.colors above).

r.colorsrules: Module for interface to set color table using rules (see r.colors above).

v.extract: Module for creating a new vector map from a selected subset of vector features.

v.reclass: Similar to r.reclass. Allows use of rules to reclassify vector categories

Enjoy! (and let me know what you think)

(attachments)

tcltkgrass_updates.tgz (7.07 KB)

Michael Barton said:

Enjoy! (and let me know what you think)

Great work. I think it was time someone took a global and systematic look
at the current state of tcltkgrass. Thanks a lot !

Just one very minor thing: in the d.rast.labels window, it should say
"raster map to be labeled" not "vector map..." :wink:

Moritz