WMS output formats
Alexandre Fellay
alexandre.fellay at CAMPTOCAMP.COM
Thu Nov 10 06:50:05 PST 2005
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 F
More information about the MapServer-users
mailing list