[GRASS5] d.vect.thematic committed to CVS

Michael Barton michael.barton at asu.edu
Fri May 13 01:30:16 EDT 2005


Hamish

Thanks much for all the suggestions for a cleaner script. A couple replies
below, but will try to change these tomorrow if I have a few minutes.


On 5/12/05 8:04 PM, "Hamish" <hamish_nospam at yahoo.com> wrote:

>> I fixed a few small bugs and committed d.vect.thematic and v.univar.sh
>> to the CVS.
> 
> 
> 
> both:
> 
> - to "activate" new modules, you need to add them to the parent
> Makefile, e.g. grass6/scripts/Makefile.

Oops. I was in a hurry to commit them because people were starting to modify
various versions floating around.

> 
> 
> - Instead of a table= option, parse the output of v.db.connect -g (or -p)
> to get the answer automatically. I see you have commented out in thematic:
> #v.db.connect map=fields2 -pg

Db.select will automatically use the values already set in db.connect, so we
don't need to check this (at least I don't think we do). Previously I had it
default  to dbf (a problem). Now it defaults to whatever is already set
unless it is specifically set to something else in the script.

> note -pg isn't correct, choose one or the other. If this doesn't show
> the correct table then it is a bug & should be fixed.
> 
> 
> v.univar.sh:
> 
> please keep option names consistent with other modules, e.g. 'db.connect
> driver= database=' instead of drv= and db=.

OK. I was trying to avoid confusion with the db.select arguments. But
consistency is nice.

> 
> 
> d.vect.thematic:
> 
> get rid of "#% key: icon"  options line. Why restrict?
> G> ls $GISBASE/etc/symbol/*

Because I don't know how to parse this into a g.parser-style interface. This
is indeed a bit of a hack.

I'm working on a way to do this however.

> 
> 
> colorscheme=
>  I'm a huge fan of blue->cyan->yellow->red. Why not let it be any of the
> colorschemes in $GISBASE/etc/colors/? (ok, very hard to parse in a shell
> script)

Also working on this. It is a bit complicated to do in a way that remains
user-friendly.

> 
> 
> if [ "$OPT_GIS_table" = "" ] ; then
>  use instead:  (probably breaks on cygwin)
> if [ -z "$OPT_GIS_table" ] ; then

OK

> 
> 
> min="`grep 'Minimum:' TMP1 | sed s/Minimum://`"
> max="`grep 'Maximum:' TMP1 | sed s/Maximum://`"
> mean="`grep 'Mean:' TMP1 | sed s/Mean://`"
> etc.
> change TMP1 -> "$TMP1"

Quotes inside quotes?? TMP1 is a file, not a variable. I copied this out of
r.univar.sh. Are you sure about this? I'll give it a try.

> 
> Always try to "quote" file names. (spaces in names, etc)
> 
> 
>  themecolor=$color1":"$color2":"$color3
> to
>  themecolor="$color1:$color2:$color3"
> 
> (not a big deal, just cleaner)

OK

> 
> 
> .. and that's about as far as I got through an audit.

Thanks much.

> 
> 
> nice work,
> 
> 
> Hamish

____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ  85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>




More information about the grass-dev mailing list