[GRASS-user] v.to.db

Martin Landa landa.martin at gmail.com
Tue Jan 20 15:30:35 EST 2009


Hi,

2009/1/20 Markus Neteler <neteler at osgeo.org>:

[...]

> Looking at the code I see
> http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/vector/v.to.db/main.c#L44
>    Fi = Vect_get_field(&Map, options.field);
>
> I added a local debug statement and found options.field==2 as you
> defined via "layer=2".
>
> Subsequently nothing is found since AFAIK the fields internally start
> with 0, not one. I may be wrong though.

no,

that's right for Vect_get_dblink() not for Vect_get_field() which
takes as argument layer number not layer index.

> Anyone here having an idea?
>
> The function is:
> http://download.osgeo.org/grass/grass6_progman/field_8c-source.html#l00400
> struct field_info *Vect_get_field(struct Map_info *Map, int field)

should be fixed in r35515.

Martin

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


More information about the grass-user mailing list