[GRASSLIST:5295] GRASSRGB size, datatype and use

DrakeGis drakegis at dacafe.com
Tue Jan 11 12:38:14 EST 2005


Hi,
  Thanks for the information about "d.vect.area" that now is "d.vect -a".
I still have a couple of questions. I would like to know what datatype
should be the GRASSRGB column. I'm used text, but I receive a warning
concerning to the length of the field, should it be varchar(11) ? How
can I specify that using db.execute ? is correct to use:

echo "ALTER TABLE table_t ADD COLUMN grassrgb text(11)" | db.execute

 I also, would like to be able to use some command like this:

echo "UPDATE table_t SET grassrgb='v1:v2:v3' WHERE cat=xxx "|db.execute

  Where v1, v2, v3 and xxx are values that I can vary systematically or be
the result of a calculation... for example, set the level of gray of a
category accoding to the number of categories [the number is obtained by
COUNT() and the color could be determined by doing something like CAT *
255 / COUNT() ] Is there any way to write such things in the echo part
of db.execute or the only way id through a script ? Besides there is
another problem, when I use 'v1:v2:v3' the "variables" v1, v2, and v3
are taken as text, whereas if I try v1:v2:v3 there is a SQL problem with
the character : ?
   Someone knows how to do this ?
   Futher more is it possible to use a file to specify the grassrgb values
when I use d.vect -a  ????


   THANKS

   D.


-----------------------------------------
Stay ahead of the information curve.
Receive GIS news and jobs on your desktop daily.
Subscribe today to the GIS CafeNews newsletter.
[ http://www10.giscafe.com/nl/newsletter_subscribe.php ]
It's informative and essential.




More information about the grass-user mailing list