[postgis-users] OSM2pgsql, OpenStreetMap, MapServer, EPSG:900913, OpenLayers: issue
Mulone1
mulone at rome.com
Tue Mar 16 03:20:13 PDT 2010
(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.
More information about the postgis-users
mailing list