[mapserver-users] Changing OUTPUTFORMAT via CGI URL

Dan Little danlittle at yahoo.com
Tue Mar 2 21:37:47 EST 2010


It's probably easier to use WMS for something like this.

Define two outputformats and associate different mime types with them so you could have "image/png16" and "image/png256".

Then when you call "FORMAT=image/png256" or "FORMAT=image/png16" it would switch the quantize image.


----- Original Message ----
> From: "Lime, Steve D (DNR)" <Steve.Lime at state.mn.us>
> To: "ivan.mincik at gista.sk" <ivan.mincik at gista.sk>; "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>
> Sent: Tue, March 2, 2010 11:25:07 AM
> Subject: RE: [mapserver-users] Changing OUTPUTFORMAT via CGI URL
> 
> I'm pretty sure you can't do what you're trying to do. Best bet would be to 
> create the necessary output formats ahead of time and switch between them with 
> map.imagetype=PNGQ16 or map.imagetype=PNG256...
> 
> Steve
> 
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org 
> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ivan Mincik
> Sent: Tuesday, March 02, 2010 8:27 AM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] Changing OUTPUTFORMAT via CGI URL
> 
> Dear Mapserver users,
> Is it possible to change OUTPUTFORMAT parameters via CGI URL ?
> I have this OUTPUTFORMAT definition:
>     OUTPUTFORMAT
>         NAME "PNGQ"
>         DRIVER "AGG/PNG"
>         MIMETYPE "image/png"
>         IMAGEMODE RGBA
>         FORMATOPTION "QUANTIZE_FORCE=ON"
>         FORMATOPTION "QUANTIZE_DITHER=OFF"
>         FORMATOPTION "QUANTIZE_COLORS=256"
>         FORMATOPTION  "INTERLACE=OFF"
>         EXTENSION "png"
>     END
> 
> and I want to change  FORMATOPTION "QUANTIZE_COLORS=256" to FORMATOPTION 
> "QUANTIZE_COLORS=16".
> 
> I have tried all possibilities like 
> &map.outputformat[PNGQ]=FORMATOPTION+QUANTIZE_COLORS%3d256& and similar.
> Can anybody confirm that at least it should be working ?
> I am using Mapserver 5.2.2.
> 
> Thanks a lot
> -- 
> Ivan



      


More information about the mapserver-users mailing list