[Qgis-user] Write Coordinates to Attribute Table

Jacolin Yves yjacolin at free.fr
Thu Aug 21 06:25:25 PDT 2008


Le Thursday 21 August 2008 15:11:57 Darren Cope, vous avez écrit :
> Hi all,
>
> I'm looking for a way to write X/Y coordinates for a point shapefile
> back into two columns (X/Y) in the shapefile's attribute table.  Can
> QGIS do this?  If so, how?  If not, is there another open source tool
> that can perform this operation?  Ideally, the less steps required the
> better, as this is something that will need to be repeated multiple
> times--thus a script would be ideal!
>
> Cheers,
>
> Darren Cope
> http://dmcope.freeshell.org
> http://bluesignweekly.blogspot.com/
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user

Hi,

You can use python modules as shapelib [1] or use a postgis script (SELECT 
x(the_geom),y(the_geom) FROM ...).

Python script can be use inside QGIS (in the module shell) or in a plugin.

Y.
[1] http://trac.gispython.org/lab/wiki/Shapely
-- 
Yves Jacolin
---
http://softlibre.gloobe.org



More information about the Qgis-user mailing list