deegree iGeoPortal -

Standard Edition v2.3





























lat/lon GmbH

Aennchenstr. 19

53177 Bonn

Germany

Tel ++49 - 228 - 184 96-0

Fax ++49 - 228 - 184 96-29

info@lat-lon.de

www.lat-lon.de


Dept. of Geography

Bonn University

Meckenheimer Allee 166

53115 Bonn


Tel. ++49 228 732098

Change log

Date

Description

Author

2006-10-19

Update using new formatting style

Judit Mays

2006-10-24

Add CSW client module. General clean up.

Markus Müller

2006-12-12

Move description of existing modules to new chapter.

Judit Mays

2007-01-04

Restructuring and Clean Up (typos, paths & files, links)

Judit Mays

2007-01-09

Harmonisation with standard deegree documentation structure

Markus Müller

2007-05-31

Updates for version 2.1

Hanko Rubach

2008-02-01

LayerExtension Description updated

Andreas Poth

2008-02-14

Editorial changes regarding LayerExtension description

Markus Lupp

2008-03-03

Add description for CustomTabSwitch module

Judit Mays

2008-03-03

Add description for Dynamic Legend module

Judit Mays

2008-04-10

Add reference to PDFPrinting and FullScreen (Toolbar)

Judit Mays

2008-04-14

Add description for Digitizer module

Judit Mays

2008-04-15

Update to v2.2

Judit Mays

2008-11-19

Update CSW client module

Moataz Elmasry

2008-12-04

Added documentation for gazetteer module

Moataz Elmasry

2008-12-08

Start update for gazetteer module

Judit Mays

2009-06-29
2009-11-23

Add TODO markers for 2.3 release

Judit Mays

2009-12-02

Add description for OpenStreetMap layers

Sebastian Goerke

2009-12-18

Add description for download module and configuration of digitizer module

Judit Mays

2010-01-14

Add description for pdfprint and full screen modules. Update description for gazetter module.

Judit Mays

2010-01-14

Add description for TimeSelect module

Andreas Poth

2010-01-26

Update Appendices and TOCs

Judit Mays








Table of Contents

1 Introduction 7

2 Download / Installation 9

2.1 Prerequisites 9

2.2 deegree iGeoPortal release 9

2.3 Testing the installation 9

3 Basic Configuration 11

3.1 Basic Structure of Map Context Files 11

3.2 General definitions 12

3.2.1 Extension – IOSettings 13

3.2.2 Extension – Frontend 14

3.2.2.1 Overlay of areas and modules 17

3.2.3 Extension – MapParameter 19

3.3 LayerList 19

3.3.1 Layer Extension 21

3.3.2 Layer specialities 22

4 Available Modules 23

4.1 MenuBarTop/MenuBarBottom 23

4.2 ContextSwitcher 23

4.3 DefaultContentSwitch 24

4.4 CustomTabSwitch 25

4.5 Legend 26

4.6 Dynamic Legend 27

4.7 LayerListView 29

4.8 MapOverview 30

4.9 Toolbar 31

4.9.1 Zoom2Layer 33

4.9.2 AddWMS 34

4.9.3 Printing 34

4.9.4 PDFPrinting 35

4.9.5 FullScreen 36

4.9.6 Download for WFS data 38

4.10 MapView 40

4.11 Digitizer 40

4.11.1 Setting up the WFS feature type 41

4.11.2 Setting up the WMS layer 41

4.11.3 Adapting the digitizer module 42

4.12 Gazetteer Client 42

4.12.1 Configuration of Module in Web Map Context 43

4.12.2 Module Structure 45

4.12.3 Adding a new feature search 46

4.12.4 Conclusion 49

4.13 CSW-Client 49

4.13.1 Configuration of Web Map Context 50

4.13.2 Integration of the CSW-Client module 63

4.14 TimeSelect 67

4.15 MapEditor 68

5 Advanced configuration 69

5.1 Manual Tomcat integration 69

5.1.1 Setting the path to application 69

5.1.2 web.xml 69

5.2 XSL configuration files 71

5.2.1 context2HTML.xsl 71

6 Using RPC to start iGeoPortal 72

7 Writing new modules 74

7.1 Modules without server component 74

7.2 Modules having a server component 79

7.2.1 The server component/listener 80

7.2.2 The client side 85

7.3 Conclusion - looking forward 89

Appendix A Simple example web map context document 90

Appendix B Tomcat deployment descriptor 104







Index of Tables

Table 1: PDF print module in $iGeoPortal_home$/modules/pdfprint/ 36

Table 2: Jasper templates for PDF print module in $iGeoPortal_home$/WEB-INF/conf/igeoportal/printtemplates/ 36

Table 3: Gazetteer module query templates 45

Table 4: Gazetteer module configuration files 46

Table 5: Base files of the CSW Client module 65

Table 6: JavaScript-files for the CSW-Client module 66

Table 7: JSP-files for the CSW-Client module 66





Illustration Index

Figure 1: Welcome page of deegree iGeoPortal 10

Figure 2: Initial page when starting deegree iGeoPortal 10

Figure 3: Area definitions of iGeoPortal 15

Figure 4: TimeSelect module embedded withing iGeoPortal main window and with opened calendar 67

Figure 5: Mapcontext1 with BBoxInput1 module 79



  1. Introduction

deegree is a Java Framework offering the main building blocks for Spatial Data Infrastructures (SDIs). Its entire architecture is developed using standards of the Open Geospatial Consortium (OGC) and ISO Technical Committee 211 – Geographic information / Geoinformatics (ISO/TC 211). deegree encompasses OGC Web Services as well as clients. deegree is Free Software protected by the GNU Lesser General Public License (GNU LGPL) and is accessible at http://www.deegree.org.

deegree2 is the new release of deegree supporting a number of features that deegree1 was not able to handle. This documentation describes setup and configuration of the new deegree iGeoPortal standard edition, a client imple­mentation of OGC's Web Map Service Implementation Specification 1.1.1 using OGC's Web Map Context documents for configuration.

deegree iGeoPortal is the web-based portal framework of deegree. It offers visualization of geodata through a standard web browser like Mozilla, Firefox or MSIE. The demo download that accompanies this document includes the standard functionality of iGeoPortal. This is basically a „Web-GIS“ using WMS servers as map source.

Additional modules not configured in this download package enable the user to search for and download data or digitize online and insert the result including its properties via transactional WFS into a database backend like Postgresql/Postgis, and navigate the displayed map using an OGC Gazetteer (WFS-G). Each user is able to store the current state of the portal in an OGC Web Map Context document that can be loaded again later to restore the portals state. If assigned to deegree users and a right management system (iGeoSecurity) the portal can limit this and other functions to authorized users and enable personalized configuration. A component for accessing OGC catalogue services for ISO 19115/19119 metadata is also under development.

The demo portal is preconfigured to work with a remote deegree2.2 demo Web Map Service (WMS), but there is no limitation on using other OGC WMS, for example UMN MapServer or other, (proprietary) servers that can be installed on remote machines. iGeoPortal is not limited to be used with just one WMS. You can combine several WMSs in one predefined context as well as load additional WMSs 'on the fly'. Additionally a simple search module based on a deegree2.2 demo WFS-G (Web Feature Service – Gazetteer enabled) is implemented.

To get an overview about deegree WMS and other deegree components that may be used within the context of iGeoPortal please have a look at the respective documentation. This document will deal only with the administration of iGeoPortal.

Besides iGeoPortal, deegree comprises a number of additional services and clients. A complete list of deegree components can be found at:

http://www.lat-lon.de Products

Downloads of packaged deegree components can be found at:

http://www.deegree.org Download

The web services of deegree are realized as Java modules controlled by one central servlet (the “dispatcher”). This servlet has to be deployed to the respective web server/servlet engine. Most of the common web servers support servlet technology, thus making deegree a universal product. The Apache-Tomcat 5.5 Servlet-Engine is recommended due to its widespread use and its status as an open-source product.

  1. Download / Installation

    1. Prerequisites

For deegree2 iGeoPortal to run you need:

For installation of these components refer to the corresponding documentation at java.sun.com and tomcat.apache.org.

    1. deegree iGeoPortal release

deegree iGeoPortal can be downloaded from http://www.deegree.org. The release is packed as a WAR-archive (igeoportal-std.war). Simply put this file into your $TOMCAT_HOME$/webapps directory and (re-)start Tomcat. The installation of iGeoPortal is already done with this, as long as you run tomcat on port 8080 and it is accessible via 'localhost'. The package comes preconfigured with a remote deegree2.2 demo WMS, why there is no further configuration needed to get it up an running.

Note: It is also possible to extract the WAR archive (which is nothing but a renamed .zip file) into another place of your computer and direct Tomcat to this place. Because of this possibility, in the remainder of this document, the directory you extracted the files to is referred to as $iGeoPortal_home$ (=$TOMCAT_HOME$/webapps/igeoportal-std in the standard case).

The example uses a deegree WMS but this is not required. Each WMS compliant to OGC WMS 1.1.0 – 1.1.1 specifications can be used as well.

    1. Testing the installation

After deploying the application to tomcat, the portal can be started by entering:

http://localhost[:port]/igeoportal-std

into the address bar of your browser (this usually is http://localhost:8080/igeoportal-std). Doing this should open the entry page.


Figure 1: Welcome page of deegree iGeoPortal


Choosing either link of "deegree iGeoPortal WebMapContexts" will load the portal with a preconfigurted web map context (WMC). If you choose "Utah" and everything went fine you should see the following page:


Figure 2: Initial page when starting deegree iGeoPortal


If you chose another one of the WMCs you should get to a very similar layout, but with different data and a different map.

Congratulations – you now have iGeoPortal running!

  1. Basic Configuration

The central configuration files of deegree iGeoPortal are XML documents that are valid against the XML-schema defined in OGC's Web Map Context specification 1.0.0. This schema defines two sections that are allowed to contain any well formed XML fragments. These sections (extensions in WMC syntax) are used by iGeoPortal to define layout and additional data access methods. Nevertheless a deegree iGeoPortal context document is a compliant WMC document and iGeoPortal is able to read and use WMC documents from other vendors.

As stated above, an OGC WMC document is divided into several parts. Apart from the mandatory or optional parts of the WMC specification it is possible to use elements called <Extension> to define vendor specific elements/behaviours. The content of the the <Extension> element is defined as <xs:any> so the only restriction is that it has to be a well formed XML fragment.

deegree iGeoPortal uses these elements mainly for definition of the graphical structure of the portal and definition of access paths to resources required by the portal. A detailed description of the content of all elements defined by the OGC can be found within the WMC specification that can be downloaded from the OGC pages (see https://portal.opengeospatial.org/files/?artifact_id=3841). Therefore only those elements will be explained in this documentation which are crucial for deegree iGeoPortal.

    1. Basic Structure of Map Context Files

The root element of each map context configuration file is <ViewContext>. It contains the required namespace definitions and two child elements, <General> and <LayerList>.

<?xml version="1.0" encoding="UTF-8"?>

<ViewContext xmlns="http://www.opengis.net/context"
xmlns:sld
="http://www.opengis.net/sld"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
version="1.0.0" id="String">

<General>

...

<!-- described in chapter 3.2 -->

...

</General>

<LayerList>

...

<!-- described in chapter 3.3 -->

...

</LayerList>

</ViewContext>

The contents of these elements will be described in detail in the following paragraphs.

    1. General definitions

The element <General> contains definitions of map size, map extent and of vendor and content description. In detail these are:

<General>

<!-- specifies the map size and must correspond to the module MapView definded further below. The <BoundingBox ...> sets the used CRS and the initial extend (used for button View full extent). BBox must have the same proportion as the <Window ...> settings.

<Window width="700" height="550" />

<BoundingBox SRS="EPSG:26912" minx="17300" miny="4049850" maxx="867300" maxy="4699850" />

<Window width="700" height="550" />

<BoundingBox SRS="EPSG:26912" minx="17300" miny="4049850" maxx="867300"
maxy="4699850" />

<Title>deegree iGeoPortal</Title>

<KeywordList>

<Keyword>deegree</Keyword>

<Keyword>iGeoPortal</Keyword>

<Keyword>SDI</Keyword>

<Keyword>GDI</Keyword>

<Keyword>lat/lon</Keyword>

<Keyword>utah</Keyword>

</KeywordList>

<DescriptionURL format="text/html">

<OnlineResource xlink:type="simple" xlink:href="http://www.deegree.org" />

</DescriptionURL>

<ContactInformation>

<ContactPersonPrimary>

<ContactPerson>Andreas Poth</ContactPerson>

<ContactOrganization>lat/lon</ContactOrganization>

</ContactPersonPrimary>

<ContactPosition>developer</ContactPosition>

<ContactAddress>

<AddressType>postal</AddressType>

<Address>Aennchenstr. 19</Address>

<City>Bonn</City>

<StateOrProvince>NRW</StateOrProvince>

<PostCode>53177</PostCode>

<Country>Germany</Country>

</ContactAddress>

<ContactVoiceTelephone>++49 228 184960</ContactVoiceTelephone>

<ContactElectronicMailAddress>poth@lat-lon.de</ContactElectronicMailAddress>

</ContactInformation>

<Extension xmlns:deegree="http://www.deegree.org/context">

<deegree:IOSettings>

...

<!-- described in chapter 3.2.1 -->

...

</deegree:IOSettings>

<deegree:Frontend scope="JSP">

...

<!-- described in chapter 3.2.2 -->

...

</deegree:Frontend>

<deegree:MapParameter>

...

<!-- described in chapter 3.2.3 -->

...

</deegree:MapParameter>

</Extension>

</General>

      1. Extension – IOSettings

The element <IOSettings> describes some directories, where iGeoPortal stores files such as print files. If you change the configuration of one of the demo context files or define one of your own, you should keep in mind that only the definition of <PrintDirectory> and <TempDirectory> is mandatory. If some or all of the other directory definitions are missing, deegree will use the <TempDirectory> instead. Depending on the used functionalities of a portal instance it may not be necessary to publish all directories to the web. In this case a directory can be located outside the web context or below the WEB-INF directory. To access the directories content a web application must be defined in <deegree:Access> instead of the path to the directory.

The iGeoPortal demo uses the following reduced IOSettings. Because no module for user defined styles (SLD) is offered at the moment, corresponding directory definitions would not make sense.

<Extension xmlns:deegree="http://www.deegree.org/context">

<deegree:IOSettings>

<deegree:TempDirectory>

<deegree:Name>../../../tmp</deegree:Name>

<deegree:Access>

<OnlineResource xlink:type="simple"
xlink:href="http://localhost:8080/igeoportal-std"/>

</deegree:Access>

</deegree:TempDirectory>

<deegree:PrintDirectory>

<deegree:Name>./../../../print</deegree:Name>

<deegree:Access>

<OnlineResource xlink:type="simple"
xlink:href="http://localhost:8080/igeoportal-std/print?"/>

</deegree:Access>

</deegree:PrintDirectory>

<deegree:DownloadDirectory>

<!-- relative path to the folder referenced in the DownloadServlet of
igeoportals web.xml
-->

<deegree:Name>../../downloads</deegree:Name>

<deegree:Access>
<OnlineResource xlink:type="simple"
xlink:href="http://localhost:8080/igeoportal-std" />
</deegree:Access>
</deegree:DownloadDirectory>

<deegree:SLDDirectory>

<deegree:Name>../../../</deegree:Name>

<deegree:Access>

<OnlineResource xlink:type="simple"
xlink:href="http://localhost:8080/igeoportal-std" />

</deegree:Access>

</deegree:SLDDirectory>
</deegree:IOSettings>

...

</Extension>

      1. Extension – Frontend

The element defined within the <Extension> element associated to layout is the <Frontend> element. It is used to define the graphical user interface, as well as other system-specific parameters, not seen by the end-user. A short overview is given here, the details will follow below.

<deegree:Frontend scope="JSP">

<deegree:Controller>...</deegree:Controller>

<deegree:Style>...</deegree:Style>

<deegree:Header>...</deegree:Header>

<deegree:Footer>...</deegree:Footer>

<deegree:CommonJS>...</deegree:CommonJS>

<deegree:North hidden="false">...</deegree:North>

<deegree:East hidden="false">...</deegree:East>

<deegree:West hidden="false">...</deegree:West>

<deegree:South hidden="false">...</deegree:South>

<deegree:Center hidden="false">...</deegree:Center>

</deegree:Frontend>

The idea of iGeoPortal is to encapsulate different functionalities in separate modules. These modules work as independent as possible from each other and they all use the same interface. So e.g. the map, its legend, or the layer list are all realized by separate modules. Each module can be located anywhere in the portals predefined layout frames. Except for map view and (the invisible) map model the registration of modules is optional. So it's your decision which functions to offer users of the map context instance (consider: each map context can define its own collection of available modules!).


Figure 3: Area definitions of iGeoPortal


Each module is made up of an HTML-Page and a JavaScript object that can be included in the page or be located in its own file. Instead of a static HTML-page any other resource that is able to deliver HTML (e.g. JSP or ASP) can be used instead.

All modules are dynamically located on the portal's skin based on their settings. To enable the administrator of a portal to influence the portals layout deegree defines seven areas. A module can be assigned to five of these areas (North, East, South, West, Center); the other two areas (Header, Footer) are designed for taking links to simple HTML-content (static or dynamic). Usually they will be used for corporate identity, menus, external links etc.

The Controller will receive all portal driven events (zoomin, pan, print etc.) and delegates them to the responsible modules.

<deegree:Frontend scope="JSP">

<deegree:Controller>./controller.jsp</deegree:Controller>

<deegree:Style>./css/deegree.css</deegree:Style>

<deegree:Header>header.jsp</deegree:Header>

<deegree:Footer>footer.jsp</deegree:Footer>

<deegree:CommonJS>

<deegree:Name>htmllayer.js</deegree:Name>

<deegree:Name>layergroup.js</deegree:Name>

<deegree:Name>pushbutton.js</deegree:Name>

<deegree:Name>recentertolayer.js</deegree:Name>

<deegree:Name>togglebutton.js</deegree:Name>

<deegree:Name>./javascript/envelope.js</deegree:Name>

<deegree:Name>./javascript/event.js</deegree:Name>

<deegree:Name>./javascript/exception.js</deegree:Name>

<deegree:Name>./javascript/feature.js</deegree:Name>

<deegree:Name>./javascript/geometries.js</deegree:Name>

<deegree:Name>./javascript/geometryfactory.js</deegree:Name>

<deegree:Name>./javascript/geometryutils.js</deegree:Name>

<deegree:Name>./javascript/geotransform.js</deegree:Name>

<deegree:Name>./javascript/json2.js</deegree:Name>

<deegree:Name>./javascript/layerutils.js</deegree:Name>

<deegree:Name>./javascript/rpc.js</deegree:Name>

<deegree:Name>./javascript/rendering.js</deegree:Name>

<deegree:Name>./javascript/request_handler.js</deegree:Name>

<deegree:Name>./javascript/style.js</deegree:Name>

<deegree:Name>./javascript/utils.js</deegree:Name>

<deegree:Name>./javascript/wktadapter.js</deegree:Name>

</deegree:CommonJS>

...

</deegree:Frontend>

The Controller definition is followed by setting the central stylesheet document which controls the portals layout. Definitions made here can be overwritten by CSS definitions made in an HTML-page assigned to a loaded module. Afterwards the optional content of the header and footer section will be defined (note: contents of header and footer does not have to be a static HTML-page). Definition of 'common' JavaScript files used by more than one module is optional too but it strongly recommended. If a JavaScript or HTML file is defined without absolute or relative path settings, the file must be located in $iGeoPortal_home$ directory. Relative path settings use this directory as the starting point.

After this follows the definition of the used areas (each area is allowed to be empty or can be left out completely) and the modules contained in these areas. The following example demonstrates how the module 'MenuBarTop' is assigned to the 'North' area.

<deegree:Frontend>

...

<deegree:North hidden="false">

<deegree:Module hidden="false" type="content" width="990" height="22"

scrolling="no">

<deegree:Name>MenuBarTop</deegree:Name>

<deegree:Content>menubartop.html</deegree:Content>

<deegree:ModuleJS>menubar.js</deegree:ModuleJS>

</deegree:Module>

</deegree:North>

...

</deegree:Frontend>

Each area may include the optional attribute 'hidden' to define if an area should be visible when the context is loaded into the portal. This may be useful if an area's content just is intended to be visible in some situations. Its default value is 'false'.

At the example above the 'MenuBarTop' module is embedded within the 'North' area. Even if the example shows just one module within an area there is no limit to the numbers of modules that can be registered to an area (if you register too many modules you may get a somehow strange portal layout). If more than one module is registered to an area deegree tries to arrange the modules considering their real size, preferred size (width, height attributes) and available space. Modules within 'North' and 'South' area will be arranged horizontally, modules within 'West', 'Center' and 'East' will be arranged vertically.

Five attributes can be assigned to each module registered to an area. But just one of them (the type) is mandatory:

As sub-element of a <Module> element its name (<Name>), resource of its content (<Content>) and a JavaScript file will be set. The last contains a JavaScript object having the identical name as the module it is assigned to (this is mandatory, see below) (MenuBarTop in the example above). If the content (e.g. a static HTML page) already contains a JavaScript object with the same name as the module <ModuleJS> can be left out.

For each module a parameter definition may be given. Each parameter (name/value) will be passed to the constructor of the JavaScript object assigned to a module. If a module receives more than one parameter the parameter definition must be in the same order the JavaScript object constructor expects it.

<deegree:Module hidden="false" type="content" width="150" height="35">

<deegree:Name>DefaultContentSwitch</deegree:Name>

<deegree:Content>defaultcontentswitch.html</deegree:Content>

<deegree:ModuleJS>contentswitch.js</deegree:ModuleJS>

<deegree:ParameterList>

<deegree:Parameter>

<deegree:Name>targetIFrame</deegree:Name>

<deegree:Value>'LayerListView'</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>sourceModules</deegree:Name>

<deegree:Value>'LayerListView|layerlistview.html</deegree:Value>

</deegree:Parameter>

/deegree:ParameterList>

</deegree:Module>

All modules available for the demo of deegree iGeoPortal Std. Ed. are described in chapter 4.

        1. Overlay of areas and modules

With version 2.3 the portal opens up the strict layout of north, east, south, west and center areas. It is now possible to define areas and modules to "float" above other elements as overlays. Areas and modules marked as overlay will get their fixed absolute position through the attributes top and left. All in all there are four new attributes that enable to define areas or modules as overlay.

An example for module marked as overlay with the extra attributes (overlay, top left, header) is given below.

<deegree:Module hidden="false" type="content" width="150" height="150"

overlay="true" header="true" top="75" left="10" scrolling="no">

<deegree:Name>MapOverview</deegree:Name>

<deegree:Content>mapoverview.html</deegree:Content>

<deegree:ModuleJS>mapoverview.js</deegree:ModuleJS>

<deegree:ParameterList>

...

</deegree:ParameterList>

</deegree:Module>

If an area is marked as overlay, it may not contain any overlay modules. Thus, modules marked as overlay may only appear in areas that are not overlayed themselves.

Each area and each module marked as overlay need their own css class in ./css/deegree.css. Following rules apply: classes for modules are named as the module prefixed with "class", classes for areas are called as the area and postfixed with "Window".

First example for a module: The css class for the module "MapOverview" is called "classMapOverview".

.classMapOverview {
position: absolute;
background: #FFFFFF;
border: #000000 2px solid;
opacity: .80;
filter: alpha(opacity=80);
-moz-opacity: 0.80;
}

The first two lines (position, background) are necessary for every overlay module. The other parameters (border, opacity, filter and -moz-opacity) are being used for the window titel bar, enabling the portal user to open and close the overlayed window. They only need to be specified, if the modules attribute header is set to true (see abve).

Second example for an area: The css class for the "east" area is called "eastWindow".

.eastWindow {
position: absolute;
background: #FFFFFF;
border: #000000 2px solid;
opacity: .90;
filter: alpha(opacity=90);
-moz-opacity: 0.90;
}

The above example contains the same css parameters as the module example. Also possible would be a definition as the one below:

.eastWindow {

position:absolute;

background-image:url( '../images/space.gif' ) ;

}

Please remember that it is not the css that defines whether an area or a module are displayed as overlay. Only the style information is provided here. To define an area or a module as overlay, you need to set the respective attributes in the web map context files.

      1. Extension – MapParameter

Below the frontend description (list of available modules) the parameters of deegree:MapParameters describe the behaviour of the map in general. The section defines the format of the GetFeatureInfo request, the factor for zooming in or out, the factor for paning the map and the minimum and maximum scale that is permitted for the map view in general.

<deegree:MapParameter>

<deegree:OfferedInfoFormats>

<deegree:Format>application/vnd.ogc.gml</deegree:Format>

<deegree:Format selected="true">text/html</deegree:Format>

</deegree:OfferedInfoFormats>

<deegree:OfferedZoomFactor>

<deegree:Factor selected="true">25</deegree:Factor>

</deegree:OfferedZoomFactor>

<deegree:OfferedPanFactor>

<deegree:Factor selected="true">15</deegree:Factor>

</deegree:OfferedPanFactor>

<deegree:MinScale>1</deegree:MinScale>

<deegree:MaxScale>100000</deegree:MaxScale>

</deegree:MapParameter>

Note: These values are currently not evaluated! Changing the values does not result in a changed behaviour of the portal. Hope for future releases.

    1. LayerList

After the general definition of the layout and the registered functions of the portal follows the definition of the available layers and their resources, according to OGC Web Map Context (WMC) Specification. All WMC specific information is encapsulated within the <LayerList> element. One <LayerList> contains any amount of <Layer>-elements. The sequence of the layers describes the sequence of visible layers. Beneath all kinds of elements of WMC specification, every layer is extended by the <Extension>-element where you can define any other characteristics. deegree iGeoPortal uses some extensions for describing the data resources.

A <Layer>-Element has the following syntax:

<Layer queryable="1" hidden="1">

<!-- service="OGC:WMS" version="1.1.1"

principally iGeoportal is also capable of requesting WFS; this feaure is not usable yet.

The title="deegree Demo WMS" must be unique for every requested WMS, in case you configure more than one WMS.

xlink:href specifies the online resource of the service -->

<Server service="OGC:WMS" version="1.1.1" title="deegree Demo WMS">

<OnlineResource xlink:type="simple"

xlink:href="http://testing.deegree.org/deegree-wms/services?" />

</Server>

<!-- <Name> must be the WMS layer name -->

<Name>Springs</Name>

<!-- Title can be chosen freely and should be human readable -->

<Title>Springs</Title>

<!-- Specifies the requested CRS to the WMS. Should be identical to the Web Map Context (WMC) configuration -->

<SRS>EPSG:26912</SRS>

<FormatList>

<!-- sets the requested image format. Must be offered by WMS -->

<Format current="1">image/jpeg</Format>

</FormatList>

<StyleList>

<Style current="1">

<!-- set the style to be used. Must be offered by WMS -->

<Name>default</Name>

<Title>default</Title>

</Style>

</StyleList>

<Extension xmlns:deegree="http://www.deegree.org/context">

...

</Extension>

</Layer>

Each layer element contains two attributes for determining if a GetFeatureInfo-Request is possible (queryable="1") or if the layer is visible at start-up (hidden="1"). The first child element <Server> describes which Web Service delivers a specific layer. Via three attributes, its service type, -version and -title are set. Theoretically, WFS and WCS Services could be requested here. At the moment, neither the WMC specification nor deegree implements them, so only OGC:WMS instances can be referred to. The <Server>-element contains the OnlineResource with the URL of a WMS and its according layer. The title="WMS title" needs to be unique for every implemented (WMS)- Service.

After defining the WMS, there are some definitions that are pretty similar to the ones of a Capabilities Document of a WMS. It is important to mention that the statements are identical to the Capabilities or respectively subsets of them. For instance, the layer's name in the WMC document has to be identical to the WMS Capabilities document's layer name. The title can be different. The requested SRS for each layer of the portal has to be supported by the WMS. The same applies to the image format and style definition. Not all available formats, SRS and styles have to be defined.

      1. Layer Extension

deegree specific informations for <Layer> are stored within an element named <Extension>. For example deegree iGeoPortal stores information on data access, authentication mechanism and valid scale range of a layer here.

<Extension xmlns:deegree="http://www.deegree.org/context">

<deegree:DataService>

<Server service="OGC:WFS" version="1.1.0" title="deegree WFS">

<OnlineResource xlink:type="simple"

xlink:href="http://testing.deegree.org/deegree-wfs/services?" />

</Server>

<deegree:GeometryType>

{http://www.deegree.org/app}:geometry

</deegree:GeometryType>

<deegree:FeatureType>

{http://www.deegree.org/app}:StateBoundary

</deegree:FeatureType>

</deegree:DataService>

<deegree:ScaleHint min="0" max="18000"/>

<deegree:UseAuthentication>none</deegree:UseAuthentication>

</Extension>

DataService: Via the element <DataService> the portal server knows, where it can get the original vector data for downloading. If no DataService for a layer is defined, downloads are not possible (proper support from version 2.4 onwards).

ScaleHint: Additionally, the scale range for visualizing a layer can be defined. It corresponds to the <ScaleHint> information of the WMS Capabilities and is optional.

If a <ScaleHint> is defined and the current map view is out of that scale range, the according layer in the layerlist is greyed out. This parameter will not overwrite the WMS ScaleHint settings. Therefore the map wil be displayed anyway. This parameter should only be used, if a WMS does not provide ScaleHint information in its capabilities (as should be done), but confines the map response to a certain scale range nonetheless.

Background info: According to WMS specification the <ScaleHint> is defined as 'the ground distance in metres of the southwest to northeast diagonal of the middle pixel of the map'.

UseAuthentication: The optional element <UseAuthentication> can be defined to give deegree a hint if authentication information is to be used when accessing capabilities of an OWS. The default value is 'none' which means that no authentication information will be used when accessing an OWS. To force authentication usage, either 'user/password' or 'sessionID' can be used. Using 'user/password' iGeoPortal adds the parameters USER and PASSWORD to requests against the OWS offering the requested layer; using sessionID a parameter named SESSIONID will be added.

When using 'user/password' or 'sessionID' you have to ensure, that:

  1. a user's authentication is available for the client which loads a WMC

  2. the OWS assigned with a layer is able to handle password authentication information

  3. each layer within a WMC assigned to the same OWS must define the same value for <UseAuthentication> element.

      1. Layer specialities

deegree iGeoPortal v2.3 comes with a Web Map Context (WMC) containing layers with direct access to OpenStreetMap slippy maps and layers based on OpenStreetMap data stored in a DB. The path to this WMC document is:

$igeoportal-HOME$/WEB-INF/conf/igeoportal/users/default/wmc_testOSM.xml.

Both, the slippy map layers and the layers based on OpenStreetMap data, will only work with the adequate configuration of a deegree Web Map Service. For further information, please look into the deegree Web Map Service documentation v2.3 (or later).

  1. Available Modules

There are numerous modules available with iGeoPortal Standard Edition. In the demo releases at http://demo.deegree.org the start web map context is set to "Utah" (wmc_start_utah.xml), with the possibility to switch to "Salt Lake City" (wmc_saltlake.xml) for an example with raster data, or to our "Playground" (wmc_testPlayground.xml) where most new modules get integrated.

Since v2.3, a fourth web map context has been added to this list: "OpenStreetMap.NRW" (wmc_testOSM.xml) is an example for integrating the OpenStreetMap data (licensed under CC-by-sa) in the portal.

Some features activated in the online demo will not work out of the box for your downloaded and privately set up iGeoPortal. This holds true for those modules that need to be configured to your own requirements. You will find a comment in the description to these modules.

    1. MenuBarTop/MenuBarBottom

Description: menu bar containing links to functions of the portal and internal or external HTML-pages. Both modules are simple in their construction. It isn't a problem to extend or limit the pre-defined link list.

Init-parameters: none

    1. ContextSwitcher

Description: As described above the map context document is the basis for functions and modules visible in an iGeoPortal instance. The portal itself offers a 'container' where any valid map context document can be processed and visualized. ContextSwitcher represents a module that enables loading of other contexts during runtime and switching content of a portal instance. This enables offering different views or themes within one instance of iGeoPortal. All context documents that should be available for switching between must be stored in directory $iGeoPortal_home$/WEB-INF/conf/igeoportal.

The module is realised as an HTML-page with a combo box that is filled by the assigned JavaScript object evaluating the passed init-parameters.

Init-parameters:

<deegree:Module hidden="false" type="content" width="150" height="60">

<deegree:Name>ContextSwitcher</deegree:Name>

<deegree:Content>contextswitcher.html</deegree:Content>

<deegree:ModuleJS>contextswitcher.js</deegree:ModuleJS>

<deegree:ParameterList>

<deegree:Parameter>

<deegree:Name>label</deegree:Name>

<deegree:Value>'Theme selection:'</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>listOfContexts</deegree:Name>

<!--

If you want to test digitizerModule, gazetteerClient,

securityEnabledPortal, pdf printing or legend view

switch to the second <deegree:Value> entry OR load a stored

portal context.

-->

<deegree:Value>'Utah|wmc_start_utah.xml;Salt Lake City|

wmc_saltlake.xml;Playground|

wmc_testPlayground.xml;OpenStreetMap.NRW|

users/default/wmc_testOSM.xml'

</deegree:Value>

<!--

<deegree:Value>'Utah|wmc_start_utah.xml;Salt Lake City|

wmc_saltlake.xml;Playground|wmc_testPlayground.xml;

OpenStreetMap.NRW|users/default/wmc_testOSM.xml;

TestDynamicLegend|users/default/wmc_testDynLegend.xml;

TestPdfPrint|users/default/wmc_testPdfPrint.xml;

TestCustomTab|users/default/wmc_testCustomTab.xml;

TestLegendView|users/default/wmc_testLegend.xml;

TestFullScreen|users/default/wmc_testFullScreen.xml;

TestDigitizer|users/default/wmc_testDigitizer.xml;

TestGaz|users/default/wmc_testGazClient.xml;

TestSecurity|users/default/wmc_testSecurity.xml;

TestCSW|users/default/wmc_testCswClient.xml'</deegree:Value> -->

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>size</deegree:Name>

<deegree:Value>1</deegree:Value>

</deegree:Parameter>

<!--

optional param. if not set, value will be taken from deegree.css

(.pContextSwitcher)

-->

<!--

<deegree:Parameter>

<deegree:Name>bgcolor</deegree:Name>

<deegree:Value>'#cccccc'</deegree:Value>

</deegree:Parameter>

-->

</deegree:ParameterList>

</deegree:Module>

Four init-parameters are passed to the module. By using the 'label' we can define the headline above the combo box. Parameter 'listOfContexts' contains a comma separated list of available context documents. Each list entry consists of two parts. The first part is the context name as displayed in the combo box. The second, separated by a '|' character, is the name of the context document file as stored in $iGeoPortal_home$/WEB-INF/conf/igeoportal directory. The third init-parameter defines the size of the HTML select element displaying the list of available contexts. A value of '1' results in the display of a combo box. A value > 1 will force displaying a HTML list. The last parameter enables definition of the modules background color.

    1. DefaultContentSwitch

Description: deegree iGeoPortal arranges all modules assigned to an area considering their size, the preferred size and available space automatically. Especially if a large number of modules should be registered to a portal/context available space may be exceeded. For this case iGeoPortal offers the DefaultContentSwitch module. It represents a module that enables loading more than one module inside one portal area and switching its content during runtime. One can switch to the needed module through list boxes, menu items, tab panes or whatever a ContentSwitcher offers. The DefaultContentSwitcher available with the demo iGeoPortal uses a combo box for switching between layer list and legend view.

To enable switching between different modules these modules have to be registered first as described above within a portal area. The provider/administrator of a module must ensure that only one of these modules is set to visible (hidden='false') all others have to be invisible (hidden='true'). After this the DefaultContentSwitcher will be 'informed' through its init-parameters between which modules switching has to be enabled.

Init-parameters:

<deegree:ParameterList>

<deegree:Parameter>

<deegree:Name>targetIFrame</deegree:Name>

<deegree:Value>'LayerListView'</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>sourceModules</deegree:Name>

<deegree:Value>

'LayerListView|layerlistview.html;Legend|legend.html'

</deegree:Value>

</deegree:Parameter>

</deegree:ParameterList>

The first parameter contains the name of the module that will be visible when loading the context. The second parameter contains a comma separated list of modules, between which switching will be possible. Each entry of the list contains two parts. The first part is the name of the module as displayed in the switchers combo box. The second is the name of content document assigned to a module.

    1. CustomTabSwitch

Description: The CustomTabSwitch is a variation of the above Default­ContentSwitch. It also enables you to switch between layer list and legend view, but it uses tab panes instead of a combo box.

To test this functionality, please refer to the Web Map Context wmc_testCustomTab.xml.

Init-parameters: this module has the same init-parameters as the DefaultContentSwitch.

<deegree:Module hidden="false" type="content" height="25" width="175">

<deegree:Name>CustomTabSwitch</deegree:Name>

<deegree:Content>customtabswitch.html</deegree:Content>

<deegree:ModuleJS>customtabswitch.js</deegree:ModuleJS>

<deegree:ParameterList>

<deegree:Parameter>

<deegree:Name>targetFrame</deegree:Name>

<!-- value must correspond to first entry in
sourceModules value
-->

<deegree:Value>'LayerListView'</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>sourceModules</deegree:Name>

<!-- order of entries in list is important. first entry
must be the visible module (targetFrame)
-->

<deegree:Value>
'LayerListView|layerlistview.html;Legend|legend.html'
</deegree:Value>

</deegree:Parameter>

</deegree:ParameterList>

</deegree:Module>

The targetFrame contains the name of the module that will be visible when loading the context. The second parameter contains a comma separated list of modules, between which switching will be possible. The order of entries in this list is important. The first entry in the list must match the module that is chosen as initial module in targetFrame.

    1. Legend

Description: The 'Legend' module is able to visualise the legend of the associated map. It calls the GetLegendGraphic-Function of an appropriate Web Map Service offering that optional function. The parameters used are mostly for controlling the layout.

Init Parameters:

<deegree:ParameterList>

<deegree:Parameter>

<deegree:Name>label</deegree:Name>

<deegree:Value>'Legend'</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>bgcolor</deegree:Name>

<deegree:Value>'#cccccc'</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>layerlist</deegree:Name>

<deegree:Value>this.layerList</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>width</deegree:Name>

<deegree:Value>20</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>height</deegree:Name>

<deegree:Value>20</deegree:Value>

</deegree:Parameter>

</deegree:ParameterList>

The parameter 'label' is for labeling the entire legend graphic; with 'bgcolor' the background color is defined. Initially the key 'layerlist' should not be changed; it is a reference to an internal list of map layers of the portal. It makes sense to change the key, if an instance of the portal contains more than one map in order to generate a separate legend for each map. With the parameter 'width' and 'height' you can define the size of the legend symbols (!), not the entire legend graphic itself.

    1. Dynamic Legend

Description: This module is a variation of the standard legend module. Instead of simply creating a GetLegendGraphic request and sending this request to the WMS of the respective layer, its functionality is more complex:

If a layer definition in the map contexts LayerList (see chapter 3.3) provides a layer name, and a style definition including the style name and a legend URL, then this URL is used to retrieve the legend image.

If no legend URL is set in the map context, then it is checked whether the WMS capabilities document contains a URL for this layer and style.

If no legend URL can be retrieved from the capabilities document, but the WMS can answer GetLegendGraphics requests, such a request will be sent and the response will be used to display the legend.

If the WMS does not provide GetLegendGraphics requests, or if no legend URL is available for the respective layer, no legend will be displayed. Instead, the image defined as 'missingLegend' (see below) will be shown.

Please refer to wmc_testDynLegend.xml for testing this module.

Init parameter in wmc:

The only parameter needed in the module configuration is the 'label' used for labeling the entire legend graphic.

<deegree:Module hidden="true" type="content" width="250" height="460">

<deegree:Name>Legend</deegree:Name>

<deegree:Content>legend_dyn.jsp</deegree:Content>

<deegree:ParameterList>

<deegree:Parameter>

<deegree:Name>label</deegree:Name>

<deegree:Value>'Legend'</deegree:Value>

</deegree:Parameter>

</deegree:ParameterList>

</deegree:Module>

Since this module carries out many more tasks than the simple Legend module (chapter 4.5), it needs to call the server side to generate the legend. It is therefore necessary to add an event handler to the controller.xml as described in chapter 7.2.

Init parameter in controller.xml:

The configuration parameters for the drawLegend event are described inline.

<event name="mapClient:drawLegend"
class="org.deegree.portal.standard.wms.control.DynLegendListener"
next="legend_dyn.jsp" alternativeNext="container.jsp">

<parameter>

<!-- left space to edge of legend -->

<name>leftMargin</name>

<value>0</value>

</parameter>

<parameter>

<!-- right space to edge of legend -->

<name>rightMargin</name>

<value>0</value>

</parameter>

<parameter>

<!-- top space to edge of legend -->

<name>topMargin</name>

<value>10</value>

</parameter>

<parameter>

<!-- bottom space to edge of legend -->

<name>bottomMargin</name>

<value>10</value>

</parameter>

<parameter>

<!-- printing the layer titles? true (yes) or false (no) -->

<name>useLayerTitle</name>

<value>true</value>

</parameter>

<parameter>

<!-- just for GetLegendGraphicRequests:
if a legend is smaller than eg. 50px the layer title will
be printed into the legend image
-->

<name>maxNNLegendSize</name>

<value>50</value>

</parameter>

<parameter>

<!-- separating the legend images from each other
by an image
-->

<name>separator</name>

<value>images/legendSeparator.gif</value>

</parameter>

<parameter>

<!-- image displayed if no legend can be found -->

<name>missingImage</name>

<value>images/missingLegend.gif</value>

</parameter>

<!-- for iGeoSecurity only: list of servers which need to be
accessed through an owsproxy to get a LegendGraphic
-->
<parameter>

<name>users</name>

<!-- the value *must* be adjusted to your system -->

<value>
http://demo.deegree.org/deegree-wms/services;username;password|
http://deegree.org/owsproxy/proxy;username;password
</value>

</parameter>

</event>

The last parameter ('users') only needs to be set in GDI-environments using iGeoSecurity (see respective documentation for details). If only iGeoPortal is running, and no server is accessed via owsproxy, this parameter must be omitted.

If one or more servers need to be accessed through an owsproxy, the parameter 'users' needs to be set. The 'value' contains a list separated by | (pipe), where each entry consists of server-address;username;password. Username and password are the admin's login values for the respective owsproxy.

    1. LayerListView

Description: The module 'LayerListView' is pretty similar to the 'Legend'-module. It describes also a list of the layers of a map but unlike the legend module it can be changed during runtime: layers can be shifted in their sequence and can be switched on or off. Besides, it is possible to define layers which can be queried by a GetFeatureInfo-request.

There are two implementations of 'LayerListView' available. The first (available through JavaScript file layerlistview.js) enables selecting one and only one layer for being target for GetFeatureInfo request (example context wmc_start_utah.xml). The other implementation (available through JavaScript file layerlistview_allfi.js) will always select all layers that are visible and queryable for GetFeatureInfo requests (example context wmc_saltlake.xml).

Init parameters:

<deegree:ParameterList>

<deegree:Parameter>

<deegree:Name>name</deegree:Name>

<deegree:Value>'layerlistview'</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>layerlist</deegree:Name>

<deegree:Value>this.layerList</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>label</deegree:Name>

<deegree:Value>'Wuppertal'</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>bgcolor</deegree:Name>

<deegree:Value>'#c1d3ed'</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>fgcolor</deegree:Name>

<deegree:Value>'#4D96DE'</deegree:Value>

</deegree:Parameter>

</deegree:ParameterList>

The name, given first, is used for clear identification of the module; 'layerlist', 'label' and 'bgcolor' are used identically as for the module 'legend' above. Since the list of layer is generated dynamically, the font color for the list has to be set.

    1. MapOverview

Description: The 'MapOverview' module provides an overview map at a set display resolution for the area of the entire context. MapOverview can be provided by a map server dynamically or simply by a georeferenced map graphic. Besides a JavaScript-object having the same name as the module, another JavaScript file is required (wz_jsgraphics_box.js) that is used for painting the current box describing the current extent of visible map.

Init parameter:

<deegree:Module hidden="false" type="content" width="150" height="150"
scrolling="no">

<deegree:Name>MapOverview</deegree:Name>

<deegree:Content>mapoverview.html</deegree:Content>

<deegree:ModuleJS>mapoverview.js</deegree:ModuleJS>

<deegree:ModuleJS>wz_jsgraphics_box.js</deegree:ModuleJS>

<deegree:ParameterList>

<deegree:Parameter>

<deegree:Name>src</deegree:Name>

<deegree:Value>'./images/overview.gif'</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>minx</deegree:Name>

<deegree:Value>2570000</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>miny</deegree:Name>

<deegree:Value>5668000</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>maxx</deegree:Name>

<deegree:Value>2593000</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>maxy</deegree:Name>

<deegree:Value>5691000</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>foregroundColor</deegree:Name>

<deegree:Value>'#ff0000'</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>width</deegree:Name>

<deegree:Value>150</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>height</deegree:Name>

<deegree:Value>150</deegree:Value>

</deegree:Parameter>

</deegree:ParameterList>

</deegree:Module>

The parameter 'src' describes the source of the map overview presentation. A reference to a file as well as a GetMap-Request referring to a specific Web Map Service is permitted. The parameters 'minx', 'miny', 'maxx' and 'maxy' define the bounding box of the map overview. 'foregroundColor' controls the color of the painted box showing the extent of the actual mapview. 'width' and 'height' determine the size of the map overview in pixels.

    1. Toolbar

Description: Above the map window is a tool bar for navigating the map in different ways: ZoomIn, ZoomOut, ZoomToLayer, go back to initial bounding box, recenter the map, drag the map. Also buttons for adding additional WMS to the portal and for creating a print pre-view are available. The amount, sequence and position of the visible buttons as well as their tool tips are controlled by the init parameters. Button parameter name

Init parameters:

<deegree:ParameterList>

<deegree:Parameter>

<deegree:Name>refresh|refresh map</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>movetoprevious|move to previous map</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>movetonext|next to previous map</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>zoomin|zoomin by mouse click or mouse drag</deegree:Name>

<deegree:Value>ToggleButton</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>zoomout|zoomout by mouse click</deegree:Name>

<deegree:Value>ToggleButton</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>zoom2layer|zoomtolayer by mouse click</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>fullextent|zoom to full extent</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>recenter|recenter the map by mouse click</deegree:Name>

<deegree:Value>ToggleButton</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>
move|drag the map by mouse with pressed mouse button
</deegree:Name>

<deegree:Value>ToggleButton</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>
featureinfo|get info to a object within the map
</deegree:Name>

<deegree:Value>ToggleButton</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>addwms|add additonal WMS to the map</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

<!-- for printing choose EITHER "plain print" OR "pdf print" method -->

<!-- PLAIN PRINT -->

<deegree:Parameter>

<deegree:Name>print|generate print view</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

<!-- PDF PRINT -->

<deegree:Parameter>

<deegree:Name>pdfprint|generate pdf</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

<!-- please delete the printing method that is not used

<deegree:Parameter>

<deegree:Name>download|download WFS data</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>selected</deegree:Name>

<deegree:Value>zoomin</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>bgcolor</deegree:Name>

<deegree:Value>'#e0e9f9'</deegree:Value>

</deegree:Parameter>

</deegree:ParameterList>

Apart from the last two parameters – one controls the tool that is activated after initialising the portal (selected); the other one defines the background color of the tool bar – all others are defining a whole set of useful buttons. There are two kinds of buttons: 'PushButton' and 'ToggleButton'. The first returns to its initial condition after being pressed (similar to the Ok-button in a dialog); 'ToggleButton' stays switched on (or off) after clicking and activates a certain tool.

ToggleButtons are 'zoomin', 'zoomout',, 'recenter', 'move' and 'featureinfo'. PushButtons are 'refresh', 'movetoprevious', 'movetonext', 'zoom2layer', 'fullextent', 'addwms', 'print', 'pdfprint', 'download'.

All init parameters, linked to an action/button, have a name consisting of two elements which are divided by '|'. The first one describes the name of the function for the according button. Currently deegree iGeoPortal comprises the following functions:

The functions zoom2layer, addWMS, print, pdfprint, fullscreen and download are configured using separate HTML-files described in the following sub-sections.

The layout of the buttons is defined by two graphic files that have to fulfil the naming convention and have to be placed in the appropriate directory $iGeoPortal_home$/images:

Example:

The first file represents the button in inactivate state; the second in its activated one. The file names are case sensitive! In order to change the layout of the buttons, you just have to exchange these 2 graphic files.

      1. Zoom2Layer

The function zoom2Layer depends on the two files recentertolayer.html and recentertolayer.js in $iGeoPortal_home$ on the client side and the class org.deegree.portal.standard.wms.control.RecenterToLayerListener on the server side. In order to use this function a single layer has to be selected from the layer list (by clicking the layer name).

The mechanism is as follows: if the selected layer has a LatLonBBox (WMS Capabilities), but no ScaleHint, then the zoom goes to LatLonBBox. If the layer has both LatLonBBox and ScaleHint, it is first checked, if the scale hint reduces the size of the bounding box. If so, the reduced bbox is taken for zoom in. Otherwise, the original LatLonBBox is used to zoom in.

      1. AddWMS

Via mouse click on 'addWMS', a dialog is opened for adding additional WMS instances: Either by typing the entire URL or by selecting a preconfigured entry. A list of preconfigured WMS instances can be predefined by the administrator in $iGeoPortal_home$/addwms.html.

...

<td width="30">&nbsp;</td>

<td width="90">known WMS: </td>

<td width="*">

<select id="knownwms" onchange="change()">

<option value="http://">select ...</option>

<option value="http://demo.deegree.org/deegree-wms/services">deegree demo WMS</option>

<option value="http://localhost:8080/deegree-wms/services">local deegree WMS</option>

</select>

</td>

...

By editing the select-block of the HTML document, the administrator is able to manipulate the preconfigured services.

      1. Printing

By activating the print-button, the portal generates a representation of the actual map extent in a higher resolution to get high quality printings. By manipulating the parameters in $iGeoPortal_home$/printviewopener.html, the administrator can adapt size and quality of the printouts.

iGeoPortal communicates with the according server components via Remote Procedure Calls (RPCs). They contain the name of the function and potential parameters. In printviewopener.html you can find the JavaScript-function 'getRPCValues()' that provides the appropriate RPC for creating the print preview.

...

var s = "<?xml version='1.0' encoding='UTF-8'?><methodCall>" +

"<methodName>mapView:print</methodName><params>" +

"<param><value><struct>" +

"<member><name>paperFormat</name><value><string>A4</string></value></member>" +

"<member><name>resolution</name><value><string>150</string></value></member>" +

"<member><name>orientation</name><value><string>hoch</string></value></member>"+

"<member><name>format</name><value><string>jpeg</string></value></member>" +

"</struct></value></param>" +

...

The print preview is opened in a new window. Its contents may be adapted by changing the file $iGeoPortal_home$/printview.jsp. The map view is displayed with a lower resolution on screen than what is used for printing. The scaling might be adjusted by changing the style values for img.map width.

<style type="text/css">

@media print {

img.map {

width: 600; /* might need to be adjusted */

}

}

</style>

      1. PDFPrinting

Since: v2.2

Description: The PDF printing module uses jasper templates (iReport) to create a PDF file for the current map on the basis of predefined templates. The module comes with two templates, portrait and landscape, but the administrator of iGeoPortal may add further templates, or edit the existing ones if need be. This of course requires some experience with Jasper reports and iReport.

WebMapContext: As the pdfprint module is integrated into the toolbar, the toolbar module needs the "pdfprint" entry:

<!-- PDF PRINT -->

<deegree:Parameter>

<deegree:Name>pdfprint|generate pdf</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

controller.xml: This server side module requires one listener, with a large number of self explaining init parameters.

<event name="mapView:pdfprint"
class="org.deegree.portal.standard.wms.control.SimplePrintListener"
next="modules/pdfprint/printresult.jsp"
alternativeNext="modules/pdfprint/printresult.jsp">

<parameter>

<name>WIDTH</name>

<value>500</value>

</parameter>

<parameter>

<name>HEIGHT</name>

<value>500</value>

</parameter>

<parameter>

<name>LEGENDWIDTH</name>

<value>300</value>

</parameter>

<parameter>

<name>LEGENDHEIGHT</name>

<value>1000</value>

</parameter>

<parameter>

<!-- folder where the generated pdf files are stored -->

<name>TEMPDIR</name>

<value>print</value>

</parameter>

<parameter>

<!-- optional parameter; defaults to: "WEB-INF/igeoportal/print" -->

<name>TEMPLATE_DIR</name>

<value>WEB-INF/conf/igeoportal/printtemplates</value>

</parameter>

</event>

Module pages: The following table describes all the files for user interaction in the pdf printing module.

File name

Content

printdialog.jsp

This page is called from the toolbar module when hitting the pdfprint button. It enables switching between the different template forms and organizes the display of the correct tempalte image (see next two lines below).

printtemplate_1.jsp
printtemplate_2.jsp

JSP pages containing forms for the contents rquired by the respective template (1=portrait, 2=landscape)

images/template_1.jpg
images/template_2.jpg

Exemplary images for general layout of the selected template (1=portrait, 2=landscape)

printresult.jsp

This page is called from the server side after PDF creation is finished and endables the user to download the PDF.

Table 1: PDF print module in $iGeoPortal_home$/modules/pdfprint/

Jasper templates: The jasper templates are stored within the WEB-INF folder of the webapp as they should not be accessible by the portals users directly.

File name

Content

template_1.jasper
template_1.jrxml

The Jasper template for portrait (jasper=compiled).

template_2.jasper
template_2.jrxml

The Jasper template for landscape (jasper=compiled).

Table 2: Jasper templates for PDF print module in $iGeoPortal_home$/WEB-INF/conf/igeoportal/printtemplates/

If you would want to change the contents or the layout of the PDF result (other than a different map area or scale) you would need to adjust one of the existing templates, or create a new one. But don't forget that you would also need to add/edit the module pages, as they contain the forms to collect the user input for many of the placeholders of the jasper templates. If you add new form fields with different kind of content, you would need to make server side adjustments/extensions as well. Check the SimplePrintListener in package org.deegree.portal.standard.wms.control for details.

Please refer to wmc_testPlayground.xml or wmc_testPdfPrint.xml for testing.

      1. FullScreen

Since: v2.2

Description: This module enables to easily switch to a larger map, by hiding both East and West areas (see Figure 3) from the portal. The Map area will change in width only. The displayed section of the map will change as follows: From "normal" view to "full screen" view the width of the displayed area stays the same. But as the available area increases, this automatically causes a zoom in and thus a change in scale. From "full screen" back to "normal" view, the map gets switched back to the original scale and bbox (if the user has not changed the selected map segment by mooving or zooming in/out, while in full screen mode).

WebMapContext: As the FullScreen module is integrated into the toolbar, the toolbar module needs the "fullScreen" entry:

<deegree:Parameter>

<deegree:Name>fullScreen|shows a full screen</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

controller.xml: This module requires one listener without any init parameters.

<event name="mapClient:fullScreen"
class="org.deegree.portal.standard.context.control.FullScreenListener"
next="container.jsp" alternativeNext="container.jsp"/>

frontend.xsl: The module needs a new hidden form which is used to switch between normal screen and full screen.

<!-- new form is used to switch from NormalScreen to FullScreen and vice versa -->

<form action="control" id="scaleScreen" name="test" method="post">

<input type="hidden" id="hiddenScaleScreen" name="rpc" value=""/>

</form>

viewcontext.xsl: The module needs to be referenced in the toolbar section of the actionPerformed() method.

<xsl:if test="starts-with( ./deegree:Name, 'fullScreen' )">

switchScreen("mapClient:fullScreen");

</xsl:if>

<xsl:if test="starts-with( ./deegree:Name, 'normalScreen' )">

switchScreen("mapClient:normalScreen");

</xsl:if>

Further, it needs a new function that calles the java script object of this module.

function switchScreen( methodName ) {

var req = new ScreenSwitcher().switchToFullScreen( methodName );

document.getElementById( 'hiddenScaleScreen' ).value = req;

document.getElementById( 'scaleScreen' ).submit();

}

screenswitcher.js: This file contains the actual call of the server side, where the portal gets stripped from its east and west areas (or where they are added back on again).

Please refer to wmc_testPlayground.xml or wmc_testFullScreen.xml for testing.

      1. Download for WFS data

Since: v2.3 (bug fixes in v2.4)

Description: This module enables the portal user to download vector data for WFS based WMS layers. Only the data currently visible in the mapview will be made available for download. The user will be informed by email where she can download the data. This is to ensure that the portal does not get blocked while the data is being collected and ziped. Therefore, the user needs to either provide her email address or to log in (then her email address is taken from the users session and the connected security components).

The download module consist of two different parts: The client to request the data, and the servlet providing the means for the actual download. Both parts need to be configured properly.

WebMapContext: First of all, the toolbar module needs the "download" entry:

<deegree:Parameter>

<deegree:Name>download|download WFS data</deegree:Name>

<deegree:Value>PushButton</deegree:Value>

</deegree:Parameter>

Secondly, the General/Extension/IOSettings need to contain the download directory. The name provides the path to the physical location on the mashine, while the access entry provides the base URL of the online resource for downloading.

<deegree:DownloadDirectory>

<deegree:Name>../../downloads</deegree:Name>

<deegree:Access>
<OnlineResource xlink:type="simple"
xlink:href="http://localhost:8080/igeoportal-std" />
</deegree:Access>
</deegree:DownloadDirectory>

controller.xml: Two Listeners and their respective init params need to be set. For <event name="mapView:initDownload"> there are five optional parameters. The first four are necessary, if the portal is used together with the deegree security components (U3R). Then the database driver, URL, username and password need to be provided:

<parameter>

<name>driver</name>

<value>org.postgresql.Driver</value>

</parameter>

<parameter>

<name>url</name>

<value>jdbc:postgresql://localhost:5432/your_users_rights_security_db</value>

</parameter>

<parameter>

<name>user</name>

<value>postgres</value>

</parameter>

<parameter>

<name>password</name>

<value></value>

</parameter>

The fifth parameter may be set to specify which download formats shall be supported. If this parameter is ommitted, then SHP (shape file) will be the only returned format. Supported formats are: SHP, GML. Multiple formats are separated with a colon:

<parameter>

<name>DOWNLOAD_FORMAT</name>

<value>SHP,GML</value>

</parameter>

For <event name="mapView:downloadFeatures" ..> there are two optional init parameters. The first is used as default value for WFS/DefaultMaxFeatures. This value is used, if a WFS does not provide this info in its capabilities. If not specified here, then the default value is 0.

<parameter>

<name>DEFAULT_MAX_FEATURES</name>

<value>10</value>

</parameter>

The second parameter is a boolean (either true or false). If TEST_MAX_HITS is true, then a featuretype is not provided for download, when the number of requested features exceeds the number of features a WFS is able to provide. The default value is false.

<parameter>

<name>TEST_MAX_HITS</name>

<value>false</value>

</parameter>

web.xml: It is necessary to provide a special servlet for the process of downloading the data (after the user received an email):

<servlet>

<servlet-name>Download</servlet-name>

<servlet-class>org.deegree.enterprise.servlet.DownloadServlet</servlet-class>

<init-param>

<param-name>DOWNLOAD_DIR</param-name>

<param-value>./WEB-INF/downloads/</param-value>

</init-param>

<init-param>

<param-name>ALLOWED_IP_ADDRESS</param-name>

<param-value>127.0.0.1</param-value>

</init-param>

</servlet>

It is very important to make sure that DOWNLOAD_DIR corresponds to the folder given in the WMC configuration in the section: General / Extension / IOSettings. The second parameter ALLOWED_IP_ADDRESS may be used to restrict downloads to a certain IP-Address. If ALLOWED_IP_ADDRESS is omitted, any IP-Address will be accepted.

Please refer to wmc_testSecurity.xml for testing.

    1. MapView

Description: The module 'MapView' contains the central map view of the portal. Attention: Some JavaScript files are linked to this module.

<deegree:ModuleJS>mapview.js</deegree:ModuleJS>

<deegree:ModuleJS>mapcontroller.js</deegree:ModuleJS>

<deegree:ModuleJS>mapmodel.js</deegree:ModuleJS>

<deegree:ModuleJS>wmsrequestfactory.js</deegree:ModuleJS>

<deegree:ModuleJS>wmslayer.js</deegree:ModuleJS>

The module is responsible for the representation of the map as well as for the acceptance of map oriented mouse events. GetMap-, GetFeatureInfo- and GetLegend- requests for the active layer are also created by this module.

Init parameter:

<deegree:ParameterList>

<deegree:Parameter>

<deegree:Name>model</deegree:Name>

<deegree:Value>this.mapModel</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>border</deegree:Name>

<deegree:Value>0</deegree:Value>

</deegree:Parameter>

</deegree:ParameterList>

Merely two parameters are transferred to the module: The first one associates a JavaScript-Object with the module describing the model of the map view (with layer, size, etc.). Basically, it is possible to manage more than one map, where each one is connected with a different map model. The second parameter 'border' could define the thickness of a border painted around the map, but currently this is not implemented yet.

    1. Digitizer

Since: v2.2

Description: With iGeoPortal you are not only able to visualize, navigate and evaluate spatial data, you are also able to digitize own data online and transfer it via WFS-T (e.g. deegree WFS) into a data backend like PostgreSQL/POSTGIS. The digitized data will even be validated to avoid corrupt data insert (e.g. self intersects of polygons will not be accepted; error massage when digitizing polygons in clockwise direction instead of counter clockwise direction, ...).

You find a little appetizer map context with iGeoPortal demo. To see it in action you can either switch to "Salt Lake City" and then to the "Playground" context or you can edit the "Utah" context (wmc_start_utah.xml) in the module context switcher and comment out the element with only 2 contexts (default) and uncomment the one with the many test map contexts. See chapter 4.2 for details.

Afterwards you can switch to either Playground or TestDigitizer context and play around a bit.

In the on line demo, you can digitize a feature, do the WFS insert transaction and view the inserted feature in the map.

With your own installation from the deegree download pages the behaviour is different: by default, the WFS transaction will be aborted. If you would like to test the digitizing module completely, you need to (1) configure a WFS for the digitized features and (2) also adapt a few things in the digitizer module itself.

      1. Setting up the WFS feature type

Description: First of all, check the WFS documentation for general information on WFS installation and configuration. Then, add a new featuretype to your WFS called "DigitizeFeatures".

To do so, you need to first set up a database for all the features your users will be digitizing. Execute the batch or shell script create_digitizer_table_postgis.[bat|sh] in WEB-INF/scripts/[batch|shell]/. This script will execute the sql command as given in WEB-INF/scripts/sql/create_digitizer_table_postgis.sql. All these files might need to be configured to your system's needs. (In case you want to use Oracle, you may use the postgis scripts as a reference.)

Then, you need a featuretype definition for this new WFS featuretype. Copy the file DigitizeFeatures.xsd from WEB-INF/conf/wfs/featuretypes/example_featuretypes/digitize/ to the folder WEB-INF/conf/wfs/featuretypes/. Check the <JDBCConnection> and adjust it to your system.

Restart your tomcat and check the WFS capabilities to see if all went well. Make sure, there are no errors in the tomcat logs. Fix all errors. They occure because of configurational problems. If everything runs smoothly, you may continue with the next step.

      1. Setting up the WMS layer

Description: First of all, check the WMS documentation for general information on WMS installation and configuration. Then add a new layer to your WMS called "DigitizeFeatures".

To do so, you need to comment in the section on DigitizeFeatures in WEB-INF/conf/wms/wms_configuration.xml. Then you need to decide whether you want to use a LOCALWFS or a REMOTEWFS as datasource. If you prefer the preconfigured LOCALWFS, then you will need to make available the featuretype DigitizeFeatures to your LOCALWFS as well. Simply copy the file DigitizeFeatures.xsd from WEB-INF/conf/wms/featuretypes/postgis_featuretypedefinitions/ to the folder WEB-INF/conf/wfs/featuretypes/. Check the <JDBCConnection> and adjust it to your system (same as above).

Restart your tomcat and check the WMS capabilities to see if all went well. Make sure, there are no errors in the tomcat logs. Fix all errors. They occure because of configurational problems. If everything runs smoothly, you may continue with the next step.

      1. Adapting the digitizer module

Each map context containing the module configuration for digitizer module, needs to be adapted to your local needs. The WFS address needs to be set to your WFS instance. See the above chapter for details.

All other configuration parameters of the digitizer module will be explained in more detail, soon. Some short hints can be found in the module configuration of the web map contexts.

Furthermore, you need to activate sending the insert-request to the WFS. The file modules/digitizer/digitizer_window.jsp contains a function sendRequest(), where a few changes need to be made. Just search for "TODO", and follow the instructions.

You would probably also want to increase the zoom factor of the digitizer map. Please search for "TODO" in the file modules/digitizer/digitizermodule.js and, again, follow the instructions.

Please note: as long as you don't have a properly configured WFS up and running, including the configuration of your feature type for digitizing, you will run into an error message when testing this module.

    1. Gazetteer Client

Another available module is the gazetteer client module. It is integrated in the wmc_testPlayground.xml as well as in the wmc_testGazClient.xml context. Using this module, the user can search for features. It comes already preconfigured with iGeoPortal standard, so that it can be used to search for counties, municipalities and zipcodes by sending WFS queries to the WFS service.

This module is no out-of-the-box module. It needs special adjustments for each group of feature types within a Gazetteer-WFS, depending on what you wish to search for and how you like to display the results. Therefore, each gazetteer client module is different.

      1. Configuration of Module in Web Map Context

The module is pre-configured in the web map context wmc_testGazClient.xml. This gazetteer client module contains three different search examples. The first example (gaz_a) searches for counties and their municipalities by using two drop down boxes, the second and third example (gaz_b and gaz_c) are free text search examples, where the user may search for Municipalities or Zip Codes.

<deegree:Module hidden="false" type="content" height="50" scrolling="no">

<deegree:Name>GazModule</deegree:Name>

<deegree:Content>modules/gazetteer/gazmodule.html</deegree:Content>

<deegree:ModuleJS>modules/gazetteer/gazmodule.js</deegree:ModuleJS>

<deegree:ParameterList>

<!-- gaz_a.jsp: county - municipality (using two drop down boxes) -->

<deegree:Parameter>

<deegree:Name>countyTemplate</deegree:Name>

<deegree:Value>
'WEB-INF/conf/igeoportal/querytemplates/a_county_query.xml'
</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>countyMapTemplate</deegree:Name>

<deegree:Value>
'WEB-INF/conf/igeoportal/querytemplates/a_countyMap_query.xml'
</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>municipalityTemplate</deegree:Name>

<deegree:Value>
'WEB-INF/conf/igeoportal/querytemplates/a_municipality_query.xml'
</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>municipalityMapTemplate</deegree:Name>

<deegree:Value>
'WEB-INF/conf/igeoportal/querytemplates/a_municipalityMap_query.xml'
</deegree:Value>

</deegree:Parameter>

<!-- gaz_b.jsp: using free search -->

<deegree:Parameter>

<deegree:Name>FreeSearchTemplate</deegree:Name>

<deegree:Value>
'WEB-INF/conf/igeoportal/querytemplates/b_freesearch_query.xml'
</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>FreeSearchMapTemplate</deegree:Name>

<deegree:Value>
'WEB-INF/conf/igeoportal/querytemplates/b_freesearchMap_query.xml'
</deegree:Value>

</deegree:Parameter>

<!-- gaz_c.jsp: using free search -->

<deegree:Parameter>

<deegree:Name>FreeSearch2Template</deegree:Name>

<deegree:Value>
'WEB-INF/conf/igeoportal/querytemplates/c_freesearch_query.xml'
</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>FreeSearch2MapTemplate</deegree:Name>

<deegree:Value>
'WEB-INF/conf/igeoportal/querytemplates/c_freesearchMap_query.xml'
</deegree:Value>

</deegree:Parameter>

<!-- WFS addresses (optional) -->

<!--

<deegree:Parameter>

<deegree:Name>WFS:countyTemplate<deegree:/Name>

<deegree:Value>'http://somewhere:8080/county-wfs/<deegree:/Value>

</deegree:Parameter>

-->

<!-- default WFS address -->

<deegree:Parameter>

<deegree:Name>WFS</deegree:Name>

<deegree:Value>
'http://demo.deegree.org/deegree-wfs/services'
</deegree:Value>

</deegree:Parameter>

</deegree:ParameterList>

</deegree:Module>


Each feature type needs two different query templates. The first query is used to search for matching features (xxxTemplate), while the second query is used to get the geometry for a single selected feature (xxxMapTemplate). The geometry is then used for zooming to the users selection.

Example for gaz_a: The parameter countyTemplate contains a path to the query template for all Utah counties, while the parameter countyMapTemplate contains the path to a query stub for the map (or rather the geometry) of one specific county.

Finally, an address for the Web Feature Service needs to be specified which is providing the feature types of the respective queries. Since different feature types might be provided by different web feature services, it is possible to define a different WFS for each single query template. The parameter name needs to be specified as WFS:xxxTemplate (e.g "WFS:countyTemplate"). If a number of feature types is served by a single WFS, this WFS can be used as default by simply using "WFS" as parameter name (without appending the ":xxxTemplate"). This parameter WFS contains the address of the default WFS service.

All the preinstalled query templates mentioned in the module configuration of the web map context are located within the WEB-INF folder of the webapp: $iGeoPortal_home$/WEB-INF/conf/igeoportal/querytemplates/

File name

Content

a_county_query.xml
a_countyMap_query.xml

a_municipality_query.xml
a_municipalityMap_query.xml

Search for counties
(and their geometry)

search for the county's municipalities
(and their geometry)

b_freesearch_query.xml
b_freesearchMap_query.xml

Free search for municipalities
(and their geometry)

c_freesearch_query.xml
c_freesearchMap_query.xml

Free search for zip codes
(and their geometry)

Table 3: Gazetteer module query templates

      1. Module Structure

The gazetteer module folder ($iGeoPortal_home$/modules/gazetteer) contains several configuration files, which will be explained here.

File name

Content

gazmodule.html


gazmodule_mw.html

This is the start/initialization page of the module, if you want the gazetteer module to open up in a new window.

This is the start/initialization page of the module, if you want the gazetteer module to be part of the main portal ("mw" is for "main window").

You need to reference only one of these two files in the module configuration of each web map context.

gazmodule.js

The javascript for the html start page.

gazwindow.jsp

The gazetteer module main window. This file is only needed in connection with gazmodule.html. The gazetteer module with open up in a new window, the contents are taken from this file.

gaz_a.jsp
gaz_b.jsp
gaz_c.jsp
gaz_d.jsp
gaz_a_county.jsp
gaz_a_municipality.jsp
gaz_FreeSearchResult.jsp
gaz_d_zipcodes.jsp

These are all the display pages that contain text boxes/ drop down lists that are used to navigate different features of the Gaz-WFS

gaz_if.jsp

Decides which of the above mentioned pages should be used to navigate a feature

gaz_take.jsp

After selecting a certain geometry type of a feature, this class causes the MapView to navigate to the selected geometry

featuretype2property.properties

Provide a possibility to use different properties for zooming and for displaying.

Table 4: Gazetteer module configuration files

      1. Adding a new feature search

What we have in the preconfigured module is a drop down box navigation for the Counties and Municipalities as well as free text search for municipalities and zipcodes. We will have a detailed example on how to add a new search, which can for example be: zipcodes navigation. The example will contain one text box the zipcodes list. Upon choosing a zipcode the iGeoPortal shall navigate to the selected zipcode on the map.

Since there are already existing classes for different searches we use one of them as a basis instead of writing classes from scratch.

        1. Configuring new query templates in Web Map Context

First of all we need a query template and a map query template. We can make copies of a_county_query.xml and a_countyMap_query.xml from the folder WEB-INF/conf/igeoportal/querytemplates/ and rename them to d_zipcodes_query.xml and d_zipcodesMap_query.xml respectively. We will need to reference these templates in our WebMapContext as follows:

<!-- gaz_d.jsp: using single drop down box for zipcodes
<
deegree:Parameter>

<deegree:Name>zipcodesTemplate</deegree:Name>

<deegree:Value>
'WEB-INF/conf/igeoportal/querytemplates/d_zipcodes_query.xml'
</deegree:Value>

</deegree:Parameter>

<deegree:Parameter>

<deegree:Name>zipcodesMapTemplate</deegree:Name>

<deegree:Value>
'WEB-INF/conf/igeoportal/querytemplates/d_zipcodesMap_query.xml'

</deegree:Value>

</deegree:Parameter>

Next, we will need to change the content of these two new files. We know that we want to query zipcodes, but we don't really know:

To solve the first problem we make a simple WFS GetCapabilities request and navigate through the FeatureTypeList element to find out that the feature name is app:ZipCodes

As for the second problem we execute an http DescribeFeature request against the WFS service as follows:

http://demo.deegree.org/deegree-wfs/services?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&NAMESPACE=xmlns(app=http://www.deegree.org/app)&TYPENAME=app:ZipCodes

Which delivers an xsd schema with the available feature types and we will query for “zip” which should include the zipcodes and as for the geometry to query it will be the element “geometry” which is of type gml:GeometryPropertyType.

With these information we can now change the two query templates accordingly as follows:

d_zipcodes_query.xml:

<?xml version="1.0" encoding="UTF-8"?>

<wfs:GetFeature

version="1.1.0"

outputFormat="text/xml; subtype=gml/3.1.1"

xmlns:app="http://www.deegree.org/app"

xmlns:gml="http://www.opengis.net/gml"

xmlns:ogc="http://www.opengis.net/ogc"

xmlns:wfs="http://www.opengis.net/wfs"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">

<wfs:Query typeName="app:ZipCodes">

<ogc:Filter>

<ogc:PropertyIsLike wildCard='%' singleChar='?' escapeChar='!'>

<ogc:PropertyName>app:zip</ogc:PropertyName>

<ogc:Literal>%$IDENTIFIER%</ogc:Literal>

</ogc:PropertyIsLike>

</ogc:Filter>

<ogc:SortBy>

<ogc:SortProperty>

<ogc:PropertyName>app:zip</ogc:PropertyName>

<ogc:SortOrder>ASC</ogc:SortOrder>

</ogc:SortProperty>

</ogc:SortBy>

</wfs:Query>

</wfs:GetFeature>

and d_zipcodesMap_query.xml:

<?xml version="1.0" encoding="UTF-8"?>

<wfs:GetFeature

version="1.1.0"

outputFormat="text/xml; subtype=gml/3.1.1"

xmlns:app="http://www.deegree.org/app"

xmlns:gml="http://www.opengis.net/gml"

xmlns:ogc="http://www.opengis.net/ogc"

xmlns:wfs="http://www.opengis.net/wfs"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">

<wfs:Query typeName="app:ZipCodes">

<wfs:PropertyName>app:zip</wfs:PropertyName>

<wfs:PropertyName>app:geometry</wfs:PropertyName>

<ogc:Filter>

<ogc:PropertyIsEqualTo>

<ogc:PropertyName>app:zip</ogc:PropertyName>

<ogc:Literal>$IDENTIFIER</ogc:Literal>

</ogc:PropertyIsEqualTo>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

The next step now is to ensure that these two query tempaltes can be selected and used on the client side (by the portal user).

        1. Client side code to enable search for a new feature

Here again we will somehow repeate what we did above by using other existing files as basis. In the folder $iGeoPortal_home$/modules/gazetteer/ make copies of gaz_a_county.jsp and gaz_a.jsp and rename them to gaz_d_zipcodes.jsp and gaz_d.jsp respectively.

Now we will explain how to change the contents of each document.

gaz_d_zipcodes.jsp

  1. In a nested for loop, there is the line:

    QualifiedName geoIdProp = new QualifiedName( "geographicIdentifier", fps[j].getName().getNamespace() );

    Change the string "geographicIdentifier" to "zip"

gaz_d.jsp

  1. In the function getList(), change the snippet:

    if ( featureType == 'app:Counties' ) {

clearList("countyID");

clearList("municipalityID");

}

to

if ( featureType == 'app:ZipCodes' ) {

clearList("zipcodesID");

}

    Also change the string 'Searching for counties...' to 'ZipCodes search...'

  1. The function “selectCounty” could be deleted.

  2. In the function “take”, you will find the following “if condition”:

if ( "app:Counties" == type ) {

template = "countyMapTemplate";

} else if ( "app:Municipalities" == type ) {

template = "municipalityMapTemplate";

}

    Add to it the following condition:

else if ( "app:ZipCodes" == type ) {

template = "zipcodesMapTemplate";

}

  1. Change the onload function attribute of the body as follows:

onload="getList('GazModule', 'app:ZipCodes', 'zipcodesTemplate');"

  1. In the first table, make the label inside a cell Municipalities to ZipCodes

    Also in the first table inside the “select” tag change the “onchange” function attribute to:

onchange="selectFinal( this, 'app:ZipCodes' );"

  1. You can comment out the second table or delete it.

gazwindow.jsp

  1. In the “select” element add the following “option” to reference the zipcodes page

<option value="gaz_d.jsp">ZipCodes</option>

gaz_if.jsp

  1. In the function build list, add the following if condition to the list of distinctions

<%

} else if ( "ZipCodes".equals( featureTypeName ) ) {

%>

<jsp:include page="gaz_d_zipcodes.jsp" flush="true" />

<%

}

%>

By this distinction, all ZipCodes will be handled using the given jsp page.

      1. Conclusion

The gazetteer module is used for searching feature types. As we explained above, its possible to add new feature search to the module. The example explained above is actually included in the gazetteer module as a reference if you are facing troubles understanding the adding feature search procedure. You have of course to make sure that the queried feature and feature types are offered by the WFS service, against which the requests are sent.

    1. CSW-Client

Description: The CSW-Client module enables a user of iGeoPortal to send queries to an OGC-compliant Catalogue Service and to save the results in Web Map Context files. The module supports catalogues implementing the CS-W 2.0.2 ISO 19115/19119 Application profile in version 1.0. This module is “optional” in that it is not part of standard web map context.

As this module implements some complex functionality its configuration is also more complex than for the average iGeoPortal module. First, the module has to be referred to, the layout of the portal has to be adjusted and finally the module itself has to be configured. All of these steps will be described in the following sections.

The iGeoPortal demo package includes a web map context configured for CS-W usage. When using this sample context it is only necessary to adjust the parameters defined in section 4.13.1. If you are interested in how the CSW-Client module can be integrated in an existing iGeoPortal instance, consider reading section 4.13.2.

The required .html, .jsp and .js files are located at $iGeoPortal_home$/modules/csw. XSLT-transformation scripts are located at $iGeoPortal _home$/WEB-INF/conf/igeoportal/csw.

For this demo of iGeoPortal v2.3 the CSW-client is not out the box configured.

      1. Configuration of Web Map Context

        1. Parameter maxRecords

The parameter maxRecords defines how many hits of a query to a CSW-Service are processed. Using this parameter, the length of the resulting list of a query can be influenced.

<deegree:Parameter>

<!-- only this parameter is optional. default is 10. -->

<deegree:Name>maxRecords</deegree:Name>

<deegree:Value>10</deegree:Value>

</deegree:Parameter>

The parameter is optional. The default value is 10, which matches the default value of the corresponding OGC specification. If the parameter is omitted, the default value is used. If a different value is provided, it will be used instead.

        1. Parameter Profiles

This is in fact a group of parameters using the same prefix (“Profiles.”). At least one parameter with this prefix is mandatory. Allowed suffixes are “ISO 19115” and “OGCCORE”, although only “ISO 19115” is currently supported by iGeoPortal.

<deegree:Parameter>

<deegree:Name>Profiles.ISO19115</deegree:Name>

<deegree:Value>

'brief|metaList2html.xsl;full|metaContent2html.xsl'

</deegree:Value>

</deegree:Parameter>

The value of the parameter includes a list of value pairs consisting of an identifier, a separation marker ( „|“ ) and the name of an XSL-transformation file.

The identifier refers to the ElementSetName parameter of a GetRecords request to a CS-W. Allowed values are „brief“, „summary“ and „full“, although „summary“ is not supported so far.

The identifier “brief” refers to a transformation file (metaList2html.xsl) that creates a list of results from a GetRecordsResponse. The identifier “full” refers to a transformation file (metaContent2html.xsl) that transforms a full metadata record set from the results of a complete query (GetRecordByIdResponse).

Details of the transformation files are described in sections 4.13.2.5 and 4.13.1.9.

        1. Parameter Catalogues

The parameter “Catalogues” defines which CSW-instance should be queried by the iGeoPortal CSW-Client module. It is mandatory to provide at least one catalogue service.

<deegree:Parameter>

<deegree:Name>Catalogues</deegree:Name>

<deegree:Value>

'CATA1|http://localhost:8085/deegree/services;
TEST|http://localhost:8085/deegree/test/catalogue'

</deegree:Value>

</deegree:Parameter>

The parameter value includes a list of pairs of identifiers (name of the catalogue service) delimited by the corresponding URL using “|”.

        1. Parameter Protocols

This parameter defines with which protocol the catalogues can be accessed. Allowed values are “POST” and “SOAP”. If both values are provided for a catalogue, “SOAP” is used.

The parameter “Protocols” is mandatory, it must be declared in the configuration for each catalogue defined by the “Catalogues“-parameter (section 4.13.1.3).

<deegree:Parameter>

<deegree:Name>Protocols</deegree:Name>

<deegree:Value>'CATA1|POST;TEST|POST,SOAP'</deegree:Value>

</deegree:Parameter>

The parameter value contains a list of value pairs separated by semicolons. The value pairs consist of an identifier (name of the catalogue) followed by a delimiter (“|”) and a comma separated list of supported protocols.

        1. Parameter Formats

The parameter "Formats" defines which catalogue understand and supports which format. Possible formats are "ISO 19115", "ISO 19119" and "OGCCORE".

The parameter is mandatory, at least one format type must be provided for each catalogue defined by "Catalogues" (section 4.13.1.3).

<deegree:Parameter>

<deegree:Name>Formats</deegree:Name>

<deegree:Value>'CATA1|ISO19115;TEST|ISO19119'</deegree:Value>

</deegree:Parameter>

The parameter value consists of a list of value-pairs separated by semicolons. The value pairs consist of an identifier (name of the catalogue) followed by a delimiter ("|") and a comma separated list of possible formats.

        1. Parameter mapContextTemplate

The parameter "mapContextTemplate" is only needed in case the Shopping Cart is used. Otherwise it could be deleted or commented out.

It defines which file is used as template of user specific Web Map Context documents. The file is located inside $iGeoPortal_home$ at the location defined by this parameter. This parameter is mandatory.

<deegree:Parameter>

<deegree:Name>mapContextTemplate</deegree:Name>

<deegree:Value>

'WEB-INF/conf/igeoportal/users/mapContextTemplate.xml'

</deegree:Value>

</deegree:Parameter>

It is recommended to use a copy of an existing Web Map Context file and deleting the content of its <LayerList> element (see following example).

<?xml version="1.0" encoding="UTF-8"?>

<ViewContext xmlns="http://www.opengis.net/context"
xmlns:sld="http://www.opengis.net/sld"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0.0" id="String">

<General>

...

<!-- the same as always -->

...

</General>

<LayerList>


<!-- empty space for new user layers -->


</LayerList>

</ViewContext>

In case a user that is logged onto the system has (at least) one metadata set added to his shopping cart, he is allowed to save the list of layers and display it in the portal (if all chosen datasets are accessible via WMS). All of these datasets are added to the declared template and saved in the directory of the user.

        1. Parameter namespaceBindings

The parameter "namespaceBindings" is mandatory. It defines a list (semicolon separated) of all namespaces that are needed by the CSW client module.

<deegree:Parameter>

<deegree:Name>namespaceBindings</deegree:Name>

<deegree:Value>

'xmlns:csw=http://www.opengis.net/cat/csw;xmlns:iso19115=http://schemas.opengis.net/iso19115full;xmlns:iso19115brief=http://schemas.opengis.net/iso19115brief;xmlns:iso19119=http://schemas.opengis.net/iso19119;xmlns:smXML=http://metadata.dgiwg.org/smXML'

</deegree:Value>

</deegree:Parameter>

The list always includes the definition of xmlns:csw, as well as the namespaces of the used schemas ( ISO 19115 / OGCCORE ).

        1. Parameter XpathTo***

In this section a number of parameters are described that include a declaration of an XPath to a specific part of a csw:GetRecordResponse. These path expressions depend on the used schema (ISO 19115, ISO 19119, OGCCORE) and therefore it may be necessary to adjust them.

The path to be supplied is the end part of the metadata element.

<!-- The parameter value to be specified is represented by [thisPartOnly]
in the following line:

/csw:GetRecordsResponse/csw:SearchResults/[MetadataElement]/[thisPartOnly]
-->

For ISO 19115 this means that the path to the file identifier does not need to be referenced by using /csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata/gmd:fileIdentifier/gmd:CharacterString
but that the beginning part can be omitted. Only gmd:fileIdentifier/gmd:CharacterString has to be supplied.

This behaviour applies to all XPathTo*** parameters.

Inside the XPath expressions, all usual possibilities are allowed. An example can be seen for XPathToServiceAddress.

The parameter XPathToDataId defines the path to the unique identifier of the data metadataset.

<deegree:Parameter>

<deegree:Name>XPathToDataId</deegree:Name>

<deegree:Value>

'gmd:fileIdentifier/gco:CharacterString'

</deegree:Value>

</deegree:Parameter>

The parameter XPathToDataTitle defines the path to the title of the data metadataset, if the query is executed using ElementSetName=“brief“.

<deegree:Parameter>

<deegree:Name>XPathToDataTitle</deegree:Name>

<deegree:Value>

'gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString''

</deegree:Value>

</deegree:Parameter>

The parameter XPathToServiceId supplies the path to the unique identifier of the service metadataset.

<deegree:Parameter>

<deegree:Name>XPathToServiceId</deegree:Name>

<deegree:Value>

'gmd:fileIdentifier/gco:CharacterString'

</deegree:Value>

</deegree:Parameter>

The parameter XPathToServiceTitle supplies the path to the title of the service, that allows access to the dataset.

<deegree:Parameter>

<deegree:Name>XPathToServiceTitle</deegree:Name>

<deegree:Value>

'gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString'

</deegree:Value>

</deegree:Parameter>

The Parameter XPathToServiceOperatesOnTitle supplies the path to the title of the data metadataset, that the current dataset of the service metadata refers to.

<deegree:Parameter>

<deegree:Name>XPathToServiceOperatesOnTitle</deegree:Name>

<deegree:Value>

'gmd:identificationInfo/srv:SV_ServiceIdentification/srv:operatesOn/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString'

</deegree:Value>

</deegree:Parameter>

The parameter XPathToServiceAddress supplies the path to the service address at which the Capabilities of the service can be queried, that supplies the title, which is read from XpathToServiceOperatesOnTitle.

<deegree:Parameter>

<deegree:Name>XPathToServiceAddress</deegree:Name>

<deegree:Value>

'gmd:identificationInfo/srv:SV_ServiceIdentification/srv:containsOperations/srv:SV_OperationMetadata/srv:connectPoint/gmd:CI_OnlineResource/gmd:linkage/gmd:URL'

</deegree:Value>

</deegree:Parameter>

The parameter XPathToServiceType supplies the path to the service type of the service, that has the Title XPathToServiceTitle.

<deegree:Parameter>

<deegree:Name>XPathToServiceType</deegree:Name>

<deegree:Value>

</deegree:Value>

'gmd:identificationInfo/srv:SV_ServiceIdentification/srv:serviceType/gco:LocalName'

</deegree:Parameter>

The parameter XPathToServiceTypeVersion supplies the path to the version of the service type.

<deegree:Parameter>

<deegree:Name>XPathToServiceTypeVersion</deegree:Name>

<deegree:Value>

'gmd:identificationInfo/srv:SV_ServiceIdentification/srv:serviceTypeVersion/gco:CharacterString'

</deegree:Value>

</deegree:Parameter>

        1. Configuration of transformation files

The transformation files are used to transform the xml-encoded files of the CSW into HTML. Furthermore, they define the subset of the metadata that is displayed in the portal. In the CSW client module of the Web Map Context (e.g. wmc_testCswClient.xml) the used transformation files are defined using the parameter Profiles.* (see section 4.13.1.2). The structure of the files should not be changed, as usually only adjustment of the HTML contents are necessary.

        1. Transformation of result sets

The file metaList2html.xsl lists the results of a query.

The first template is executed in case the CSW sends an error message:

<xsl:template match="ogc:ServiceExceptionReport">

<table class="except">

<tr>

<td class="key">Error</td>

<td class="val">

<xsl:value-of select="./ogc:ServiceException"/>