When using the $x and $y commands in the field calculator to get coordinates of features in a point layer, the coordinates I get are different than if I point the feature with my cursor. The deviation is over 200m metres between de coordinates given by the field calculator and the ones given by the cursor in the current map coordinate window. The project and all layers are set to EPSG 25831. To confere how big is the difference between coordinates generated depending on the tool or the way you calculate them I proceeded as follows:
- I created a point layer with fields set to give the x and y coordinates through the $x and $y field calculator expressions.
- I drew a point feature using the advanced editing tool to set x and y coordinates (in my case 276790 - 4548743).
- This same point feature is given an X and Y coordinates by the field calulator expressions, quite different than the ones I set to create the point feature. More specifically these are 276880 - 4548943.
- I repeated de procedure of drawing a point feature with the 276880 - 4548943 coordinates using the advanced editing tool, resulting in a displacement of 219m between the two points.
This kind of inaccuracy can lead to serious errors in the final results the qgis project is expected to produce.
x($geometry)
?