WMS SLD Reader

Description

Returns the image (or error message) produced by a WMS server according to the GetLegendGraphic request parameters.
This reader redirects WMS request to another server, using parameters specified in the Cocoon sitemap.

This components has its own cache mechanism (see WMS Reader page for details.

Some parameters are defined when configuring the component, while others are defined in the match (actually, some may be defined in the component configuration and re-defined, if need be, during matching).

Sitemap component configuration

<map:reader name="wmslegend" src="org.cocoondev.geoid.reading.WMSSLDReader" logger="geoid" mime-type="image/png" server="www.myserver.com:8080" path="geoserver/wms" sld-path="http://www.myserver.com:8080/cocoon/sld/" version="1.1.1" expires-seconds="0"/>
  1. mime-type Returned map image content type
  2. server The address on which the map server is serving requests
  3. path Path of the map-server
  4. sld-path Path of the application serving SLDs
  5. version Version of WMS to use
  6. expires-seconds The cache expiration time in seconds. Use 0 for no caching.

Sample sitemap pipeline

<map:read type="wmslegend"> <map:parameter name="layer" value="roads"/> <map:parameter name="style" value=""/> <map:parameter name="rule" value="highway"/> <map:parameter name="rule" value="5000"/> <map:parameter name="width" value="20"/> <map:parameter name="height" value="20"/> <map:parameter name="sld" value="roads.sld"/> <map:parameter name="format" value="image/gif"/> <map:parameter name="version" value="1.0.0"/> </map:read>

All of the above parameters are defined in the WMS standard, some of them have default values for added convenience. Other parameters may be added to a request, just see the WMS standard for details.