2

I have tried different open source tools to transform a world data shapefile from EPSG:4326 to EPSG:3857 but I always have an error. I'm not sure, but is it because of Antarctica?

I have tried with GDAL and QGIS and both are unable to do it. Why is it so complicated and how to do it?

The .prj is:

GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]

nmtoken
  • 13,355
  • 5
  • 38
  • 87
Below the Radar
  • 3,593
  • 1
  • 31
  • 58
  • 1
    Can you open the .prj file and copy the contents of the file into your question field. It may be that your data is whacked. (I would put this in the comment field, but stackexchange doesn't let me do that with low rep. stupid feature of this site) – David May 24 '13 at 19:23
  • I copied it in the edit – Below the Radar May 24 '13 at 19:28
  • ok, that's totally not the problem. Sorry :/ – David May 24 '13 at 19:37
  • What error are you seeing, and how are you going from 4326 to 3857? You have to treat WGS84 as a spheroid with no flattening (not an ellipsoid) to get the "correct" Mercator XY coordinates. – Mintx May 24 '13 at 19:40
  • the file can be found here: http://thematicmapping.org/downloads/TM_WORLD_BORDERS-0.3.zip maybe you could try to transform it to 3857 or 900913 – Below the Radar May 24 '13 at 19:41

1 Answers1

3

The Google Mercator projection is usually bound for aereas between 85.0511° North and South.

If your data includes 90° North or South, the reprojection is mathematically not possible.

See also http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames for all kinds of lat/lon to Google Mercator conversions.

AndreJ
  • 76,698
  • 5
  • 86
  • 162
  • thats right, the data bounds are +-90 North and South. But why is not possible to transform it in Mercator if the North and South extends infinitely in this proj. see: http://www.radicalcartography.net/?projectionref – Below the Radar May 24 '13 at 19:49
  • 3857 is not Google Mercator... its 900913 – Below the Radar May 24 '13 at 19:50
  • EPSG:3857 and OpenLayers:900913 are equivalent definitions that are describing the internal projected CRS used by Google Maps, Bing Maps, etc. – mkennedy May 24 '13 at 19:58
  • Have you ever noticed in Google Maps that you can drag the map North and South indefinately? – Below the Radar May 24 '13 at 20:22
  • Do you mean east and west? If I zoom out in Google maps (not Google Earth), and scroll north or south far enough I see the data cut-off around 85N and 85S. – mkennedy May 24 '13 at 22:32
  • You can drag north of 85.0511, but the coordinates remain just below 90°. QGIS is not able to do a reprojection of 90° North/South because tan(90°) is undefined. – AndreJ May 25 '13 at 05:14
  • The data no but the frame of the map can be draggued north and south – Below the Radar Aug 01 '13 at 15:30
  • 1
    Yes, but never reaching 90° North/South. – AndreJ Aug 01 '13 at 16:58