Details Ticket 2381


Comment | Reply | Take | Resolve


Serial Number 2381
Subject g.mapsets: limit mapset list to valid entries
Area bug
Queue grass
Requestors hamish_nospam@yahoo.com
Owner none
Status open
Last User Contact Never contacted
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Thu Apr 15 07:58:55 2004 (4 yr ago)
Created Thu Apr 15 06:56:55 2004 (4 yr ago)

Transaction History Ticket 2381


Thu, Apr 15 2004 06:56:55    Request created by guest  
Subject: g.mapsets:  limit mapset list to valid entries

Platform: GNU/Linux/i386
grass obtained from: Mirror of Trento site
grass binary for platform: Compiled from Sources
GRASS Version: 5.3 cvs apr 2004


'g.mapsets -l' and the Tcl/Tk startup GUI list all directories & files as possible
locations and mapsets. This should be limited to real & existing mapsets.

some bash script examples on how this might be done,
($1 = mapset name to be tested)

basic check if mapset directory exists:
if [ -d "`g.gisenv get=GISDBASE`"/"`g.gisenv get=LOCATION_NAME`"/"$1" ] ; then
better check if region file exists in tested mapset:
if [ -e "`g.gisenv get=GISDBASE`"/"`g.gisenv get=LOCATION_NAME`"/"$1"/WIND ]
; then


right now g.mapsets uses a system("ls ..."); command to generate the list, I
suppose the tcl/tk menu uses something like exec["ls ..."] but I haven't checked.
Will any of the library functions work for this purpose (for g.mapsets at least)?
If not should there be one?

see also bug # 1797
http://intevation.de/rt/webrt?serial_num=1797


?
Hamish
Thu, Apr 15 2004 07:58:55    Comments added by hbowman  
Cc: grass5@itc.it


Another test method:

g.findfile element=. file=WIND mapset="$test"



Hamish
Comment | Reply | Take | Resolve

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request