text/html and application/x-pdf FORMATS and WMS GetLegendGraphic and WMS GetCapabilities

Bart van den Eijnden bartvde at XS4ALL.NL
Thu Nov 4 03:17:35 EST 2004


Hi Harvard,

I have tested the behaviour with the 4.4 beta1 Windows binary, and I get
the following situation:

-if I don't provide a format (or an empty format, or an unknown format), I
get a service exception
-it does not matter which format (out of the formats from the WMS
capabilities) I provide, I always get image/png back, but never a crash.

So maybe this is partly setup related ... (outputformat?).

Best regards,
Bart

> For the "application/x-pdf" and "text/html" FORMATs
> reported by a WMS 1.1.1 GetCapabilities response for
> GetLegendGraphic I am experiencing problems when
> using GetLegendGraphic.
>
> A GetCapabilities request to my Mapserver WMS server returns:
>
> <GetLegendGraphic>
> <Format>image/jpeg</Format>
> <Format>image/png</Format>
> <Format>image/gif</Format>
> <Format>image/wbmp</Format>
> <Format>text/html</Format>
> <Format>application/x-pdf</Format>
> <Format>image/tiff</Format>
> <DCPType>
> ...
> </DCPType>
> </GetLegendGraphic>
>
> For all formats except "application/x-pdf" and "text/html"
> a nice legend (graphics and text) is returned.
> For the following requests (equal to the successful ones,
> except for the FORMAT), mapserver crashes ("premature end
> of script headers: mapserv" in the Apache log):
>
> ...&service=WMS&version=1.1.1&request=GetLegendGraphic&layer=n5000arf&SCALE=200000&FORMAT=image/gif
> ...&service=WMS&version=1.1.1&request=GetLegendGraphic&layer=n5000arf&SCALE=200000&FORMAT=application/x-pdf
>
> When I use a RULE (to get only the graphics), the following is
> returned
> <ServiceExceptionReport version="1.1.1">
>    <ServiceException code="InvalidRule">
>       msWMSGetLegendGraphic(): Image handling error. Unavailable RULE
> (Skog). msCreateLegendIcon(): GD library error. Map outputformat
> must be set to a GD format!
>    </ServiceException>
> </ServiceExceptionReport>
>
>
> MapServer version 4.4.0-beta1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
> OUTPUT=WBMP OUTPUT=PDF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
> SUPPORTS=WCS_SERVER INPUT=EPPL7 INPUT=SDE INPUT=POSTGIS INPUT=OGR
> INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG
>
> Is it a problem in my setup or a bug?
> If it is a bug, the output from GetCapabilities should to be changed.
>
> --
> Håvard Tveite
> IMT, NLH
>



More information about the mapserver-users mailing list