[mapserver-users] projection = geographer's pain

Monier Clement clement.monier at v-trafic.com
Fri Oct 24 10:55:09 EDT 2008


Hi,

 

I'm running MS4W v2.2.8 (including MapServer 5.2) on windows.

My datasource is shapefiles with WGS84 projection (epsg:4326).

I would like MapServer to render these data into a "Web (spherical)
Mercator" projected map (epsg:3785) in order to perfectly overlay the
GoogleMaps tile images (for the moment, my maps are slightly shifted north.)

 

I've added this string at the end of the file "epsg" in /ms4w/proj/nad :

<3785> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0
+y_0=0 +k=1.0 +towgs84=0,0,0,0,0,0,0 +units=m +nadgrids=@null +no_defs <>

 

But I don't know how to modify my request and mapfile in order to get the
correct map.

I've tried many combinations so far but with no success until now.

 

Do I have to change the projection system of my shapefiles ?

Is MapServer able to change projection between input and output ?

 

Request : "&SRS=epsg:3785"

 

MapFile :

 

[Map section]

  METADATA

    "wms_srs"   "EPSG:4326 EPSG:3785" # is this correct ?

  END

 

PROJECTION

   "init=epsg:3785" # is this correct ?

END

 

[Layer section]

  METADATA

    "wms_srs"   "EPSG:3785" # is this correct ?

  END

  PROJECTION

   "init=epsg:3785" # is this correct ?

  END

 

With these settings, the pictures I got from MapServer are still shifted.

 

Thanks for your help

 

Clement

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081024/e981e3ff/attachment.html


More information about the mapserver-users mailing list