[Qgis-developer] Openlayers plugin issue

Marco Hugentobler marco at hugis.net
Wed Feb 24 05:29:19 EST 2010

Hi Mathias

900913 is added in r12969.


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
Technical Advisor QGIS Project Steering Committee

More information about the Qgis-developer mailing list