[GRASS-user] Adding attributes to vector map

I want to be able to add additional attributes to existing vector layer in GRASS. For point and polygons I want to query the existing cat or attributes and then add data in a new field from information from a external file.

For example, I want to query the US County map polygons for county name and select the value to be uploaded for that county from an external file.

I am not sure what’s the best way to do it. I would appreciate any tips to do it using GRASS functions and/or Python API.

Thanks,

Jitu

Hi Jitu,
There are many ways you can do this.
Built in database modules you should look at are v.db.join in the
Database--> Vector database connectsion and modules under the Vector-->
Update Attributes menu.
However, GRASS supports a range of database backends, sqlite by default
in GRASS 7 and dbf (X-base) before version 7. You could use the
interfaces that come with these database packages and plain SQL (both in
and out of GRASS) to do your table manipulation.
The latter is more flexible.
Hope this helps.
Cheers,
Ravi

On 03/20/2014 06:56 PM, Jitendra Kumar wrote:

I want to be able to add additional attributes to existing vector
layer in GRASS. For point and polygons I want to query the existing
cat or attributes and then add data in a new field from information
from a external file.
For example, I want to query the US County map polygons for county
name and select the value to be uploaded for that county from an
external file.

I am not sure what's the best way to do it. I would appreciate any
tips to do it using GRASS functions and/or Python API.

Thanks,
Jitu

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

--
R.S. Bhalla, Ph.D.
Research Associate
Foundation for Ecological Research, Advocacy and Learning (FERAL)
Ph. +91 413 2671566, Fax. +91 413 2671567
Web: http://www.feralindia.org/drupal/users/rs-bhalla