[GRASSLIST:8683] Re: [GRASS5] Re: GIS Manager updates

Hamish hamish_nospam at yahoo.com
Tue Oct 18 19:22:27 EDT 2005


> > On a separate topic, I would to hear your (or anyone else's who would
> > like to chime in) opinion concerning attribute management. Several
> > folks in my department have vector layers on which they need to add
> > anywhere from 5 to 50 attributes per polygon (5 to 50 new columns).
> > They all have postgres and mysql installed (in addition to the
> > standard defaulf dbf option). What approach do people take when
> > building attribute intensive vector layers? Do you use a separate
> > database (ie postgis)? or do you manage them in grass?


dumb solution to remove a column, but it should work:

db.copy select=

only those columns you want to keep. (parse `db.describe -c` in a script)
Then remove old table, rename new table, and reconnect.
(v.db.droptable, v.db.connect; v.dbselect, ?)

This could be written as a script, eg v.db.delcol
 (v.db.rmcol, v.db.removecol, v.db.dropcol,...)


but again, a fairly cruddy solution. Is there a SQL command that could 
be passed to db.execute?


Hamish




More information about the grass-user mailing list