[GRASS5] [bug #2829] (grass) v.to.db: remove an option and am suddenly out of range

Radim Blazek radim.blazek at gmail.com
Tue Dec 13 05:05:13 EST 2005


On 12/13/05, Maciek Sieczka <werchowyna at epf.pl> wrote:
> >  Do you think v.to.db should simply use the column names equal to
> > the options? That could be a convenient default.
>
> That might be good. Some Grass modules which require creating a new
> column in the table do it themselves (eg. r.to.vect, v.to.points), some
> leave it to the user (v.distance, v.sample).

That is OK. There are 2 different groups of modules.
1) r.to.vect,v.to.points... create a new vector
2) v.distance, v.sample.. modify existing vector

> I wish this could be
> unified for all Grass modules:
> 1. If the user doesn't specify the column name a column with a
> reasonable default name is created and populated.
> 2. The possibility to override column name by user is preserved.

That would be bad in my opinion, because if user forgets to give
a column name the module can modify his data. It sounds too Windows like,
I mean it automaticaly does something what you dont want.

I suggest to add a new flag (e.g. -c) to create a new column
(specified by user) if it does not exist.


I consider the inconsistency between those 2 groups of
commands as a problem. Most GRASS vector modules read input
and write output. Only the modules updating tables (v.to.db, v.distance,
v.what.rast) modify existing vector. If a user specifies wrong column name
he can demage his data.

Radim




More information about the grass-dev mailing list