[GRASS-user] create a new vector map and add attributes

How to create a new vector map by code and define its attribute table?

http://trac.osgeo.org/grass/browser/grass/trunk/vector/v.random/main.c

2011/10/27 Mohammed Rashad <mohammedrashadkm@gmail.com>:

How to create a new vector map by code and define its attribute table?

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Mohammed,
maybe you could have a look at this page :

http://grass.osgeo.org/gdp/html_grass64/v.in.ascii.html

Hope this helps,
Vincent.

Le jeudi 27 octobre 2011 à 16:43 +0530, Mohammed Rashad a écrit :

How to create a new vector map by code and define its attribute table?

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi,

2011/10/27 Mohammed Rashad <mohammedrashadkm@gmail.com>:

How to create a new vector map by code and define its attribute table?

v.edit map=new tool=create
v.db.addtable map=new columns="cat int, label varchar(250)"

Martin

PS: in GRASS 7 omit "cat int,"

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

2011/10/27 Martin Landa <landa.martin@gmail.com>:

Hi,

2011/10/27 Mohammed Rashad <mohammedrashadkm@gmail.com>:

How to create a new vector map by code and define its attribute table?

v.edit map=new tool=create
v.db.addtable map=new columns="cat int, label varchar(250)"

I see "by code", so take a look at v.edit module (TOOL_CREATE).

Martin

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