I am wondering if it is possible to export a list of coordinates of a shapefile layer in QGIS 3.18. The attribute table only shows height information for every single point but no x and y coordinate. When I select one point with the object indentifier x and y coordinates are displayed.

x and y coordinates with object identifier


2 Answers 2


There are two way to do that depending on what you want to do.

If you want to have the coordinate in your shapefile (and in any format you export after that), you could use the "add geometry attributes" tool (that create a new layer) or manually add the column in your existing attribute table and use the field calculator to fill coordinate (use $x and $y as expression). Note that the coordinate in the attribute table do not auto-update so if you move your point you will need to recalculate the coordinate.

If you just need the coordinate in a text file you could export your data to CSV (right click on your layer then Export>Save Features As... and choose "Comma Separated Value [CSV]" as format) then on the "Layer Options" section you could choose the geometry format that will be added to your export.

enter image description here


Some alternatives:

ogrinfo -al shape.shp and some scripting.

ogr2ogr -f BNA output.bna shape.shp may be easier to manipulate.

In QGS, export shape to BNA format. You could also use KML, GML

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.