INSPIRE Download Services with deegree 3.2: Part Three

The second part of this series focussed on harmonized INSPIRE datasets and their GML encoding. It also lined out why the technical features of the deegree WFS make it an excellent choice for serving valid, harmonized, GML-encoded INSPIRE datasets. Why was this important again? As the first part of the series described, data providers have to deal with this at some point in order to meet the upcoming INSPIRE requirement of interoperability.

Hands on!

This part of the series will provide an initial hands-on experience. If you’re ready to take the plunge, you can have an interoperable INSPIRE Download Service running on your machine in about five minutes. Here’s what you need:

* A Windows, Linux, Solaris or Mac OS X system.
* A supported Java version. Recommended are Oracle Java 7 (JDK) or OpenJDK 7.

If you don’t have a compatible Java version installed yet, download Oracle Java 7 (JDK variant), install it and try again. On Linux, you may prefer to install OpenJDK 7 using the package manager of your distribution.

Downloading and installing deegree webservices

First we need to grab a recent version of deegree webservices (it’s free and Open Source, so no license fees charged). Point your browser to and pick the latest stable version (at the moment of writing, this was 3.3.1). For the most hassle-free experience, pick the ZIP version, not the WAR (which requires a separate Java web container installation).

After downloading, simply extract the ZIP archive to a directory of your choice:


In the extraction directory, there’s one start script for each supported operating system:

* Windows: start-deegree-windows
* Linux/Solaris:
* Mac OS X: start-deegree-osx.cmd

Fire up the starter. You should now see a terminal window on your screen with a lot of log messages running by:


(If this doesn’t work out, you most probably have an issue with the Java installation. Feel free to use one of the deegree support options to get help sorting it out.)

You can minimize this window, but don’t close it as long as you want to be able to use the deegree webservices. To access the administration interface, open http://localhost:8080 in your browser. You should see the following page:


deegree webservices are installed now and ready for configuration and usage. To shut deegree webservices down, switch back to the terminal window and press CTRL+C or simply close it.

If you want to learn more about the different flavors and installation options (e.g. how to make deegree webservices start automatically on system startup), please consult the installation chapter of the official documentation.

Activating the INSPIRE workspace

deegree webservices are well suited for creating Direct Access INSPIRE Download Services, but technically this is just a certain configuration for a deegree webservices installation: The software provides generic, highly configurable implementations of the following OGC standards: WFS, WMS, WMTS, CSW and WPS. Read more here. In order to get an INSPIRE Download Service set up, we could now create a deegree WFS and a feature store configuration for INSPIRE GML manually. However, it’s more comfortable to download a ready-to-use configuration for INSPIRE (a so-called “workspace”). A deegree workspace basically bundles configuration files for the different aspects of a deegree webservices instance:


For now, we don’t need to dive into the different workspace aspects any deeper, but documentation is available, if you would like to learn more.

The deegree INSPIRE workspace is a basic INSPIRE View and Download Services setup. It contains a transactional WFS (2.0.0 and 1.1.0) configured for all Annex I Data Themes and a WMS (1.3.0 and 1.1.1) that is configured for three layers from three Annex I Data Themes. The workspace also contains some harmonized dutch base data for Administrative Units, Cadastral Parcels and Addresses (which we covered in the last part). The WFS is configured to behave as an INSPIRE Download service (Direct Access) that delivers the data as valid, harmonized INSPIRE GML and supports rich querying facilities.

In order to get the pre-configured INSPIRE workspace running, point your browser to http://localhost:8080 and perform the following three easy steps:

Step 1: Click the “workspaces” link (in the general menu section)


Step 2: Click “Import” (next to “deegree-workspace-inspire”)


The workspace will now be fetched from the artifact repository of the deegree project and extracted in a folder on your file system (in the deegree workspaces folder). Depending on your internet connection, this may take a while.

Step 3: Click “Start” (next to “deegree-workspace-inspire”)


The workspace will be initialized now. This takes a while, as the INSPIRE Annex I GML schemas are parsed and example GML datasets are loaded. The workspace will be removed from the list of inactive workspaces and displayed next to “Active workspace:” (below the deegree logo).


Your deegree instance is now running an interoperable, Direct Access INSPIRE Download Service (as well as an accompanying INSPIRE View Service)!

Note: If the machine running deegree webservices uses a proxy to access the internet and you don’t see any workspaces available for download, you most probably have to configure the proxy settings. Ask your network administrator for details and use the proxy menu link to set up proxy settings.

Performing WFS requests

So we now have an interoperable, Direct Access INSPIRE Download Service!? Very well, I hear you ask, but what can I do with it? How do we test that it actually works? Well, as it’s a standard-compliant OGC WFS service, you can connect to it using any compatible OGC WFS 2.0 client. Unfortunately, the client side is still lagging a bit behind: There are many WFS clients out there, but most of them don’t support WFS 2.0 yet (and equally important: they cannot deal with rich GML models). The only exception that I am aware of is Quantum GIS: There’s a WFS 2.0 plugin available which can be used to connect to WFS 2.0/INSPIRE Download Services and even render rich feature types:


However, you still won’t be able to work with the rich structure of the INSPIRE features using this client setup. In the future, the client situation should improve, but for now, you can only use raw WFS requests to see what your Direct Access Download Service really serves and is capabable of. The deegree INSPIRE workspace comes with some example WFS requests for testing.

To access these requests, click the “send requests” menu link:


Use the drop-down menus to select an example request, e.g. to insert some harmonized INSPIRE Address features:


Now click “Send”. The WFS response will be displayed in the lower part:


This request inserted a few harmonized INSPIRE Addresses, which we can now request from the server. Again, there a some prepared GetFeature requests, which perform queries using different filter constraints.


The “ByThoroughfareName” example requests select Address features that are located in a specific street (in street “Madame Curiestraat”). Note that the response actually contains harmonized INSPIRE GML (as discussed in the last part of the series). To check schema-validity, you could validate in a schema-aware editor.


Don’t be shy to play around with the example requests. If you want to learn more about the rich possibilities of the WFS protocol, you may also want to have a look at the WFS 2.0 specification.

What’s next

Maybe you’re wondering: What is the storage backend for the features? Until now, we didn’t use a database. The INSPIRE workspace is pre-configured to use a so-called MemoryFeatureStore. However, for real-world usage, you most likely want to work with features stored in an SQL database with a spatial extension, such as PostgreSQL/PostGIS, Oracle Spatial or Microsoft SQL Server. For that, deegree webservices has a powerful relational mapping language for GML structures as well as a unique, specialized storage mode which is based on database BLOBs. The next part of the series will look into these storage options and the complimentary INSPIRE View Service that’s currently running unnoticed on your machine as well (in case you followed the hands-on instructions). If you don’t want to wait, please have a look at the respective parts of the official deegree webservices documentation. This section should be a good starting point.


About Markus Schneider

Geospatial software developer, CEO of Occam Labs
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to INSPIRE Download Services with deegree 3.2: Part Three

  1. It’s an awesome piece of writing in support of all the internet users; they will take benefit from it I am sure.

  2. I was pretty pleased to discover this site. I need to
    to thank you for your time due to this wonderful read!
    ! I definitely really liked every bit of it and i also have you saved to
    fav to check out new things in your website.

  3. the technical features of the deegree WFS make it an excellent choice for serving valid, harmonized, GML-encoded INSPIRE datasets.
    thank you.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s