1

I'm using QGIS 2.4 and am opening a shapefile I downloaded (specifically from: http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_coastline.zip).

What I would like to do is convert the shapefile to EPSG:3857 and then save it as a KML (or some other format easily readable by OpenLayers). I attempt to do this within QGIS by opening the shapefile (EPSG:4326), right clicking on the layer->Save As then I choose KML, set my CRS to EPSG:3857 and then I save.

Unfortunately, after opening the new file in QGIS it always tells me the layer is still EPSG:4326. I am opening from a clean project in QGIS (so as to be sure its not inheriting the projects projection). All the things I have read online tell me to convert projections in this way. Additionally, I am getting no weird output in the terminal from which I have opened QGIS.

Am I missing something here or doing something wrong?

migrated from stackoverflow.com Sep 22 '14 at 10:57

This question came from our site for professional and enthusiast programmers.

  • Ah, good idea. Thanks for the help. I guess I cant directly move the question, so I will have to ask it again there... – Jim Sep 17 '14 at 21:36
  • Are you trying to save a map or a layer in a different projection? ou can re-project a layer to display it differently than its native projection by setting the project CRS to the one you like. Saving the layer in a different projection should be Look into the global CRS settings. It is usually set to start all projects as WGS84 and to re-project the layers to that CRS – Pedro Camargo Sep 18 '14 at 19:40
2

From the GDAL manual http://www.gdal.org/drv_kml.html:

Note that KML by specification uses only a single projection, EPSG:4326. All OGR KML output will be presented in EPSG:4326. As such OGR will create layers in the correct coordinate system and transform any geometries.

So there is nothing much you can do about it, except looking for another file format.

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.