I wonder if someone can clarify as I'm confused.

I need to load planet OSM data into PostGIS so I downloaded a small data set of a UK County and followed the instructions here loading the Google Mercator projection 900931.sql first.

looking at the data in GeoServer the co-ordinate readout on the location bar appears to be in metric East / West and not Longitude/Latitude yet the osm wiki states World Geodetic System 1984 is the coordinate system of OSM data.

What am I doing wrong?

Also is there a best practice for displaying OSM as a base layer?

Where can I get a Point.sld from?

  • check some coordinates in your nodes table - do they look like they are decimal degrees between +/- 180 / +/- 90? GeoServer may be projecting the data as it's rendered because of your layer configuration or WMS URL parameters
    – tomfumb
    Apr 21, 2012 at 20:22

2 Answers 2


OpenStreetMap stores data in WGS84 coordinates. You can check this by downloading the XML data for any OSM node:

 $ curl "http://www.openstreetmap.org/api/0.6/node/327031143"
 <?xml version="1.0" encoding="UTF-8"?>
 <osm version="0.6" generator="OpenStreetMap server">
   <node id="327031143" lat="44.4795174" lon="26.0865814" [..]>

However, the tool that imports the OSM data to postgresql (osm2pgsql) defaults to re-projecting node coordinates:

$ ./osm2pgsql --help

This will import the data from the OSM file(s) into a PostgreSQL database
suitable for use by the Mapnik renderer

   -l|--latlong     Store data in degrees of latitude & longitude.
   -m|--merc        Store data in proper spherical mercator (default)
   -M|--oldmerc     Store data in the legacy OSM mercator format
   -E|--proj num    Use projection EPSG:num
   -u|--utf8-sanitize   Repair bad UTF8 input data (present in planet

If you use the -l option, the postgresql database will contain WGS84 coordinates (EPSG 4326).


World Geodetic System 1984 is not a coordinate system. You can have coordinates Easting/Northing and Lat/Long both referenced to WGS84.

  • How might i do that? set the srs to 4236 on import?
    – Holly
    Apr 22, 2012 at 13:43
  • @Holly - I believe you mean 4326 which is WGS84. OSGB is 27700. Anyway, I don't believe Spharios is being entirely clear; typically if something is in WGS84 then it'll be Lat/Lon. If its in OSGB then it'll be in metres (eastings/northings). Apr 23, 2012 at 9:07
  • OSM use the Google Mercator projection SRID=900913 wiki.openstreetmap.org/wiki/Projection
    – Mapperz
    Apr 23, 2012 at 14:44
  • 1
    @Mapperz: No, OSM database stores WGS84 coords. The rendering toolchain (mapnik) is configured historically to use 900913 so the importer (osm2pgsql) defaults to re-projecting data to Mercator when creating a Postgresql database for rendering purposes.
    – diciu
    Apr 23, 2012 at 15:11

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.