[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grass-user
Subject:    [GRASS-user] add columns for x and y coordinates to vector db
From:       otto.dassau () gmx ! de (Otto Dassau)
Date:       2008-04-23 2:11:07
Message-ID: 20080423081040.4d5d9566 () nature
[Download RAW message or body]

Hi Brandon,

On Tue, 22 Apr 2008 22:22:52 -0700
"Brandon M. Gabler" <bgabler@email.arizona.edu> wrote:

> I have searched the archives, but cannot seem to find the answer.
> 
> I have a vector file, with 700 sites. I want to add columns for  
> x_coord and y_coord (or easting and northing, or whatever), so that  
> the columns represent the centroid coordinates of each site in the  
> vector database. So, for CAT #1, I want the column 'easting' to  
> update with the easting of CAT #1, and the column 'northing' to  
> update with the northing for CAT #1, and so on for all CAT numbers in  
> my file. I'm sure there is an easy script for v.db.update, but wanted  
> to check with the list before reinventing the wheel. Has anyone  
> created a script for such a thing, or is there a command within GRASS  
> that I'm missing?

you can use v.db.addcol to create two new attribute columns for x and y and then
use v.to.db with the option 'coor'.

regards,
 Otto

> Thanks,
> Brandon

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic