3

How can I get just Coordinates (in a file) from point features (shapes) without a big hustle. Something like Shape to .xls, with distinct coordinates?

I want to use this coordinates immediately, so GPX is no solution.

nmtoken
  • 13,355
  • 5
  • 38
  • 87
surftrial
  • 39
  • 1
  • 1
  • 2

2 Answers2

12
  • Open your point shape in QGIS
  • Check that the projection is right and open the "Export/Add Geometry Values" function in the vector menu -> Geometry tools.
  • This will add two columns to your point shape containing the exact coordinates.
  • Now you can export the attribute table to a external program. Here the easiest ways to do that
    • Select all points and simply press CMD+C (Copy) and paste it into Excel
    • Use the mmqgis plugin (mmqgis -> transfer) to export the geometry or the coordinates directly. You'll get a comma delimited file (.csv), which can be opened in Excel.
    • The XY-tools plugin directly allows exporting to a xls File.
Curlew
  • 8,152
  • 5
  • 36
  • 72
  • Hi Curlew, thanks for your guidance! As I intended to do the best fit, using XY-tools for deriving directly coordinates from the shape I'm experienceing some trouble with the python xlw and xlrd libs. – surftrial Feb 06 '13 at 13:23
  • Guess i got it done! thx – surftrial Feb 06 '13 at 14:09
  • You can also use the field calculator of the attribute table in order to calculate the coordinates. To do so the point layer must be in edit mode. Then save the shp file as a csv file – Gerardo Jimenez Feb 06 '13 at 14:31
2

OPTION 1:

  1. Select the layer you would like to export csv with XY values
  2. Click browse, and select the location where you would like your file to be stored, give it a name;
  3. In your Layer Option of your "Save Vector as" window select Geometry as XY
  4. Click OK

Not sure if that was what you were after, the other Option could be

OPTION 2:

  1. Click on the shape layer you would like to generate x and y values
  2. Click on the Open attribute icon
  3. Click on the Open field calculator icon
  4. Check the create a new field
  5. Write your new field name (eg. x)
  6. Select in your Output field type Decimal number
  7. In the function search box write $x (it should be under Geometry)
  8. Double click (it should now show up in the expression)
  9. Click OK

You should now have and X column. Do not close the Attribute table, repeat step 3 to 9, changing step 5 by naming your column y and your step 7 by writing $y. You should have generated the X and Y values you required.

Hope it works..