0

I have a shapefile, currently uploaded into QGIS of some vectors. I took the coordinates of the middle of these vectors in order to find their x and y coordinates. These coordinates are for instance: X 189372,586045238 and Y 519791,329052381. However, I need the long lat coordinates in order to link this data to other databases.

Already tried selecting EPSG:4326 as CRS, the tip in: Converting x,y coordinates to longitude,latitude using QGIS However, the coordinates do not change into the coordinates I want as a result.

Also tried the programming solution (Python) mentioned in: Converting x,y coordinates to longitude,latitude using QGIS However this code gives a lot of errors and results in nothing for me.

I think I'm missing something. What is it?

Borisjan
  • 9
  • 2

1 Answers1

0

When you say that the coordinates do not change into the ones you want, do you mean in the attribute table? Follow the steps in the comments to transform the projection into EPSG:4326.

The values in the attribute table will not change, but you can populate new ones by using the answer to this question:

How to determine the centroid of polygons?

GeoMonkey
  • 1,357
  • 11
  • 26
  • I tried what they told me in the link you sent. However, this doesn't result in EPSG:4326 for me. The comment in the link also says: The result looks something like: 397640.915545362 , 2126924.53637653 Which are not the north and east degrees I need – Borisjan Nov 29 '22 at 12:38
  • @Borisjan did you first transform the vector to EPSG:4326? – GeoMonkey Nov 29 '22 at 14:55
  • 1
    Thanks, I found the problem! It was indeed first transfering the vector to EPSG:4326 and afterwards extracting the middle coordinates – Borisjan Nov 30 '22 at 11:09