Perfect, yes.&nbsp; That should do exactly what I need.&nbsp; I&#39;d forgotten about those OWSRequests.&nbsp; Tilecache uses those in its MapServerLayer requests as well.<br><br>Thanks very much Tom<br>--<br><br><div class="gmail_quote">
On Mon, Dec 8, 2008 at 2:33 PM, Kralidis,Tom [Ontario] <span dir="ltr">&lt;<a href="mailto:Tom.Kralidis@ec.gc.ca">Tom.Kralidis@ec.gc.ca</a>&gt;</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>
Roger: you can use MapScript WxS <a href="http://mapserver.gis.umn.edu/docs/howto/wxs_mapscript" target="_blank">http://mapserver.gis.umn.edu/docs/howto/wxs_mapscript</a> as an approach to run a WMS request via mapscript. &nbsp;Maybe that can work for you?<br>

<font color="#888888"><br>
..Tom<br>
</font><div><div></div><div class="Wj3C7c"><br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> on behalf of Roger André<br>
Sent: Mon 08-Dec-08 16:21<br>
To: Julien-Samuel Lacroix<br>
Cc: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
Subject: Re: [mapserver-users] Difference in appearance between &quot;mode=map&quot; andWMS<br>
<br>
Hi Julien,<br>
<br>
That makes sense, but it doesn&#39;t work. &nbsp;I modified my mapfile so that I now<br>
generate a 20_deg x 20_deg tile that is 600_pixels x 600_pixels. &nbsp;If I<br>
georeference that image using the extents, I still get incorrect placement.<br>
Maybe if I choose an output projection which always has square pixels, like<br>
spherical mercator (?) this will work. &nbsp;I&#39;ll give it a shot.<br>
<br>
Is there any way to give a WMS request via mapscript and NOT go through CGI?<br>
<br>
Roger<br>
--<br>
<br>
<br>
<br>
On Mon, Dec 8, 2008 at 12:25 PM, Julien-Samuel Lacroix &lt;<br>
<a href="mailto:jlacroix@mapgears.com">jlacroix@mapgears.com</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I guess would be that the WMS use non-square pixels. So if your BBOX x/y<br>
&gt; &nbsp;(rectangle in your case) doesn&#39;t match you WIDTH/HEIGHT ratio (square in<br>
&gt; your case) the map will appear stretched. MapServer will actually stretch<br>
&gt; the map to fit the extent in the WIDTH/HEIGHT.<br>
&gt;<br>
&gt; The mode=map don&#39;t do that. If your extent doesn&#39;t have the same ratio, it<br>
&gt; adds some degree in your extent to fit the size.<br>
&gt;<br>
&gt; Make sure your BBOX and EXTENT are a square in your requests and retry<br>
&gt;<br>
&gt;<br>
&gt; Julien<br>
&gt;<br>
&gt; Roger André wrote:<br>
&gt;<br>
&gt;&gt; Hi All,<br>
&gt;&gt;<br>
&gt;&gt; I think I&#39;m having an instance of cranial flatulation, but maybe not.<br>
&gt;&gt; &nbsp;Hopefully you can set me straight.<br>
&gt;&gt;<br>
&gt;&gt; I need to create an image with Mapserver using mapscript that I can then<br>
&gt;&gt; georeference manually and use in another application. &nbsp;It needs to look<br>
&gt;&gt; exactly the same as the image I can already generate via a WMS call that<br>
&gt;&gt; looks like this:<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/hydro/hydro.map" target="_blank">http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/hydro/hydro.map</a><br>
&gt;&gt; &amp;SERVICE=WMS<br>
&gt;&gt; &amp;version=%221.1.1%22<br>
&gt;&gt; &amp;REQUEST=GetMap<br>
&gt;&gt; &amp;LAYERS=imagery<br>
&gt;&gt; &amp;STYLES=&amp;BBOX=-125,39,-108,54<br>
&gt;&gt; &amp;WIDTH=600<br>
&gt;&gt; &amp;HEIGHT=600<br>
&gt;&gt; &amp;FORMAT=png<br>
&gt;&gt; &amp;SRS=epsg:4326<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m testing my mapscript parameters using a simple &quot;mode=map&quot; call to<br>
&gt;&gt; Mapserver, and the results I&#39;m getting so far don&#39;t match the appearance of<br>
&gt;&gt; the WMS output at all. &nbsp;My mapfile has the following extent and projection<br>
&gt;&gt; info in it:<br>
&gt;&gt;<br>
&gt;&gt; &nbsp;PROJECTION<br>
&gt;&gt; &nbsp; &nbsp;&quot;init=epsg:4326&quot;<br>
&gt;&gt; &nbsp;END<br>
&gt;&gt;<br>
&gt;&gt; &nbsp;EXTENT -125.0 &nbsp;39.0 -108.0 &nbsp;54.0<br>
&gt;&gt; &nbsp;SIZE 600 600<br>
&gt;&gt;<br>
&gt;&gt; In addition to the mapfile projection specification, I am also specifying<br>
&gt;&gt; the same projection info in each of my LAYERS as well.<br>
&gt;&gt;<br>
&gt;&gt; Is it possible to do what I&#39;m trying to accomplish here?<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt;<br>
&gt;&gt; Roger<br>
&gt;&gt; --<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ------------------------------------------------------------------------<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapserver-users mailing list<br>
&gt;&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Julien-Samuel Lacroix<br>
&gt; Mapgears<br>
&gt; <a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a><br>
&gt;<br>
<br>
</div></div></blockquote></div><br>