WMS output formats
Yewondwossen Assefa
assefa at DMSOLUTIONS.CA
Thu Nov 10 08:02:12 PST 2005
I was just checking this and the bug is described in
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=455.
I like the idea of using wms_format (or wms_advertized_format) to
limit the formats that are used. As Frank mentionned, It would be a sort
of a new fonctionnality but since the changes are are minimal and there
was already a bug on it, it is sort of border line between bug and new
addition. I would do it for this release though if peopole think it is
appropriate. What do you think Frank ?
Later,
Frank Warmerdam wrote:
> On 11/10/05, Alexandre Fellay <alexandre.fellay at camptocamp.com> wrote:
>
>>I don't understand some aspects of the behavior of Mapserver (version 4.4.2) as
>>WMS server. My problem is as follows :
>>I want to publish one single raster layer, and only in jpeg format (all other
>>formats being unsuitable for various reasons). So I put in my mapfile
>>
>>IMAGETYPE jpeg
>>
>>I add an OUTPUFORMAT object :
>>
>>OUTPUTFORMAT
>> NAME jpeg
>> DRIVER "GD/JPEG"
>> MIMETYPE "image/jpeg"
>> IMAGEMODE RGB
>> FORMATOPTION QUALITY=88
>> EXTENSION "jpg"
>>END
>>
>>and the required METADATA in my layer :
>> METADATA
>> "wms_title" "blabla"
>> "wms_srs" "EPSG:21781 EPSG:4326 EPSG:32632"
>> "wms_server_version" "1.1.1"
>> "wms_format" "image/jpeg"
>> "wms_name" "blabla"
>> END
>>
>>The surprise is in the GetCapabilities answer: other formats are advertised as well
>> <Format>image/jpeg</Format>
>> <Format>image/gif</Format>
>> <Format>image/png</Format>
>> <Format>image/png; mode=24bit</Format>
>> <Format>image/wbmp</Format>
>> <Format>image/tiff</Format>
>>
>>And, to make things worse, some wms clients (Gaia 2 for example) seem to have a
>>png default format, resulting in an ugly 8bit image.
>>
>>Is it possible to really limit the supported output formats list ?
>
>
> Alexandre,
>
> This issue has come up from time to time, and Assefa has
> done some work to ensure that non-raster formats don't show up.
> But there is still no way to prevent default formats from appearing
> in the WMS capabilities.
>
> Unfortunately, I'm not sure fixing this would count as
> a bug fix, so it might be stuck this way till 5.0.
>
> BTW, as far as I can see the wms_format metadata is not
> defined for any purpose on the WEB metadata list. It does
> play a role for WMS layers, determining what format remote
> results should be fetched as.
>
> An obvious approach might be to allow the wms_format metadata
> item on the WEB object to determine a restricted list of formats
> offered via WMS. I think something similar is already done for
> WCS, where you can currently restrict the list of formats offered.
>
> Best regards,
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for Rent
>
>
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
More information about the MapServer-users
mailing list