1

I'm new to GIS. I have a shapefile (shp) that I need to add lat/lng coordinates too.

I used QGIS to open the file and selected:

Processing->ToolBox->QGIS geoalgorithms->Vector geometry tools->Extract nodes to add nodes to the file. I set the coordinate system to WG84G, when I go to add the $x coordinates I get output of 585292.76.

I believe it's the coordinate system not being correct but not sure which one I should be selecting.

marked as duplicate by underdark qgis Feb 7 '16 at 20:47

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.

  • Welcome to GIS.stackexchange. A few clarifying questions: 1) Is your shapefile of points only? 2) You want the x & y to be values in the attribute table? Why? 3) Why are you running extract nodes? 4) Where are you writing $x? If your coordinate system is 4326 your x & y should be in degrees gis.stackexchange.com/questions/23690/… – raphael Feb 7 '16 at 7:11
  • 1. Shapefile file just has line length (shape_len). 2) That is correct need to have x,y values in the attribute table, converting the shp file using third party software from signal pro to gcv file and requires shp file to have lat/lng coordinates. 3) Running extract nodes to have points that can get lat/lng coordinates assigned. 4) Writing to attribute table. My coordinate reference system set to EPSG:102007, Hawaii_Albers_equal_conic. Its streets from honolulu. – TOD Feb 7 '16 at 8:03
2

Probably the CRS of your layer is not WGS84. First Save your layer using Save as ... from the popup menu of the layer, select WGS84 (EPSG:4326). After it in the new layer you will have latitude, longitude using $x and $y.

Be careful about the projection setting of your original layer. If it is false the result of Save as will be false too. You can see and change the projection setting of a layer in the layer properties dialog (General tab).

  • Thanks that worked, wasn't setting layer to WGS84. The last step you need to extract nodes and then was able to retrieve lat/lng. – TOD Feb 7 '16 at 18:31

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