2

I am trying to export point coordinates from a shapefile to a CSV file. I managed to create this:

enter image description here

but I need the output to look like this:

enter image description here

I tried different options with save as... and with the MMQgis-plugin, None of them worked.

Does anyone know how to export the file to make it look like the example I gave?

  • Welcome! Have you tried searching this site for answers — this question is likely a duplicate? Also, you have different numbers in the point coordinates, so please explain what you expect to happen. – lynxlynxlynx Sep 29 '17 at 10:21
  • I searched this site for answers, but im not a native Speaker, so if there's a duplicate i could not find it with the wording i used. the different numbers in the point coordinates are a given for processing. – DavidZ Sep 29 '17 at 11:41
4

You need to create 2 columns (decimal number type) X and Y and fill them with $x and $y with the Field calculator. If you need to go fast, use the Export/add geometry column tool in Processing panel. It will add Xcoord and Ycoord columns to your attribute table. This tool can be quite useful as you can choose to calculate the coordinates in the layer coordinates system or the project coordinate system for example.

tool add geom

If you need to reorder your fields for the final output, use the Refactor Tool and save as... directly as a csv file :

tool refactor

4

In the save as dialog you will see a drop down labelled geometry which let's you choose x, y instead of wkt.

enter image description here

  • I think i never saw that option :/ This is even simpler. – gisnside Sep 29 '17 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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