deegree 3 utahDemo
The utah-workspace is part of the deegree 3.1 release. It is a configuration of deegree 3 mapService (WMS) and deegree 3 featureService (WFS) and is meant to be a starting point for creating your own deegree 3 web mapping setup -- just adapt data, layer and styling configuration as you like. And if you create something cool, we would love to hear about it.
1. Features of the utahDemo
Full lists of features for deegree 3 mapService and deegree 3 featureService are provided on the respective wiki pages.
Notable features of the utahDemo:
- Includes a standards-compliant WMS (1.1.1/1.3.0) with full support for dimensions.
Includes a standards-compliant WFS* (1.0.0/1.1.0).
- Superb rendering for both vector and raster data (see below).
- Full support of SLD 1.0.0 and SLD/SE 1.1.0.
*The deegree featureService is fully transactional. However, the pre-configured feature types in the utahDemo are stored in shape files, and currently there is no transaction support for shape files in deegree. But if you configure PostGIS-based feature storage, transaction support will be available.
Original DEM as TIFF |
DEM with ShadedRelief |
DEM with elevation restriction |
This tiff image shows the original data of the digital elevation model (DEM) in grayscale. |
This image shows the same raster data, rendered on-the-fly by the mapService by using shaded relief, plus colour interpolation as styling. |
This image shows the same scene, with an extra parameter added to the GetMap request: Only data with an elevation between 1500 and 2200 meters is displayed. |
2. See a demo installation
Point your browser to the online version of the deegree utah-workspace.
Click "View Layers" link to find an OpenLayers client with an OpenStreetMap base map and the Utah layers provided by the deegree mapService.
- Click the + sign on the right side and activate some of the layers (e.g. Municipalities).
- Some layers only provide data for the Utah County, south of Salt Lake City.
Check out selected WMS layers provided by this mapService.
- Click on the link "Send Example Requests" to find a simple client interface with some example WFS requests.
You may also connect to the services with a WMS/WFS client by using the OGC service address displayed on the demo installation start page.
3. Get it up and running
Follow the steps described here.
NOTE: Please use the Firefox browser for performing the configuration steps. |
Log into the services console (the password is "deegree").
Go to workspaces.
Import the "utah-workspace".
Start the "deegree-workspace-utah-3.x.x".
3.1. Testing the installation
Now, click the see layers link to find an OpenLayers client with an OpenStreetMap base map and various Utah layers provided by the deegree mapService.
- Click the + sign on the right side and activate some of the layers (e.g. Municipalities).
- Some layers only provide data for the Utah County, south of Salt Lake City.
Check out selected WMS layers provided by this mapService and make yourself familiar with the styling rules of the WMS.
- Click on the link "send requests" to find a simple client interface with some example WFS requests.
You may also connect to the services with a WMS/WFS client by using the OGC service address displayed on the demo installation start page.
4. Adapting the configuration
You can use the services console to adjust several configuration aspects, like service metadata (as reported in GetCapabilities responses), feature stores, layers and styles.
4.1. Change metadata
Read the short tutorial on how to change metadata. The description is based on this utahDemo.
4.2. Add a feature store
Please choose the description most suitable for your needs. All descriptions are based on this utahDemo. If you intend to do all tutorials for feature stores in a row, please note that each feature store needs to be created with a unique name.
Add a shape feature store:
Read the short tutorial on how to add a shape feature store. This is pretty straight forward and recommended for unexperienced users, as it does not involve installing and setting up a database backend.
Add a SimpleSQL feature store:
Read the short tutorial on how to add a SimpleSQL feature store. The SimpleSQL feature store can be used with any spatial SQL database that supports WKT/WKB geometry representations and BBOX queries, like PostGIS, Oracle Spatial or MySQL. There are however some limitations/requirements described in the introduction of this tutorial.
Add a PostGIS feature store:
TBD: Step-by-step guide
4.3. Add a new layer
Read the short tutorial on how to add a layer. The description is based on this utahDemo.
4.4. Add layer styling
Read the short tutorial on how to add layer styling. The description is based on this utahDemo.
4.5. Change layer styling
Read the short tutorial on how to change layer styling. The description is based on this utahDemo.
4.6. Remove an existing feature store
TBD: Step-by-step guide
4.7. Remove an existing layer
TBD: Step-by-step guide
4.8. Further reading
You may also want to refer to the documentation about the so-called deegree workspace (the configuration directory). If you followed the above steps, your workspace will be located in the folder deegree-utah-demo/webapps/ROOT/WEB-INF/workspace (tar.gz and zip downloads) or the folder $TOMCAT_HOME/webapps/deegree-utah-demo-3.0.0/WEB-INF/workspace (WAR deployment).
5. Selected WMS layers
Municipalities
- This layer gives an example for categorizing in styling with SE:
- in SLD 1.0.0 (used in deegree 2) one would filter on the values for a feature property and define a number of rules (e.g. 8) with one colour each.
in SLD/SE 1.1.0 (fully supported in deegree 3) one may <Categorize> the values of a feature property and define colours for thresholds all in one single rule.
- For styling details see workspace/styles/utah_municipalities.se
County Names
- This layer gives examples for two different styling features:
- Scale dependent styling: The county names will only be displayed at a certain zoom level (zoom out, and the labels will disappear).
<Halo>: The labels for this layer are displayed with a halo.
- For configuration and styling details see workspace/services/wms.xml and workspace/styles/utah_countynames.se.
Railroads
- This layer reveals its stylish powers on a high zoom level (zoom in very closely):
The railroad tracks are created as a complex function combined with a stroke-dasharray.
- The rail road tracks are presented as continuous black-and-white line.
This is an excellent example for the possibilities of symbology encoding (SE) and the use of predefined functions
(idiv=integer division, imod=integer modulo)
- For styling details see workspace/styles/utah_railroads.se
DEM30
This layer highlights the usage of shaded relief and interpolation of raster data.
See the images above.
- For styling details see workspace/styles/utah_dem30.se
Elevation Contours
- This layer is the only example for SLD styling in the Utah demo. See workspace/styles/utah_contours.sld for details.
This layer is also an example for configuration of logical layers. See workspace/services/wms.xml for details.
Springs
This layer gives an example for recoding the labels of text symbolizers.
- All values of a feature property are matched to new values, in order to replace cryptic abbreviations with easy to understand labels.
This means, that the feature types stored in the featureService may contain one thing, while the same features get displayed by the mapService as another thing. The recoding happens on-the-fly, with styling rules.
- For styling details see workspace/styles/utah_springs.se
Satellite Provo
- This layer serves a satellite image of the city of Provo, southeast of Salt Lake City.
The satellite image is preprocessed with the RasterTree to gain tiles for various zoom levels.
- For details see workspace/data/data/utah/raster/Satellite_Provo/*.
Cities
This layer gives an example for interpolation with SE.
- The size of the point symbolizer depends on the values for a feature property (population).
- For specific values a precise size is defined, for all other values the size is interpolated.
- This results in only one single styling rule for all the different sizes.
- For styling details see workspace/styles/utah_cities.se
Weather Stations
This layer gives an example for interpolation with SE.
- The colour of point symbolizers are interpolated for the values of the feature property CDD (agriculture: cooling degree days).
- A precise colour is defined for 5 different values, all other values get colors assigned depending on the interpolation results.
Interpolation, and thus colouring, is done on-the-fly when rendering the map.
- This layer gives an example for the dimension TIME.
The configuration contains a section for <Dimension>, which defines the time series for which data is available.
- For the weather stations, there are different values available for seven days only (2009-01-01 to 2009-01-07).
- For configuration and styling details see workspace/services/wms.xml and workspace/styles/utah_weather.se.
GetMap request |
TIME=2009-01-01 |
TIME=2009-01-03 |
response image |
Dynamic Layers
The two layers SGID93_TRANSPORTATION_BusRoutes_UTA and SGID93_TRANSPORTATION_BusStops_UTA are examples for dynamic layers.
The mapService configuration (workspace/services/wms.xml) contains only a reference to the data folder.
All data from that folder is provided by the mapService as any other layer.
6. Examples for SLD 1.1.0 in WMS GetMap request (Advanced)
At the wiki-page HowToUseWMSGetMapRequestsWithSLD it is described how Styled Layer Descriptor (SLD) is used in a WMS GetMap request. Here are some examples for HTTP GET with SLDs based on the utah demo which include <NamedLayer>, <NamedStyle>, <UserStyle> and <Filter>.
6.1. SLD with NamedLayer & NamedStyle
You can embed the below-mentioned SLD in your GetMap request with the following KVP:
&SLD=http://download.deegree.org/deegree3/sld/utah_counties_sld_1_1_0_nl_ns.xml
This SLD contains a reference to the WMS-layer with the well-known name "CountyBoundaries" and a reference to the layer-style with the well-known name "2". By this you can choose one of several layer-styles. In this case the WMS-layer has got two styles: "1" and "2". Style "1" draws the county boundaries red whereas style "2" draws them yellow.
<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor
xmlns:sld="http://www.opengis.net/sld"
xmlns:se="http://www.opengis.net/se"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.opengis.net/sld" version="1.1.0"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd">
<sld:NamedLayer>
<!-- This styling file shows the use of SLD with reference to a WMS-layer and a layer-style
of the utah-demo -->
<se:Name>CountyBoundaries</se:Name>
<sld:NamedStyle>
<se:Name>2</se:Name>
</sld:NamedStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>
6.2. SLD with NamedLayer, NamedStyle & Filter
You can embed the below-mentioned SLD in your GetMap request with the following KVP:
&SLD=http://download.deegree.org/deegree3/sld/utah_counties_sld_1_1_0_nl_ns_lfc.xml
This SLD contains, additionally to the SLD above, a filter on the object with the well-known name "Morgan" of the property "app:NAME" of the feature type "app:SGID100_CountyBoundaries_edited". By this way you can easily highlight a specific object.
<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor
xmlns:sld="http://www.opengis.net/sld"
xmlns:se="http://www.opengis.net/se"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:app="http://www.deegree.org/app"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns="http://www.opengis.net/sld" version="1.1.0"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd">
<sld:NamedLayer>
<!-- This styling file shows the use of SLD with reference to a WMS-layer and a layer-style
of the utah-demo and in addition to that a filter on a specific object-->
<se:Name>CountyBoundaries</se:Name>
<sld:LayerFeatureConstraints>
<sld:FeatureTypeConstraint>
<se:FeatureTypeName>app:SGID100_CountyBoundaries_edited</se:FeatureTypeName>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>app:NAME</ogc:PropertyName>
<ogc:Literal>Morgan</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</sld:FeatureTypeConstraint>
</sld:LayerFeatureConstraints>
<sld:NamedStyle>
<se:Name>2</se:Name>
</sld:NamedStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>
6.3. SLD with NamedLayer, UserStyle & Filter
You can embed the below-mentioned SLD in your GetMap request with the following KVP:
&SLD=http://download.deegree.org/deegree3/sld/utah_counties_sld_1_1_0_nl_us_lfc.xml
To embed the same SLD but without the <Filter> use these KVP:
&SLD=http://download.deegree.org/deegree3/sld/utah_counties_sld_1_1_0_nl_us.xml
This SLD contains a reference to the WMS-layer with the well-known name "CountyBoundaries" and a user-generated <UserStyle>. By this you can draw the features of the layer in your own way. In this case the <UserStyle> displays all county boundaries in green. There is the same filter in this SLD like in the SLD above. By this way you can easily highlight a specific object and draw it in your own <UserStyle>.
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor
xmlns:sld="http://www.opengis.net/sld"
xmlns:se="http://www.opengis.net/se"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:app="http://www.deegree.org/app"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns="http://www.opengis.net/sld" version="1.1.0"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd">
<sld:NamedLayer>
<!-- This styling file shows the use of SLD with reference to a WMS-layer of the utah-demo,
a user-generated UserStyle and, in addition to that, a Filter on a specific object -->
<se:Name>CountyBoundaries</se:Name>
<sld:LayerFeatureConstraints>
<sld:FeatureTypeConstraint>
<se:FeatureTypeName>app:SGID100_CountyBoundaries_edited</se:FeatureTypeName>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>app:NAME</ogc:PropertyName>
<ogc:Literal>Morgan</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</sld:FeatureTypeConstraint>
</sld:LayerFeatureConstraints>
<sld:UserStyle>
<se:Name>CountyBoundaries_green</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:PolygonSymbolizer>
<se:Stroke>
<se:SvgParameter name="stroke">#00ff00</se:SvgParameter>
<se:SvgParameter name="stroke-opacity">1.0</se:SvgParameter>
<se:SvgParameter name="stroke-width">1.5</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</sld:UserStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>
7. Client Compatibility
The deegree 3 utahDemo has successfully been tested with the following WMS/WFS-clients:
deegree desktop (version 0.4 or higher)
OpenJump with WFS plugin (package 1.1.13 or higher)
- uDig 1.2.0
- qgis 1.4
qgis 1.5: There seems to be an issue with WMS 1.3.0 axis ordering. When connecting, try to use the full URL for retrieving the WMS 1.1.1 capabilities document:
8. Help
If you run into any problems, please let us know, so we can provide support, improve this documentation or the application itself.