I haven't received a reply posting this same question on the Natural Earth forums, so I figured I'd give it a try here.
I’m trying to reproject the 1:10m "Admin 0 – Countries" shapefile into a Web Mercator projection (EPSG:3857) using QGIS. However, the reprojection fails with the following message:
Export to vector file failed. Error: Failed to transform a point while drawing a feature of type ‘ne_10m_admin_0_countries’. Writing stopped. (Exception: forward transform of (3.141593, -1.570796) PROJ.4: +proj=longlat +datum=WGS84 +no_defs +to +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs Error: tolerance condition error)
A post here on gis.stackexchange.com indicates that it might be a problem with points in Antarctica going to infinity during reprojection, but I’m not sure how to fix it if that is indeed the problem.
The 1:50m "Admin 0 – Countries" shapefiles are able to be reprojected successfully using QGIS, which leads me to believe that the root of the problem may lie in the 1:10m shapefiles.
I'm hoping that someone can expand on the answer offered in the linked post and provide answers for the following questions:
- Is there an error in the 1:10m shapefile? (Since the 1:50m shapefile reprojects without issue) Or is this sort of reprojection error just to be expected under certain circumstances?
- Exactly what steps may I take to fix the shapefile so that it can be successfully reprojected? The linked post says to "delete the objects around the south pole" but I'd prefer not to delete Antarctica. I tried editing the Antarctica feature to chop off the southernmost portion, but it didn't seem resolve the reprojection error.
Please assume I'm a GIS newbie.
RESOLUTION & NEW SHAPEFILES
Second try was the charm for me, and I was able to trim off the bottom of Antarctica using the "Reshape Feature" tool in QGIS. There's a decent description of how to use it here: https://gis.stackexchange.com/a/21651/1770. After removing the southernmost portion of Antarctica, I was able to successfully reproject the map.
To save everyone some time, I've posted the files. These are the "_lakes" files that do NOT include boundary lakes:
- Original file in WGS 84 (EPSG:4326), but with the bottom 0.4 degrees of Antarctica trimmed off. You should be able to reproject this file without issue: https://github.com/dmillz/misc/raw/master/shapefiles/ne_10m_admin_0_countries_lakes-trimmed_antarctica.zip
- Same file, but reprojected into Web Mercator (EPSG:3857): https://github.com/dmillz/misc/raw/master/shapefiles/ne_10m_admin_0_countries_lakes-EPSG_3857.zip