How can I save the results from a MapServer file as an image? I would like to be able to write a png file as a result of a query. My query which I can display in browser is the following:
http://mysite.com/mapserv.cgi?map=../../mapfiles/demo.map&layer=land&mode=map&FORMAT=image/png
I have tried the following (which does not seem to work):
wget http://mysite.com/mapserv.cgi?map=../../mapfiles/demo.map&layer=land&mode=map&FORMAT=image/png
and also
wget http://mysite.com/mapserv.cgi?map=../../mapfiles/demo.map&layer=land&mode=map&FORMAT=image/png >> myfile.png
I have seen the shp2img function but that appears to be used just for testing mapfiles. In this case I would like to use a SQL filter with my mapfile, which I don't think I can do using shp2img.
Included first wget
attempt that I tried.