Converting x y coordinates to longitude latitude using QGIS?
I'm working with this downloadable shapefile that has X Y coordinates. They are akin to
I would like to convert them to longitude latitude so they are more like
I've seen this question tackled using ArcMap however I don't have that software. I was able to download and install QGIS but I am unfortunately perplexed by its complicated interface. Would like to do the conversion with it, if possible.
ArcGIS seems to be an aside - the numbers could have come from anywhere but it appears you want to know what QGIS can do to import and project them.
You say you have it in ESRI format, what do you mean? It's a Shapefile? Or is just a text file with coordinates? Besides, like you saw in the question you linked, you need to know the input Coordinate Reference System (CRS)(in your case a projected one), and the CRS of the Lat, Long you want (Geographic), you probably want the WGG84 (the one used by GPSs). Without that you can't accurately transform any pair of coordinates. Take a look at "Gentle Introductuion to GIS, chapter 7 - Working with projections"
The example X, Y and lng/lat I gave should be an exact pair. I mentioned ArcGIS as that is the software linked to by the website from which the dataset came from. I've included a link to the complete dataset in the question.
Your dataset link just references another question here. Regardless, the fact that the data originated in ArcGIS is irrelevant. As others have said, you need to know the input (source) coordinate system in order to properly transform to lat/long.
The dataset you mention is a shapefile, a format invented by ESRI, but understood by most GIS software, including QGIS.
After extracting the zip, you can add it with
Add vector layerand point to the .shp file. The CRS information is stored in the .prj file, and the layer CRS will automatically set right by QGIS. In your case,
NAD_1983_StatePlane_Louisiana_South_FIPS_1702_Feetwith US feet as units.
openlayers plugin, you can add a Openstreetmap or Google background layer. For doing that, you have to set the project CRS to
If you want coordinates in lat/lon degrees, just rightclick on the shapefile layer, and
Save as ...to a new file under a different name, selecting
EPSG:4326as CRS for that, and check to add that layer to the canvas. Saving may take some time.
For the next step, you better zoom in to see just a couple of points. Open the attribute table, and click on the pencil symbol at the bottom to enter the edit mode, and then the field calculator icon bottom right. Create a new field named degx, type
6, and select
geometry. After saving (which takes some time), do the same for degy and
$y. Leave edit mode, then the attribute table.
The new columns in the attribute table give you lat and lon in degrees.
Worked perfectly! Then I was able to export the layer as a CSV with the newly added attributes and have exactly what I need! Thanks!
I followed these steps exactly and my degx and degy are all NULL. Any idea what I did wrong?
Just FYI, I found the answer. GIS files can come in lines, points, or polygons (maybe more?). My GIS file was saved as lines, I needed to extract the point info and then I could easily get the coordinate info.