Hi Alexander, On Fri, Aug 24, 2012 at 11:42 AM, Alexander Muriy <[email protected]> wrote:
> Hi Margherita. > > I have a vector of polygons and i want to create a vector of points with >> the centroids of the polygons, with a connected table showing their >> coordinates. Which is the simplest way to do that on G7? >> >> > In GRASS 6.4.*: > -- extract centroids from polygon map > v.extract in=poly out=centr type=centroid > -- if needed convert centroids to points > v.type in=centr out=centr_pts type=centroid,point > -- add attribute table to points > v.db.addtable centr_pts col="x double,y double,z double" > -- insert coords in table > v.to.db TMP_centr_pts option=coor col=x,y,z > > I think in GRASS 7.0 it will be similar. > Yes, indeed. I used: v.extract in=poly out=centr type=centroid v.type in=centr out=centr_pts from_type=centroid to_type=point v.db.addcolumn map=centr_pts col="x double precision,y double precision" v.to.db map=centr_pts option=coor col=x,y Thanks! -- Dr. Margherita Di Leo
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
