- Software: QGIS 3.20
- OS: Any
- Updated: August 2021
If you want the x and y coordinates for point data it’s fairly simple to do in QGIS 3.x. There’s actually two ways you can go about doing this and this tutorial will show you how to use Field Calculator.
Add your data to QGIS. Start editing by right clicking the layer and selecting “Toggle Editing”. You can also click the editing icon on the digitizing toolbar. Once you are editing, open Field Calculator located on the attributes toolbar.
Once open you can calculate a new field with the correct coordinates. Add a field called xcoord and add $x_at into the expression builder. Click OK and you have a new field called xcoord that has been calculated.
To repeat with the y coordinate just add a ycoord field and use $y_at in the expression builder. Open the attribute window and you will see your new data.
Your new columns will be in the projection of your data – not in the projection of the QGIS Map Canvas.