Table of Contents

Interoperability for web portrayal services : a use case with deegree3

Setting up a deegree3 workspace

<ShapeFeatureStore xmlns="http://www.deegree.org/datasource/feature/shape"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" configVersion="3.1.0"
  xsi:schemaLocation="http://www.deegree.org/datasource/feature/shape http://schemas.deegree.org/datasource/feature/shape/3.1.0/shape.xsd">
  
  <StorageCRS>EPSG:21781</StorageCRS>
  <File>../../data/meteo/meteocities</File>

</ShapeFeatureStore>
<FeatureLayers xmlns="http://www.deegree.org/layers/feature"
  xmlns:d="http://www.deegree.org/metadata/description" xmlns:l="http://www.deegree.org/layers/base"
  xmlns:s="http://www.deegree.org/metadata/spatial"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.deegree.org/layers/feature http://schemas.deegree.org/layers/feature/3.2.0/feature.xsd"
  configVersion="3.2.0">
  
  <FeatureStoreId>meteocities</FeatureStoreId>
  <FeatureLayer>
    <l:Name>meteocities</l:Name>
    <d:Title>Cities from switzerland with weather information</d:Title>
  </FeatureLayer>
</FeatureLayers>
<Themes xmlns="http://www.deegree.org/themes/standard"
  xmlns:d="http://www.deegree.org/metadata/description"
  xmlns:s="http://www.deegree.org/metadata/spatial"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" configVersion="3.2.0"
  xsi:schemaLocation="http://www.deegree.org/themes/standard http://schemas.deegree.org/themes/3.2.0/themes.xsd">

  <LayerStoreId>meteocitiesLyr</LayerStoreId>
  <Theme>
    <d:Title>Meteosuisse theme</d:Title>
    <Theme>
      <Identifier>meteocities</Identifier>
      <d:Title>Meteosuisse cities</d:Title>
      <Layer>meteocities</Layer>
    </Theme> 
  </Theme>
</Themes>
<wms:deegreeWMS xmlns:wms="http://www.deegree.org/services/wms"
  xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dgws="http://www.deegree.org/webservices"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" configVersion="3.2.0"
  xsi:schemaLocation="http://www.deegree.org/services/wms http://schemas.deegree.org/services/wms/3.2.0/wms_configuration.xsd">

  <wms:ServiceConfiguration>
    <wms:ThemeId>meteosuisse</wms:ThemeId>
  </wms:ServiceConfiguration>

</wms:deegreeWMS>
<FeatureTypeStyle xmlns="http://www.opengis.net/se" xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:app="http://www.deegree.org/app" xmlns:deegreeogc="http://www.deegree.org/ogc"
  xmlns:ogc="http://www.opengis.net/ogc" xmlns:sed="http://www.deegree.org/se"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/FeatureStyle.xsd http://www.deegree.org/se http://schemas.deegree.org/se/1.1.0/Symbolizer-deegree.xsd">

  <Name>pointSimple</Name>
  <Description>
    <Title>Discover PointSymbolizer - a really simple circle point</Title>
  </Description>

  <Rule>
    <PointSymbolizer>
      <Graphic>
        <Mark>
          <WellKnownName>circle</WellKnownName>
          <Fill>
            <SvgParameter name="fill">#FFFFFF</SvgParameter>
          </Fill>
          <Stroke>
            <SvgParameter name="stroke">#000000</SvgParameter>
            <SvgParameter name="stroke-width">2</SvgParameter>
          </Stroke>
        </Mark>
        <Size>6</Size>
      </Graphic>
    </PointSymbolizer>
  </Rule>
</FeatureTypeStyle>
  ...
  <FeatureLayer>
    <l:Name>meteocities</l:Name>
    <d:Title>Cities from switzerland with weather information</d:Title>
    <l:StyleRef>
      <l:StyleStoreId>pointSimple</l:StyleStoreId>
    </l:StyleRef>
  </FeatureLayer>
  ...

Discovering Symbology Encoging 1.1 further with NamedStyles

<FeatureTypeStyle xmlns="http://www.opengis.net/se" xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:app="http://www.deegree.org/app" xmlns:deegreeogc="http://www.deegree.org/ogc"
  xmlns:ogc="http://www.opengis.net/ogc" xmlns:sed="http://www.deegree.org/se"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/FeatureStyle.xsd http://www.deegree.org/se http://schemas.deegree.org/se/1.1.0/Symbolizer-deegree.xsd">

  <Name>pointCities</Name>
  <Description>
    <Title>Discover PointSymbolizer - a simple point with a dynamic label</Title>
  </Description>

  <Rule>
    <PointSymbolizer>
      <Graphic>
        <Mark>
          <WellKnownName>circle</WellKnownName>
          <Fill>
            <SvgParameter name="fill">#FFFFFF</SvgParameter>
          </Fill>
          <Stroke>
            <SvgParameter name="stroke">#000000</SvgParameter>
            <SvgParameter name="stroke-width">2</SvgParameter>
          </Stroke>
        </Mark>
        <Size>6</Size>
      </Graphic>
    </PointSymbolizer>
    <TextSymbolizer>
      <Label>
        <!--<ogc:Literal>A static text !</ogc:Literal>-->
        <ogc:PropertyName>NAME</ogc:PropertyName>
      </Label>
      <LabelPlacement>
        <PointPlacement>
          <Displacement>
            <DisplacementX>0</DisplacementX>
            <DisplacementY>-10</DisplacementY>
          </Displacement>
        </PointPlacement>
      </LabelPlacement>
      <Fill>
        <SvgParameter name="fill">#000000</SvgParameter>        
      </Fill>  
      <!--
      <Halo>
        <Radius>
          <ogc:Literal>2</ogc:Literal>
        </Radius>
        <Fill>
          <SvgParameter name="fill">#FFFFFF</SvgParameter>
        </Fill>
      </Halo>
      -->
    </TextSymbolizer>
  </Rule>
</FeatureTypeStyle>
  ...
  <FeatureLayer>
    <l:Name>meteocities</l:Name>
    <d:Title>Cities from switzerland with weather information</d:Title>
    <l:StyleRef>
      <l:StyleStoreId>pointSimple</l:StyleStoreId>
    </l:StyleRef>   
    <l:StyleRef>
      <l:StyleStoreId>pointCities</l:StyleStoreId>
    </l:StyleRef>     
  </FeatureLayer>
  ...
<FeatureTypeStyle xmlns="http://www.opengis.net/se" xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:app="http://www.deegree.org/app" xmlns:deegreeogc="http://www.deegree.org/ogc"
  xmlns:ogc="http://www.opengis.net/ogc" xmlns:sed="http://www.deegree.org/se"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/FeatureStyle.xsd http://www.deegree.org/se http://schemas.deegree.org/se/1.1.0/Symbolizer-deegree.xsd">

  <Name>polygonSimple</Name>
  <Description>
    <Title>Transparent polygons only outlined</Title>
  </Description>

  <Rule>
    
    <PolygonSymbolizer>
      <Stroke>
        <SvgParameter name="stroke">#777777</SvgParameter>
      </Stroke>
    </PolygonSymbolizer>
    
  </Rule>
</FeatureTypeStyle>
<Themes>

  <LayerStoreId>meteocitiesLyr</LayerStoreId>
  <LayerStoreId>g4cantons98Lyr</LayerStoreId>
  <Theme>
    <d:Title>Meteosuisse theme</d:Title>
    <Theme>
      <Identifier>meteocities</Identifier>
      <d:Title>Meteosuisse cities</d:Title>
      <Layer>meteocities</Layer>
    </Theme>
    <Theme>
      <Identifier>g4cantons98</Identifier>
      <d:Title>Cantons units</d:Title>
      <Layer>g4cantons98</Layer>
    </Theme>     
  </Theme>
</Themes>
<FeatureTypeStyle...>

  <Name>lineDashed</Name>
  <Description>
    <Title>Discover LineSymbolizer - a lightblue dashed line</Title>
  </Description>

  <Rule>
    <LineSymbolizer>
      <Stroke>
        <SvgParameter name="stroke">#B8DCEA</SvgParameter>
        <SvgParameter name="stroke-dasharray">5 5</SvgParameter>
      </Stroke>
    </LineSymbolizer>
  </Rule>
</FeatureTypeStyle>
<FeatureTypeStyle...>

  <Name>polygonWater</Name>
  <Description>
    <Title>Polygons filled with a graphic</Title>
  </Description>

  <Rule>
    <PolygonSymbolizer>
      <Fill>
        <GraphicFill>
          <Graphic>
            <ExternalGraphic>
              <OnlineResource xlink:href="http://localhost/webmaptuto/sld/1.1/images/watermark.png"/>
              <Format>image/png</Format>
            </ExternalGraphic>
          </Graphic>
        </GraphicFill>
      </Fill>
      <Stroke>
        <SvgParameter name="stroke">#B8DCEA</SvgParameter>
      </Stroke>
    </PolygonSymbolizer>  
  </Rule>
</FeatureTypeStyle>

<FeatureTypeStyle ...>

  <Name>pointFOSSGIS</Name>
  <Description>
    <Title>Discover filtered Rule element</Title>
  </Description>
  
  <Rule>
    <ogc:Filter>
      <ogc:PropertyIsEqualTo>
        <ogc:PropertyName>ID</ogc:PropertyName>
        <ogc:Literal>0</ogc:Literal>
      </ogc:PropertyIsEqualTo>
    </ogc:Filter>
    
    <PointSymbolizer>
      <Graphic>
        <ExternalGraphic>
          <OnlineResource xlink:href="images/fossgis_logo.png"/>
          <Format>image/png</Format>
        </ExternalGraphic>
        <AnchorPoint>
          <AnchorPointX>0.2</AnchorPointX>
          <AnchorPointY>0.4</AnchorPointY>
        </AnchorPoint>
      </Graphic>
    </PointSymbolizer>
  </Rule>
  
  <Rule>
    <ElseFilter/>
    <PointSymbolizer>
      <Graphic>
        <Mark>
          <WellKnownName>circle</WellKnownName>
          <Fill>
            <SvgParameter name="fill">#FFFFFF</SvgParameter>
          </Fill>
          <Stroke>
            <SvgParameter name="stroke">#000000</SvgParameter>
            <SvgParameter name="stroke-width">2</SvgParameter>
          </Stroke>
        </Mark>
        <Size>6</Size>
      </Graphic>
    </PointSymbolizer>
    <TextSymbolizer>
      <Label>
        <ogc:PropertyName>NAME</ogc:PropertyName>
      </Label>
      <LabelPlacement>
        <PointPlacement>
          <Displacement>
            <DisplacementX>0</DisplacementX>
            <DisplacementY>-10</DisplacementY>
          </Displacement>
        </PointPlacement>
      </LabelPlacement>
      <Fill>
        <SvgParameter name="fill">#000000</SvgParameter>        
      </Fill>  
    </TextSymbolizer>
  </Rule>
  
</FeatureTypeStyle>

Part II : discovering Symbology Encoging 1.1 further with UserStyles

Preliminary : before going to part II, we need to configure on last thing on our deegree3

<deegreeWFS xmlns="http://www.deegree.org/services/wfs"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" configVersion="3.2.0"
    xsi:schemaLocation="http://www.deegree.org/services/wfs http://schemas.deegree.org/services/wfs/3.2.0/wfs_configuration.xsd">

    <QueryCRS>urn:ogc:def:crs:EPSG::4326</QueryCRS>
    <QueryCRS>urn:ogc:def:crs:EPSG::21781</QueryCRS>
    
</deegreeWFS>

SLD/SE Part2

In the following part we will present the UserStyle SLD 1.1 mechanism for client customization while pursueing to discover styling capacities of SE 1.1.