Hello Leo, That's quite straightforward actually. In the field calculator (or in any other instance of expression builder) there are 2 geometry functions to achieve what you need, $x and $y.
You can either put them in separate fields or create a string to populate a single one. Something like this, $x || ' , ' || $y Would produce something like this: '1234.56 , 9876.43' Notice that the double pipe character || works as a string concatenator. And that the result is a string therefore not useful for any arithmetic operations after. Hope this helped. Best regards, Alexandre Neto Em 27/08/2014 22:37, "Leo Kris Palao" <[email protected]> escreveu: > Hi QGIS users, > > I don't know if this question has been asked before. > > Can you help me create a syntax in field calculator to add in the > attribute table the centroids coordinates for each or selected polygon > features? > > I am using Qgis 2.2 "Valmiera" version in Windows. > > Thanks in advance for help, > -Leo > > _______________________________________________ > Qgis-user mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/qgis-user >
_______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
