<p class="p1">Jukka's suggestion of using "<span class="s2"><a href="http://mysite.com/mapserv.cgi?map=../../mapfiles/demo.map&layer=">http://mysite.com/mapserv.cgi?map=../../mapfiles/demo.map&layer=</a></span>land&mode=map&FORMAT=image/png" -O output.png</p>
<p class="p1">worked. Thanks for the suggestion.</p><p class="p1">I have not tried any of the other approaches yet.</p><p class="p1">-David</p><div><br></div><p class="p1"><br></p><p class="p1">I went and looked at the stackexchange thread. . . . A thought . . .</p>

<p class="p2"><br></p>
<p class="p1">In your map file, in the WEB block, try adding a line like this:</p>
<p class="p2"><br></p>
<p class="p1">QUERYFORMAT "image/png"</p>
<p class="p2"><br></p>
<p class="p1">Bobb</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p3">-----Original Message-----</p>
<p class="p4"><span class="s1">From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org"><span class="s2">mapserver-users-bounces@lists.osgeo.org</span></a> [mailto:<a href="mailto:mapserver-">mapserver-</a></span></p>

<p class="p3"><span class="s2"><a href="mailto:users-bounces@lists.osgeo.org">users-bounces@lists.osgeo.org</a></span>] On Behalf Of Rahkonen Jukka</p>
<p class="p3">Sent: Tuesday, October 30, 2012 10:37 AM</p>
<p class="p4"><span class="s1">To: '<a href="mailto:mapserver-users@lists.osgeo.org"><span class="s2">mapserver-users@lists.osgeo.org</span></a>'</span></p>
<p class="p3">Subject: Re: [mapserver-users] Saving an image from a query</p>
<p class="p5"><br></p>
<p class="p3">Hi,</p>
<p class="p5"><br></p>
<p class="p3">Perhaps wget thinks that certain characters are cutting the URL</p>
<p class="p3">string. Try wget</p>
<p class="p4"><span class="s1">"<a href="http://mysite.com/mapserv.cgi?map=../../mapfiles/demo.map&layer="><span class="s2">http://mysite.com/mapserv.cgi?map=../../mapfiles/demo.map&layer=</span></a></span></p>

<p class="p3">land&mode=map&FORMAT=image/png" -O output.png</p>
<p class="p5"><br></p>
<p class="p3">We have used wget a lot for downloading data from WCS so I</p>
<p class="p3">guarantee you will make it work by reading documents and trying</p>
<p class="p3">just like we did.</p>
<p class="p5"><br></p>
<p class="p3">-Jukka Rahkonen-</p>
<p class="p5"><br></p>
<p class="p3">David Quinn wrote:</p>
<p class="p5"><br></p>
<p class="p6">Hi List,</p>
<p class="p7"><br></p>
<p class="p6">I'm trying to understand how to save an image as a result of a</p>
<p class="p3">query.</p>
<p class="p6">One approach that I have experimented with is using `wget` to</p>
<p class="p3">save the</p>
<p class="p6">file but I've been getting an error message (I asked a question</p>
<p class="p3">on this here:</p>
<p class="p4"><span class="s3"><a href="http://gis.stackexchange.com/questions/37813/how-to-save-">http://gis.stackexchange.com/questions/37813/how-to-save-</a></span></p>
<p class="p3">mapserver-</p>
<p class="p6">output-to-a-file</p>
<p class="p6">)</p>
<p class="p7"><br></p>
<p class="p6">Is there a better way than using "wget</p>
<p class="p7"><br></p>
<p class="p4"><span class="s3"><a href="http://mysite.com/mapserv.cgi?map=../../mapfiles/demo.map&layer=l">http://mysite.com/mapserv.cgi?map=../../mapfiles/demo.map&layer=l</a></span></p>
<p class="p3">and</p>
<p class="p6">&mode=map&FORMAT=image/png"</p>
<p class="p6">to store a image resulting from a query?</p>
<p class="p7"><br></p>
<p class="p6">After using "wget" my log shows the following message:</p>
<p class="p7"><br></p>
<p class="p6">[Tue Oct 30 14:49:02 2012].580951 msWCSDispatch20(): wrong</p>
<p class="p3">service</p>
<p class="p6">(none) [Tue Oct 30 14:49:02 2012].581041 msWCSParseRequest():</p>
<p class="p3">request is KVP.</p>
<p class="p6">[Tue Oct 30 14:49:02 2012].581049 msWCSDispatch(): SERVICE and</p>
<p class="p3">REQUEST</p>
<p class="p6">not included [Tue Oct 30 14:49:02 2012].581064 mapserv(): Web</p>
<p class="p6">application error.</p>
<p class="p6">Traditional BROWSE mode requires a TEMPLATE in the WEB section,</p>
<p class="p3">but</p>
<p class="p6">none was provided.</p>
<p class="p7"><br></p>
<p class="p6">Thanks,</p>
<p class="p6">David</p>
<p class="p6">_______________________________________________</p>
<p class="p6">mapserver-users mailing list</p>
<p class="p4"><span class="s3"><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a></span></p>
<p class="p4"><span class="s3"><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span></p>
<p class="p3">_______________________________________________</p>
<p class="p3">mapserver-users mailing list</p>
<p class="p4"><span class="s3"><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a></span></p>
<p class="p4"><span class="s3"><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span></p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1">_______________________________________________</p>
<p class="p1">mapserver-users mailing list</p>
<p class="p4"><span class="s3"><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a></span></p>
<p class="p4"><span class="s3"><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span></p><br>On Tue, Oct 30, 2012 at 11:04 AM, David Quinn <<a href="mailto:daithiquinn@gmail.com">daithiquinn@gmail.com</a>> wrote:<br>
> Hi List,<br>><br>> I'm trying to understand how to save an image as a result of a query.<br>> One approach that I have experimented with is using `wget` to save the<br>> file but I've been getting an error message (I asked a question on<br>
> this here: <a href="http://gis.stackexchange.com/questions/37813/how-to-save-mapserver-output-to-a-file">http://gis.stackexchange.com/questions/37813/how-to-save-mapserver-output-to-a-file</a><br>> )<br>><br>> Is there a better way than using "wget<br>
> <a href="http://mysite.com/mapserv.cgi?map=../../mapfiles/demo.map&layer=land&mode=map&FORMAT=image/png">http://mysite.com/mapserv.cgi?map=../../mapfiles/demo.map&layer=land&mode=map&FORMAT=image/png</a>"<br>
> to store a image resulting from a query?<br>><br>> After using "wget" my log shows the following message:<br>><br>> [Tue Oct 30 14:49:02 2012].580951 msWCSDispatch20(): wrong service (none)<br>> [Tue Oct 30 14:49:02 2012].581041 msWCSParseRequest(): request is KVP.<br>
> [Tue Oct 30 14:49:02 2012].581049 msWCSDispatch(): SERVICE and REQUEST<br>> not included<br>> [Tue Oct 30 14:49:02 2012].581064 mapserv(): Web application error.<br>> Traditional BROWSE mode requires a TEMPLATE in the WEB section, but<br>
> none was provided.<br>><br>> Thanks,<br>> David<br><br>