1

I'm using QGIS to extract centroid coordinates in a multi-shape object from a project I was given. I want the coordinates to be regular latitude an longitude, but they're coming out huge (see below).

These locations are in New York City, so x and y should be somewhere around 74 longitude and 41 latitude. I tried to use this:

How to get correct format of coordinates for export to geojson from QGIS?

where I set the CRS layer for my shapefile and centroids to be EPSG:3628 but it doesn't appear to have worked. I have the same results using the CRS found originally in the project folder. I think these are not the problem as adding an OpenStreetMap layer using either CRS displays New York City.

marked as duplicate by underdark qgis Apr 2 '18 at 12:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

You have to save your data in the desired CRS, just setting stuff wont work (that easy). Currently your corrdinates seem to be in UTM (northing from the equator and easting/westing from one of 60 meridians, depending on where you are on the earth, all in [m]).

You either save your data in the desired CRS and proceed as you did, or you embrace the field calculator and use transform(geom,currentCRS,targetCRS) with both $x and $y to add both x- and y-coords in the desired CRS to your attribute table.

  • I did a little searching in the documentation and came up with the following: transform($x, 'EPSG:3628','USER:100000') I chose the second argument based on the information tab of the layer properties. I also tried it using 'UTM'. However, both return the error 'Cannot convert to geometry'. Thank you for your help thus far. – CollatedBlin Apr 1 '18 at 21:36
  • 1
    3628 looks like an EPSG code and maps to NAD83(NSRS2007) / New York Long Island (ftUS). The coordinate values do fit with this projected coordinate reference system. Erik, the Y values are 200k. That means near the Equator, not in the US. – mkennedy Apr 2 '18 at 21:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.