3

I have a shapefile with a polygon in it, and I am trying to the latitudes and longitudes associated with it so I can use them with the Google Maps API.

So far I have been working with QGIS Lyon and have managed to get some sort of coordinates, but they are not compatible with Google Maps. This is what the coordinates look like in the CSV:

"shapeid","x","y" "0.0","543905.4","183199.1" "0.0","543905.0","183198.9" ...

I have used a plugin called MMQGIS to get the values in the CSV file.

I have also tried to use Vector->OpenStreetMap->Download Data, and this does give coordinates in the right format, but the output file is very large, 12MB, and it has around 92k nodes, which is definitely way too many.

I've come to a point where I can't think of anything else and Google isn't being very helpful either (or maybe I'm not doing the right search).

So, it would be very helpful if someone could point me to the right direction.

  • 1
    save your shapefile into a new shapefile with a wgs84 (epsg 4326) projection . this new file will have lat/lon values . see here: gis.stackexchange.com/questions/35590/… – Kurt Feb 13 '16 at 23:08
  • @Kurt I've tried this and I'm still not getting the latlngs in the format that I need – Shahzad Feb 14 '16 at 12:37
1

For anyone who is trying to achieve similar results:

I managed to get the latlngs in the format required by Google Maps API, by following these steps:

  1. Select the Save as... option after right-clicking on the loaded layer
  2. Choose Keyhole Markup Language [KML] as the format
  3. Set CRS to EPSG:4326 - WGS 84

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.