2

I was wondering how I can export the temporary reprojected coordinates from a vector file. I am working in zone 50 and imported a file in zone 51. QGIS did a good job reprojecting this on the fly, however when I open the attribute table the coordinates are still in 51. I would like to export this layer as a csv with the coordinates in 50 (project coordinates).

1 Answer 1

3

The values in the attribute table will be static. As in, they are records against each feature and not linked to the Geographic Location of the feature itself.

To update the coordinates in the table, you will need to add two new fields to the reprojected vector file.

The easiest way to do this would be to open the attribute table of the reproject vector file. Go to the "Field Calculator" or press "CTRL+i".

Select the "Create New Field" toggle, and give it a name e.g. "Proj_X" and make it a "Decimal number" as the field type.

In the expression type in (without quotes): "$x"

This will give you a preview in the bottom left of the window what the coordinate will be, check it is in line with what you might expect (ie. metres and not degrees).

Hit OK and your attribute table will now have the updated X coordinate based on the new projection.

Repeat this for the Y coordinate, using "$y" in calculator, and then export the attribute table to a CSV.

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.