<div>Thanks! I wasn&#39;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">&lt;<a href="mailto:jean-francois@gigand.fr">jean-francois@gigand.fr</a>&gt;</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) &lt;<a href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</a>&gt;:<br>
<div><div class="h5">&gt; Sergey,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; If your data is in epsg:4326 and you want to publish the data as epsg:3785,<br>
&gt; you will need to projection blocks to your layers.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Something like:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;   PROJECTION<br>
&gt;<br>
&gt;             &quot;init=epsg:4326&quot;<br>
&gt;<br>
&gt;   END<br>
&gt;<br>
&gt; The Projection block in the MAP section defines your output projection.<br>
&gt; Because your data is not in the same projection, you will need to define a<br>
&gt; projection block in each layer section.  Those projection blocks define the<br>
&gt; ‘input’ projection.  They tell MapServer what projection the data exists<br>
&gt; in.  This allows MapServer (with proj4 support) to re-project your data to<br>
&gt; the output projection.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; David.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a><br>
&gt; [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Sergey Kraev<br>
&gt; Sent: Wednesday, February 23, 2011 5:01 AM<br>
&gt; To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt; Subject: [mapserver-users] Spherical Mercator Projection Problem<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I’m running MS4W v3.0 (including MapServer 5.6.5) on Windows.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; My data source are PostGIS multipolygon countries’ borders.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I have successfully got MapServer to render the world map in WGS84<br>
&gt; projection using these settings:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Request:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; <a href="http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.map&amp;mode=map&amp;mapsize=256+256&amp;mapext=-180+-90+180+90" target="_blank">http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.map&amp;mode=map&amp;mapsize=256+256&amp;mapext=-180+-90+180+90</a><br>

&gt;<br>
&gt;<br>
&gt;<br>
&gt; world.map:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; MAP<br>
&gt;<br>
&gt; EXTENT                   -180 -90 180 90<br>
&gt;<br>
&gt;   #EXTENT         -20037508 -20037508 20037508 20037508<br>
&gt;<br>
&gt;   SIZE           256 256<br>
&gt;<br>
&gt;   IMAGECOLOR     153 179 204<br>
&gt;<br>
&gt;   FONTSET        &quot;c:\MS4W\fonts\fonts.list&quot;<br>
&gt;<br>
&gt;   RESOLUTION        96<br>
&gt;<br>
&gt;   MAXSIZE        5000<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;   PROJECTION<br>
&gt;<br>
&gt;             &quot;init=epsg:4326&quot;<br>
&gt;<br>
&gt;             #&quot;init=epsg:3785&quot;<br>
&gt;<br>
&gt;   END<br>
&gt;<br>
&gt; …<br>
&gt;<br>
&gt; &lt;layers don’t have PROJECTION sections&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I would like MapServer to render the same data into a “Web (spherical)<br>
&gt; Mercator” projected map (epsg:3785), but I don&#39;t know how to modify my<br>
&gt; request and mapfile in order to get the correct map.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; With the following settings I just receive a picture without any polygons.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; \ms4w\proj\nad\epsg:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;                  …<br>
&gt;<br>
&gt; &lt;3785&gt; +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0<br>
&gt; +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs &lt;&gt;<br>
&gt;<br>
&gt; …<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Request (only mapext is different):<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; <a href="http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.map&amp;mode=map&amp;mapsize=256+256&amp;mapext=-20037508+-20037508+20037508+20037508" target="_blank">http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.map&amp;mode=map&amp;mapsize=256+256&amp;mapext=-20037508+-20037508+20037508+20037508</a><br>

&gt;<br>
&gt;<br>
&gt;<br>
&gt; world.map (only EXTENT and PROJECTION are different):<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; MAP<br>
&gt;<br>
&gt;   #EXTENT                -180 -90 180 90<br>
&gt;<br>
&gt;   EXTENT         -20037508 -20037508 20037508 20037508<br>
&gt;<br>
&gt;   SIZE           256 256<br>
&gt;<br>
&gt;   IMAGECOLOR     153 179 204<br>
&gt;<br>
&gt;   FONTSET        &quot;c:\MS4W\fonts\fonts.list&quot;<br>
&gt;<br>
&gt;   RESOLUTION        96<br>
&gt;<br>
&gt;   MAXSIZE        5000<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;   PROJECTION<br>
&gt;<br>
&gt;             #&quot;init=epsg:4326&quot;<br>
&gt;<br>
&gt;             &quot;init=epsg:3785&quot;<br>
&gt;<br>
&gt;   END<br>
&gt;<br>
&gt; …<br>
&gt;<br>
&gt; &lt;layers don’t have PROJECTION sections&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I’m assuming that -20037508 -20037508 20037508 20037508 is correct extent<br>
&gt; for the whole world map, since Google uses that and they also have Mercator<br>
&gt; projection.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks for your help.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Sergey<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; mapserver-users mailing list<br>
<div class="im">&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
</div>&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>