[OSM-dev] Mercator projection used by mapnik/osm2pgsql

Jon Burgess jburgess777 at googlemail.com
Wed Sep 12 12:17:54 BST 2007

On 12/09/2007, Raphael Jacquot <sxpert at sxpert.org> wrote:
> Jon Burgess wrote:
> > Or you can import the data in 4326 latlong format and reproject it to
> > the Mapnik/Google mercator projection using the SRID:900913 (which the
> > osm2pgsql code will add.)
> care to share the definition of that for people that need it to create
> extra layers ?

What I have currently is:

INSERT INTO spatial_ref_sys VALUES (900913, 'EPSG', 900913,
'PROJCS["WGS84 / Simple Mercator",GEOGCS["WGS
84",DATUM["WGS_1984",SPHEROID["WGS_1984", 6378137.0,
298.257223563]],PRIMEM["Greenwich", 0.0],UNIT["degree",
0.017453292519943295],AXIS["Longitude", EAST],AXIS["Latitude",
0.0],PARAMETER["central_meridian", 0.0],PARAMETER["scale_factor",
1.0],PARAMETER["false_easting", 0.0],PARAMETER["false_northing",
0.0],UNIT["m", 1.0],AXIS["x", EAST],AXIS["y",
NORTH],AUTHORITY["EPSG","900913"]]', '+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
INSERT INTO spatial_ref_sys VALUES (999, 'prj file', 999,
'+proj=merc +datum=WGS84 +no_defs');

This probably won't be much use to you though since neither osm2pgsql
nor Mapnik actually conform to this currently.

I'm reluctant to commit a new version of osm2pgsql using this
projection until I can get the whole planet-osm2pgsql-mapnik rendering
chain working correctly. Before then, I can't be completely convinced
that the above projection is correct for all cases.


More information about the dev mailing list