Reprojecting "Admin 0 – Countries" to Web Mercator

Home Forums Natural Earth Map Data Cultural Vectors Reprojecting "Admin 0 – Countries" to Web Mercator

This topic contains 1 reply, has 1 voice, and was last updated by  dmillz 4 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #4710



    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)

    I receive this error for both “ne_10m_admin_0_countries” and “ne_10m_admin_0_countries_lakes”.

    A post on 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.

    Can anyone provide some assistance and/or confirm that there’s a problem with the 1:10m shapefiles?





    I received a small amount of assistance with this on StackExchange:

    Short answer: The 1:50m shapefile has its southernmost line at approximately -89.9989, while the 1:10m is at -90.0. When attempting to reproject the portion of the feature at -90.0, the projected point goes to infinity and triggers the error.

    In order to work around the problem, 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: 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:

    * Same file, but reprojected into Web Mercator (EPSG:3857):

    I hope this helps other folks who might run into the same issue :-)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.