Hi, I have more or less the same problem than you. I am rendering OSM data (imported to PostGIS with osm2pgsql) and i need to view the map with OpenLayers on MapServer.
I am more or less on the same point than you, because when i changed on the map file all the projection info to "init=epsg:900913", the map goes blank. It comes empty with no information. Plus, the mapserver does not return any error in the log, and i really have no clue what i can do to fix this. My OSM data table (planet_osm_line) is on epsg:900913 and this is what i need to show on the map, but with no success. I have tried many options but i can never go further than this. Any clue?? Thank you ibrahim saricicek wrote: > > Hi; > > 1) is your osm data table in Epsg:4326 projection? > if so use; "init=epsg:4326" for each layer.. > 2) 'grey empty image'?? so you can get map from mapserver? > right click on a tile and copy image location. Try the copied url, is > there > an error? > > Regards.. > > > On Tue, Mar 16, 2010 at 12:20 PM, Mulone1 <mul...@rome.com> wrote: > >> >> (apologies for cross-posting) >> >> Hi everybody, >> I'm trying to render openstreetmap data on a WMS on MapServer. >> The system used to work with epsg:4326 but in our project we need a >> GoogleMaps like projection and we chose epsg:900913. >> >> These are the steps I followed to reimport everything for the new >> projection: >> >> 1) download osm xml file from Cloudmade (e.g. Italy.osm.bz2) >> 2) Run 900913.sql on my PostGIS >> 3) import that file into PostGIS with command: >> >> ./osm2pgsql -U userid -W -H host -d maps -p myprefix -S default.style -c >> -m >> italy.osm.bz2 >> >> 4) At this point everything seems ok. The geometry columns have 900913 as >> SRID. >> 5) update MapFile with: >> >> WEB >> METADATA >> wms_srs "epsg:900913" >> ... >> >> PROJECTION >> "init=epsg:900913" >> END >> >> Then in each layer I put: >> >> PROJECTION "init=epsg:900913" END >> >> and all of the queries have: using srid=900913 >> >> 6) load the wms layer into OpenLayers >> with >> >> var wms = new OpenLayers.Layer.WMS("OpenStreetMap", mainurl, { >> ... >> units : 'm', >> projection:new OpenLayers.Projection("EPSG:900913"), >> ... >> >> >> >> Unfortunately all I get is a grey empty image. Looking at the map server >> log >> I noticed that it's full of: >> >> [Mon Mar 15 17:49:44 2010].517000 msPostGISLayerWhichShapes query status: >> 2 >> [Mon Mar 15 17:49:44 2010].517000 msPostGISLayerWhichShapes got 0 records >> in >> result. >> [Mon Mar 15 17:49:44 2010].517000 msPostGISLayerNextShape called. >> >> >> With the other projection I was getting the records. >> >> Do you have any idea about what could be wrong in my set up? I tried to >> debug it in several ways but I couldn't find anything wrong. >> >> Cheers, >> Mulone >> -- >> View this message in context: >> http://old.nabble.com/OSM2pgsql%2C-OpenStreetMap%2C-MapServer%2C-EPSG%3A900913%2C-OpenLayers%3A-issue-tp27915684p27915684.html >> Sent from the PostGIS - User mailing list archive at Nabble.com. >> >> _______________________________________________ >> postgis-users mailing list >> postgis-users@postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> > > _______________________________________________ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > -- View this message in context: http://old.nabble.com/OSM2pgsql%2C-OpenStreetMap%2C-MapServer%2C-EPSG%3A900913%2C-OpenLayers%3A-issue-tp27915684p28472339.html Sent from the PostGIS - User mailing list archive at Nabble.com. _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users