[postgis-users] OSM2pgsql, OpenStreetMap, MapServer, EPSG:900913, OpenLayers: issue

ibrahim saricicek ibrahimsaricicek at gmail.com
Tue Mar 16 06:44:23 PDT 2010


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 <mulone at 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 at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100316/8f95da99/attachment.html>


More information about the postgis-users mailing list