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

Havard Tveite havard.tveite at IKF.NLH.NO
Thu Nov 4 02:58:48 EST 2004


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