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.

2
  • 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
    Commented Feb 13, 2016 at 23:08
  • @Kurt I've tried this and I'm still not getting the latlngs in the format that I need
    – user39563
    Commented Feb 14, 2016 at 12:37

1 Answer 1

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 and acknowledge you have read our privacy policy.