I have a point file with an attribute table. In the attribute table I am able to display the X and Y coordinates using the field calculator. These coordinates are in ETRS89. Because the end-user of the data uses a different system (EPSG:28992) I would like to display two more columns in my attribute table with the X and Y in EPSG:28992.

I thought I'd use the transform function but I can't get it to function. I would like the values to change if I move the location of the point in my chart.

How do I fix this?


Solved this by: Setting the default value in the attributes form designer to: x(transform($geometry,'EPSG:28992','EPSG:4326')) and checking the update box This transforms from X in my native system to Longitude (WGS '84). Did the same for y to Latitude (WGS '84).

I also wanted an extra two columns in my database with the proper nautical notation. Repeated the default trick by by setting the default of these columns to: to_dm("[columname of Latitude in D,d]", 'y', 4)

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.