[GRASS-dev] easy way to load x, y (of centroid) and top, bottom, left, right coordinates to attribute table?
Moritz Lennert
mlennert at club.worldonline.be
Sat Jan 28 02:26:06 PST 2017
On 27/01/17 21:35, Helmut Kudrnovsky wrote:
> hi,
>
> is there an easy way to load x,y (of centroid) and top, bottom, left, right
> coordinates of every geometry (polygon, line) to the vector attribute table?
For the centroid coordinates:
v.db.addcolumn YourMap column="x double precision, y double precision"
v.to.db YourMap op=coor col=x,y
For the bounding box coordinates, I don't know any easy way. Would be a
nice thing to have in v.to.db (see [1]).
Moritz
[1] http://trac.osgeo.org/grass/ticket/2122
More information about the grass-dev
mailing list