[GIS] Exporting polygon shapefile with lat/lon points

formatlatitude longitudeqgis

By copying rows of the attribute table of a polygon shapefile, I figured out how to extract the points of the given polygon but to my surprise, they are formatted backwards:

POLYGON((
-87.529571533203125 34.55934906005859375,
-87.52953338623046875 34.3049163818359375,
-87.93964385986328125 34.31328964233398438,
-88.17311859130859375 34.32147979736328125,
-88.1404571533203125 34.58187484741210938,
-87.95177459716796875 34.57530975341796875,
-87.52912139892578125 34.56753158569335938,
-87.529571533203125 34.55934906005859375))  

Is there a way to export these points in the same way but formatted as lat/lon xx.xx, -xx.xx points?(only US counties are being processed).
If not and post-formatting is the only option, if there is anyone out there who has already done this…how?
If not I guess I will just have to write a formatting script but it will be a pain to execute on all 4703 counties.

Best Answer

Use MMQGIS plugin

It is available from the Manage and Install Plugins item, search for mmqgis

These tools will appear with their own menu item MMQGIS, use the Import / Export | Geometry Export to CSV.

Two files will be created. You want the "nodes"

Once you have this new file in a spreadsheet, move the columns around. Then the next steps depend on the import requirements of your program. Look at the structure of the nodes file created by MMQGIS and note how the shapeid column gives an index of the polygons.