please check you mapfile into some git<br>like this<br><br><a href="http://gitorious.org/albanianfloodingcrisiscamp">http://gitorious.org/albanianfloodingcrisiscamp</a><br><br>then i will review it.<br>thanks<br>mike<br><div class="gmail_quote">
On Wed, Mar 17, 2010 at 10:52 PM, Mulone <span dir="ltr"><<a href="mailto:mulone@rome.com">mulone@rome.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
(apologies for cross-posting)<br>
<br>
Hi everybody,<br>
<br>
I'm trying to render openstreetmap data on a WMS on MapServer and I posted<br>
something already about this. Now it's time to summarise everything and make<br>
some sense of this.<br>
<br>
The system used to work with epsg:4326 (LATLONG from now on) but in our<br>
project we need a GoogleMaps like projection and we chose<br>
epsg:900913/epsg:3785 (MERC from now on).<br>
<br>
This is our problem. We need the image on the right but we're getting the<br>
one on the left, a flattened map:<br>
<a href="http://img7.imageshack.us/img7/8279/imagelw.png" target="_blank">http://img7.imageshack.us/img7/8279/imagelw.png</a><br>
<br>
After a lot of work and unsucceful tests I post here the outcome, hoping<br>
that it will be helpful to the community - and to us :-)<br>
<br>
These are the steps I followed from the very start:<br>
<br>
1) download osm xml file from Cloudmade (e.g. Italy.osm.bz2)<br>
2) Run 900913.sql on my PostGIS (optional, it shouldn't matter).<br>
3) import that file into PostGIS with command (latlong option selected):<br>
<br>
./osm2pgsql -U userid -W -H host -d maps -p myprefix -S default.style -c -l<br>
italy.osm.bz2<br>
<br>
4) At this point everything seems ok. The geometry columns have latlong as<br>
SRID and the tables contain geometries.<br>
It's possible to visualise this dataset with uDig or other tools and<br>
reproject it.<br>
<br>
5) Now we want to render this stuff on MapServer. So we add the espg configs<br>
from<br>
<a href="http://spatialreference.org/ref/epsg/3785/" target="_blank">http://spatialreference.org/ref/epsg/3785/</a> to our mapserver espg file:<br>
<br>
<900913> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137<br>
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <><br>
<3785> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137<br>
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <><br>
<br>
6) define a minimal mapfile with one layer (containing the buildings).<br>
<br>
7) run several tests with different projections and annotate the outcome.<br>
<br>
Have a look at the report:<br>
<a href="http://docs.google.com/View?id=dftx6j46_166d6r38pcs" target="_blank">http://docs.google.com/View?id=dftx6j46_166d6r38pcs</a><br>
<br>
Does anybody have any idea about how we could tackle this issue?<br>
I don't know if the problem is arising from MapServer or OpenLayers, so<br>
maybe you can help me design a better test to narrow the problem down.<br>
<br>
I presume a lot of people are doing something similar to us, so others might<br>
come across this issue.<br>
<br>
Cheers,<br>
Mulone<br>
<br>
-----<br>
Mulone<br>
PhD student<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n2.nabble.com/MapServer-OpenStreetMap-OpenLayers-Reprojection-from-Latlong-to-Mercator-a-real-nightmare-tp4753261p4753261.html" target="_blank">http://n2.nabble.com/MapServer-OpenStreetMap-OpenLayers-Reprojection-from-Latlong-to-Mercator-a-real-nightmare-tp4753261p4753261.html</a><br>
Sent from the Developer Discussion mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/dev" target="_blank">http://lists.openstreetmap.org/listinfo/dev</a><br>
</font></blockquote></div><br>