mapsprojectionmapserverepsg

Mapserver projection conversion


I have spent dozens of hour trying to find is it possible to change projection with mapserver with no luck so far. My input format is EPSG 3067 and I need to convert it to EPSG 900913 for Google Map use.


Solution

  • In the MAP object add

    PROJECTION "init=epsg:900913" END

    this sets the output projection of the map. Then in t LAYER object add

    PROJECTION "init=epsg:3067" END

    this set the projection that the incoming data for the layer is already in.

    You will also need to add the following line to your /usr/share/proj/epsg or the equivalent path if you are on Windows:

    Spherical Mercator projection

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