5

When I transform tiff from 4326 to 3857 and from 4326 to 900913 in gdal, I get different result(when display in Qgis) eventhough these two projections(3857 and 900913) should be the same. What is problem for that?

Image shows differance. Brighter(white) layer is from epsg 4326 to 3857 and darker(black) layer is from epsg 4326 to 900913. I know it's not a real standard, but in gdal gdalsrsinfo -e epsg:900913 and gdalsrsinfo -e epsg:3857 are same,I mean both have same proj.4. So I don't understand, why are layers differently displayed in Qgis.

enter image description here

9
  • could you describe in detail what differences you see? Maybe an image would be a good idea. You should also know that EPSG:900913 is not a real standard. That is something that OpenLayers used at one time, but it's not codified in the EPSG registry. Maybe that is why GDAL does not recognize it, and produces wrong results. Commented Jan 23, 2014 at 11:19
  • How much offset do you get?
    – AndreJ
    Commented Jan 23, 2014 at 11:30
  • Offset is only in vertical direction. It's about 21 km.
    – aaabbb
    Commented Jan 23, 2014 at 13:18
  • what is the projection used in QGI for the display ?
    – radouxju
    Commented Jan 23, 2014 at 13:33
  • I'm using enable "on the fly CRS transformation" for wgs 84(4326).
    – aaabbb
    Commented Jan 23, 2014 at 14:00

1 Answer 1

5

I did the reprojection from a WGS84 hgt DEM once into EPSG:3857 and once EPSG:900913 using QGIS Lisboa.

While the first one is added to the canvas at the right place, the second is misplaced 21km North (as for you).

Rightclick -> Set CRS for layer reports EPSG:3395 is assigned to the 900913 layer with this proj string:

+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs

This is definitely wrong, because +datum=WGS84 is an ellipsoid and not the sphere with a=b which was used when reprojecting the data.

QGIS 2.0 Dufour does not make it better:

+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

and that is the same gdalsrsinfo reports on the file reprojected by the same GDAL version to EPSG:900913.

Assigning EPSG:3857 to the layer moves it back in its correct place.

Just one more reason to avoid EPSG:900913 and use the offilical EPSG:3857. Here is some more background to the topic: http://alastaira.wordpress.com/2011/01/23/the-google-maps-bing-maps-spherical-mercator-projection/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.