<div>Thanks! I wasn't aware of that.<br></div><div><br></div><div>Additionally I had to increase layer class maxscale parameter.</div><div><br></div><div>Sergey</div><br><div class="gmail_quote">On Thu, Feb 24, 2011 at 10:33 PM, Jean-François Gigand <span dir="ltr"><<a href="mailto:jean-francois@gigand.fr">jean-francois@gigand.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
<br>
Indeed.<br>
<br>
Also note that EPSG:900913 is the same as EPSG:3785 and EPSG:3857.<br>
These three are the Spherical Mercator projection, which is the right<br>
one to use for overlays on Google Maps.<br>
<br>
<br>
Jean-François Gigand<br>
<br>
<br>
<br>
<br>
2011/2/24 Fawcett, David (MPCA) <<a href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</a>>:<br>
<div><div class="h5">> Sergey,<br>
><br>
><br>
><br>
> If your data is in epsg:4326 and you want to publish the data as epsg:3785,<br>
> you will need to projection blocks to your layers.<br>
><br>
><br>
><br>
> Something like:<br>
><br>
><br>
><br>
> PROJECTION<br>
><br>
> "init=epsg:4326"<br>
><br>
> END<br>
><br>
> The Projection block in the MAP section defines your output projection.<br>
> Because your data is not in the same projection, you will need to define a<br>
> projection block in each layer section. Those projection blocks define the<br>
> ‘input’ projection. They tell MapServer what projection the data exists<br>
> in. This allows MapServer (with proj4 support) to re-project your data to<br>
> the output projection.<br>
><br>
><br>
><br>
> David.<br>
><br>
><br>
><br>
><br>
><br>
> From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a><br>
> [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Sergey Kraev<br>
> Sent: Wednesday, February 23, 2011 5:01 AM<br>
> To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> Subject: [mapserver-users] Spherical Mercator Projection Problem<br>
><br>
><br>
><br>
> Hi,<br>
><br>
><br>
><br>
> I’m running MS4W v3.0 (including MapServer 5.6.5) on Windows.<br>
><br>
><br>
><br>
> My data source are PostGIS multipolygon countries’ borders.<br>
><br>
><br>
><br>
> I have successfully got MapServer to render the world map in WGS84<br>
> projection using these settings:<br>
><br>
><br>
><br>
> Request:<br>
><br>
><br>
><br>
> <a href="http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.map&mode=map&mapsize=256+256&mapext=-180+-90+180+90" target="_blank">http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.map&mode=map&mapsize=256+256&mapext=-180+-90+180+90</a><br>
><br>
><br>
><br>
> world.map:<br>
><br>
><br>
><br>
> MAP<br>
><br>
> EXTENT -180 -90 180 90<br>
><br>
> #EXTENT -20037508 -20037508 20037508 20037508<br>
><br>
> SIZE 256 256<br>
><br>
> IMAGECOLOR 153 179 204<br>
><br>
> FONTSET "c:\MS4W\fonts\fonts.list"<br>
><br>
> RESOLUTION 96<br>
><br>
> MAXSIZE 5000<br>
><br>
><br>
><br>
> PROJECTION<br>
><br>
> "init=epsg:4326"<br>
><br>
> #"init=epsg:3785"<br>
><br>
> END<br>
><br>
> …<br>
><br>
> <layers don’t have PROJECTION sections><br>
><br>
><br>
><br>
> I would like MapServer to render the same data into a “Web (spherical)<br>
> Mercator” projected map (epsg:3785), but I don't know how to modify my<br>
> request and mapfile in order to get the correct map.<br>
><br>
><br>
><br>
> With the following settings I just receive a picture without any polygons.<br>
><br>
><br>
><br>
> \ms4w\proj\nad\epsg:<br>
><br>
><br>
><br>
> …<br>
><br>
> <3785> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0<br>
> +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs <><br>
><br>
> …<br>
><br>
><br>
><br>
> Request (only mapext is different):<br>
><br>
><br>
><br>
> <a href="http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.map&mode=map&mapsize=256+256&mapext=-20037508+-20037508+20037508+20037508" target="_blank">http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.map&mode=map&mapsize=256+256&mapext=-20037508+-20037508+20037508+20037508</a><br>
><br>
><br>
><br>
> world.map (only EXTENT and PROJECTION are different):<br>
><br>
><br>
><br>
> MAP<br>
><br>
> #EXTENT -180 -90 180 90<br>
><br>
> EXTENT -20037508 -20037508 20037508 20037508<br>
><br>
> SIZE 256 256<br>
><br>
> IMAGECOLOR 153 179 204<br>
><br>
> FONTSET "c:\MS4W\fonts\fonts.list"<br>
><br>
> RESOLUTION 96<br>
><br>
> MAXSIZE 5000<br>
><br>
><br>
><br>
> PROJECTION<br>
><br>
> #"init=epsg:4326"<br>
><br>
> "init=epsg:3785"<br>
><br>
> END<br>
><br>
> …<br>
><br>
> <layers don’t have PROJECTION sections><br>
><br>
><br>
><br>
> I’m assuming that -20037508 -20037508 20037508 20037508 is correct extent<br>
> for the whole world map, since Google uses that and they also have Mercator<br>
> projection.<br>
><br>
><br>
><br>
> Thanks for your help.<br>
><br>
><br>
><br>
> Sergey<br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> mapserver-users mailing list<br>
<div class="im">> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
</div>> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
><br>
><br>
</blockquote></div><br>