Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am very new to QGIS, so please bear with me.

I have a ".shp" file, which is contains a set of boundaries for suburbs of Australia. I opened it to QGIS and I would like to export it into a CSV file so that the final file would be like following.


When I select "Layer > Open attribute table" I can see the "postcode" column.

I had a look at a similar question here

Get list of coordinates for points in a layer?

Which told me to simply go to "Layer > Save as" and then type "GEOMETRY=AS_XY" or "GEOMETRY=AS_XYZ" in the "Layer" section of the "OGR creation options".

I followed exactly, but the latitude and longitude values are not being returned.

I feel like I'm quite close! Could someone please help me.

Thank you.

share|improve this question
related: gis.stackexchange.com/questions/43129/… –  underdark Jan 14 '14 at 19:52

3 Answers 3

up vote 7 down vote accepted

You're looking at the right question, just not the right answer! The reason that that worked for the answer you were looking at is that the data was only in points. Since your data is in polygons, it won't work.

BWill's answer further down is what you need. It will copy all the co-ordinates describing each polygon into WKT format, which is a standard format, although you may need to do some cleaning up depending on your purpose.

share|improve this answer

I see 2 solutions: 1st you could create 2 attributes to store your lon/lat: - select your layer - toggle to edit mode - open the attribute table - open the attribute calculator (ctrl+i) - name your column, choose the predefined geometry function $x, $y (in that dialog)

second solution (works for all gemetry types) - select your shp layer - save as ... - choose txt format - put GEOMETRY=AS_WKT in the OGR layer option

you will end up with a text file with the layer attributes and geometry as WKT

share|improve this answer
I just see the title of the post, so consider only the second solution :-) –  user14131 Jan 10 '13 at 15:45

Now there is a great plugin produced by Michael Minn that does exactly what you're looking for. Just update your plugin repository and install MMQGIS. I just tried it out and it worked great.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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