[GRASS-dev] v.in.db should look for file

Now that Martin fixed the wxPython gui for v.in.db, I see a problem I had not previously noticed. That is, the module looks for vector tables. However, the objective of this module is to find a database table (recognized by a GRASS driver) anywhere on a user's computer and create vector points from its x and y coordinates.

So instead of looking for a vector table, it should be looking for a file. In main.c (lines 56-58), would this be ...

     table_opt = G_define_standard_option(G_OPT_F_INPUT);
     table_opt->required = YES;
     table_opt->description = _("Input table name");

instead of the current...

     table_opt = G_define_standard_option(G_OPT_TABLE);
     table_opt->required = YES;
     table_opt->description = _("Input table name");

??

I'd change this, but I'm not sure if anything else needs to change too.

Michael

Hi,

2009/3/1 Michael Barton <michael.barton@asu.edu>:

So instead of looking for a vector table, it should be looking for a file.
In main.c (lines 56-58), would this be ...

table_opt = G_define_standard_option(G_OPT_F_INPUT);
table_opt->required = YES;
table_opt->description = _("Input table name");

instead of the current...

table_opt = G_define_standard_option(G_OPT_TABLE);
table_opt->required = YES;
table_opt->description = _("Input table name");

no, G_OPT_TABLE is right. v.in.db creates new vector (points) map from
database table not fro the file!

M.

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa