[Qgis-developer] Openlayers plugin issue

Dane Springmeyer blake at hailmail.net
Wed Feb 24 12:02:51 EST 2010

Mathias and Marco,

This is fantastic, great summary of the issue and thanks for adding  
the projection. This has been on my mind too, in the sense that 3875  
will not work due to the exact problems Mathias identifies and it  
would be great if datasources opening in QGIS in 900913 could be auto- 

One additional thought: I tend to always add a +over to my 900913 proj  
string, which was recently highlighted by Frank:


Does the QGIS machinery of idenfying srs "matches" and whether to  
transform coordinates ever need to operate on the exact proj4 literal,  
or should I not worry that subtle differences like this would matter  
to QGIS? Here I'm thinking about tables in postgis that might be  
registered in 900913 but use this slightly different proj4 literal, or  
in the case where I (via a plugin) have assigned that proj4 literal to  
the map Canvas.


On Feb 24, 2010, at 2:29 AM, Marco Hugentobler wrote:

> Hi Mathias
> 900913 is added in r12969.
> Regards,
> Marco
> Am Mittwoch, 24. Februar 2010 10.26:25 schrieb Mathias Walker:
>> Hi Marco
>>>> The custom SRS should have the following Proj4 config:
>>>> +proj=merc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +a=6378137 +b=6378137
>>>> +units=m +no_defs
>>> What is the epsg id of this srs? I'd like to include it to srs.db  
>>> to have
>>> it available by default.
>> OpenLayers calls the Spherical Mercator projection EPSG:900913. It  
>> should
>> be equivalent to the deprecated EPSG:3785 (http://www.epsg-
>> registry.org/export.htm?gml=urn:ogc:def:crs:EPSG::3785) which became
>> EPSG:3875
>> (http://www.epsg-registry.org/export.htm?gml=urn:ogc:def:crs:EPSG::3857 
>> ),
>> but in fact they are not exactly the same.
>> OpenLayers EPSG:900913 (http://trac.openlayers.org/wiki/SphericalMercator 
>> ):
>> +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 +no_defs
>> When setting up a QgsCoordinateReferenceSystem with this definition  
>> it
>> returns the following Proj4 definition (which is used by the plugin):
>> +proj=merc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +a=6378137 +b=6378137  
>> +units=m
>> +no_defs
>> EPSG:3785 is already available in QGIS as:
>> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
>> +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
>> When using EPSG:3785 as project SRS there is a huge offset to the  
>> south of
>> the reprojected data relative to the Google map.
>> It is confusing why EPSG:900913 and EPSG:3785 are not the same,  
>> although it
>> is very often claimed they are identical.
>> To include it in the srs.db, it's probably best to use the  
>> inofficial EPSG
>> id 900913 for the Spherical Mercator projection. This would be at  
>> least
>> consistent with the OpenLayers definition.
>> Best regards
>> Mathias Walker
> -- 
> Dr. Marco Hugentobler
> HUGIS - GIS programming and consulting
> Webereistr. 66
> CH-8134 Adliswil
> marco at hugis.net
> http://homepage.hispeed.ch/hugis/
> Technical Advisor QGIS Project Steering Committee
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

More information about the Qgis-developer mailing list