Web Map Service
This page gives an overview on the deegree 2 Web Map Service.
The Web Map Service WMS allows on-demand rendering of maps based on standardized styling rules (SLD).
The deegree WMS implements the OGC standards versions 1.1.0, 1.1.1 and 1.3.0. It is the reference implementation for both WMS 1.1.1 and WMS 1.3.0, and will be officially 1.1.1 and 1.3.0 compliant.
The configuration of a WMS can be done using a capabilities document. Currently it is possible to use both versions (1.1.1 and 1.3.0) to do this, but it is recommended to use the older version. Example configurations with a short description of the deegree specific parameters can be found in the resources/wms/ directory of the deegree SVN. The example configurations implement the CITE standard dataset which is used for compliance testing.
3. Compliance Testing
More information on compliance testing and how to test a reference implementation yourself can be found at the TeamEngine page.
A documentation file exists, but the easiest way to learn how to use deegree WMS is to look into the example configuration and adjust it to your needs.
4.1. Some notes on Legends
You can use the GetLegendGraphic request to generate legends automatically when you don't set the LegendURL in the configuration of a layer. This is, however, not a generally good solution, as there are some pitfalls you should know about when trying to use this mechanism.
- Styles which depend on attributes of features (for example, a line width that depends on an attribute), can NOT be used to generate legends. During creation of the legend, you don't have a feature at hand. Which line width should be used? An average of the attribute of all features? As you can see, there is no good solution to this problem, and that's why no legends will be generated when you try to configure it like this.
- Sometimes the legends will have a title/description on the elements, sometimes not. That's because you can specify the width/height of a legend graphic. In order to be able to produce the exactly sized images, you can use styles WITHOUT a filter to get that kind of legend. Styles WITH a filter will produce images of a DIFFERENT SIZE THAN YOU REQUESTED, but they'll have the descriptions.
If the GetLegendGraphic auto generation is used with filter based rules the textual labels (title and description of rules) will be generated from sld/wms configuration. The mechanism is as follows: Title of the legend:
in case the layer title of the wms layer configuration (usually wms_configuration.xml) is missing/empty the FeatureTypeStyle will be used as title
in case the 'Title' of the UserStyle element is NOT empty/missing, the value of 'Title' will be used. (requires revision > 17555 as bug fixed here)
- in other cases the 'Title' of the 'Layer' will be used
Text label of the rules:
- will be take from the 'Rule' 'Name'
4.2. Some notes on Scales
Read about HowToUseScaleHintAndScaleDenominator
4.3. Some notes on WFS as WMS datasource (REMOTEWFS)
Prerequisite: Remote WFS must serve version 1.1.0 and GML Version 3.1.1
Basically, the configuration of a REMOTEWFS is very similar to LOCALWFS. REMOTE WFS requires a OnlineResource which returns a Capabilities response. If no FilterCondition is set, the GetFeatureInfo won't return any properties. If you need properties return, please specify these in the FilterCondition as in the example below for app:code and app:rel. The ogc:Filter is not required but can be used if needed.
... <Layer queryable="1" noSubsets="0" fixedWidth="0" fixedHeight="0"> <Name>wfs</Name> <Title>wfs</Title> <Abstract>deegree demo WMS</Abstract> <KeywordList> <Keyword>deegree</Keyword> <Keyword>layer</Keyword> </KeywordList> <ScaleHint min="0" max="56000" /> <deegree:DataSource failOnException="0" queryable="1"> <deegree:Name>app:Springs</deegree:Name> <deegree:Type>REMOTEWFS</deegree:Type> <deegree:OWSCapabilities> <deegree:OnlineResource xlink:type="simple" xlink:href="http://demo.deegree.org/deegree-wfs/services?request=GetCapabilities&service=WFS&version=1.1.0" /> </deegree:OWSCapabilities> <deegree:GeometryProperty>app:geometry</deegree:GeometryProperty> <!-- If ommited, no properties will be available in GetFeatureInfo --> <deegree:FilterCondition> <wfs:Query typeName="app:Springs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.opengis.net/wfs"> <wfs:PropertyName>app:code</wfs:PropertyName> <wfs:PropertyName>app:rel</wfs:PropertyName> <!-- optional --> <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:PropertyName>app:code</ogc:PropertyName> <ogc:Literal>1</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> </wfs:Query> </deegree:FilterCondition> </deegree:DataSource> <Style> <Name>default</Name> <Title>default:wfs</Title> <deegree:StyleResource>styles/utah_hydrology.xml</deegree:StyleResource> </Style> </Layer> ...
4.4. Some notes on GetFeatureInfo with ArcGIS
By default GetFeatureInfo does not work with ArcGIS. This is caused by a bug in ArcGIS. The GetFeatureInfo request, generated by ArcGIS lacks a parameter and is therefore invalid. deegree usually response with a service exception in these cases, which is not displayed in ArcGIS. If you want to force deegree to support GetFeatureInfo with ArcGIS you must add the following section to the web.xml of the WMS and use a trunk deegree2.jar (later then revision 13105) for example a nightly build:
... <filter> <filter-name>getfeatureinfo</filter-name> <filter-class>org.deegree.enterprise.servlet.TolerantGetFeatureInfoFilter</filter-class> </filter> <filter-mapping> <filter-name>getfeatureinfo</filter-name> <servlet-name>owservice</servlet-name> </filter-mapping> ... </web-app>
4.5. Some notes on known/fixed bugs
If you're having problems with RemoteWMS layers and proxies, read these issues:
back to WebServices overview