Project

General

Profile

Configuration of an INSPIRE View Service » History » Version 7

Maarten Plieger, 10/23/2013 12:44 PM

1 6 Maarten Plieger
[[Configuration]]
2 1 Maarten Plieger
3 6 Maarten Plieger
h1. Configuration of an INSPIRE View Service
4 1 Maarten Plieger
5 1 Maarten Plieger
The following elements need to be configured to create an INSPIRE View Service:
6 1 Maarten Plieger
7 1 Maarten Plieger
8 2 Maarten Plieger
* WMS->Title needs to be set to [INSPIRE::TITLE]
9 2 Maarten Plieger
* WMS->Abstract needs to be set to [INSPIRE::ABSTRACT]
10 2 Maarten Plieger
* WMS->RootLayer->Title needs to be set to [INSPIRE::TITLE]
11 2 Maarten Plieger
12 2 Maarten Plieger
* WMS->Inspire->ViewServiceCSW - The global view service document (CSW service) describing the view services
13 2 Maarten Plieger
* WMS->Inspire->DatasetCSW - The dataset CSW service describing the dataset
14 2 Maarten Plieger
* WMS->Inspire->AuthorityURL - The name and URL of the Authority offering the data
15 2 Maarten Plieger
* WMS->Inspire->Identifier - The identifier of the Authority
16 2 Maarten Plieger
17 2 Maarten Plieger
* Layer->Abstract - An abstract describing the layer, Name and Title needs to be set as normal
18 2 Maarten Plieger
19 2 Maarten Plieger
20 1 Maarten Plieger
<pre>
21 1 Maarten Plieger
22 2 Maarten Plieger
 <WMS>
23 2 Maarten Plieger
    <Title>[INSPIRE::TITLE]</Title>
24 2 Maarten Plieger
    <Abstract>[INSPIRE::ABSTRACT]</Abstract>
25 2 Maarten Plieger
    <RootLayer>
26 2 Maarten Plieger
      <Title>[INSPIRE::TITLE]</Title>
27 2 Maarten Plieger
      <Abstract></Abstract>
28 2 Maarten Plieger
    </RootLayer>
29 2 Maarten Plieger
    <TitleFont     location="/data/fonts/FreeSans.ttf" size="19"/>
30 2 Maarten Plieger
    <SubTitleFont  location="/data/fonts/FreeSans.ttf" size="10"/>
31 2 Maarten Plieger
    <DimensionFont location="/data/fonts/FreeSans.ttf" size="7"/>
32 2 Maarten Plieger
    <ContourFont   location="/data/fonts/FreeSans.ttf" size="7"/>
33 2 Maarten Plieger
    <GridFont      location="/data/fonts/FreeSans.ttf" size="5"/>
34 2 Maarten Plieger
    <WMSFormat name="image/png" format="image/png"/>
35 2 Maarten Plieger
    <Inspire>
36 2 Maarten Plieger
      <ViewServiceCSW>http://data-test.knmi.nl/inspire/csw?Service=CSW&amp;Request=GetRecordById&amp;Version=2.0.2&amp;id=9155a021-ac62-464c-99e2-b4c809e5ecde&amp;outputSchema=http://www.isotc211.org/2005/gmd&amp;elementSetName=full</ViewServiceCSW>
37 2 Maarten Plieger
      <DatasetCSW>http://data-test.knmi.nl/inspire/csw?Service=CSW&amp;Request=GetRecordById&amp;Version=2.0.2&amp;id=0d6f8f49-94d0-4e21-a7c1-2d703ce1fd22&amp;outputSchema=http://www.isotc211.org/2005/gmd&amp;elementSetName=full</DatasetCSW>
38 2 Maarten Plieger
      <AuthorityURL name="NL.KNMI" onlineresource="http://knmi.nl/"/>
39 2 Maarten Plieger
      <Identifier authority="NL.KNMI" id="id_value"/>
40 2 Maarten Plieger
    </Inspire>
41 1 Maarten Plieger
  </WMS>
42 1 Maarten Plieger
43 1 Maarten Plieger
  <Layer>
44 1 Maarten Plieger
    ...
45 2 Maarten Plieger
    <Abstract>nice abstract describing the layer</Abstract>
46 1 Maarten Plieger
  </Layer>
47 1 Maarten Plieger
48 1 Maarten Plieger
</pre>
49 3 Maarten Plieger
50 3 Maarten Plieger
h1.  Configuration of an INSPIRE View Service with one service endpoint and multiple datasets
51 3 Maarten Plieger
52 3 Maarten Plieger
This tutorial is based on a single endpoint for a WMS service, where several datasets are identified with the DATASET= parameter. 
53 3 Maarten Plieger
54 3 Maarten Plieger
The endpoint is for example:
55 5 Maarten Plieger
<pre>
56 3 Maarten Plieger
http://data-test.knmi.nl/inspire/wms/cgi-bin/wms.cgi?
57 5 Maarten Plieger
</pre>
58 3 Maarten Plieger
59 3 Maarten Plieger
Datasets within the WMS service are identified with the DATASET= parameter, for example:
60 3 Maarten Plieger
61 5 Maarten Plieger
<pre>
62 3 Maarten Plieger
http://data-test.knmi.nl/inspire/wms/cgi-bin/wms.cgi?DATASET=urn:xkdc:ds:nl.knmi::kisinspire2/1/&
63 5 Maarten Plieger
</pre>
64 3 Maarten Plieger
65 3 Maarten Plieger
In the GetCapabilities document this URL is returned as online resource for the GetMap, GetFeatureInfo and GetLegendGraphic requests. 
66 3 Maarten Plieger
67 3 Maarten Plieger
The datasets identified with the DATASET parameter are extra configuration files which are included in the main configuration file of the WMS service. To enable this feature, the [[Dataset]] option needs to be configured in the WMS service.
68 3 Maarten Plieger
69 4 Maarten Plieger
When everything is configured correctly, there is one global configuration file and several dataset configuration files representing the datasets.
70 4 Maarten Plieger
* /data/config/inswms.xml - The global configuration file
71 4 Maarten Plieger
* /data/datasetconfigs/urn_xkdc_ds_nl.knmi__kisinspire2_1_.xml - The dataset configuration file, which is loaded by using the DATASET=urn:xkdc:ds:nl.knmi::kisinspire2/1/ parameter. Note that the DATASET identifier is escaped, the ':' and '/' characters become '_' on the filesystem.
72 4 Maarten Plieger
73 3 Maarten Plieger
The global configuration file is named /data/config/inswms.xml and can look like this:
74 3 Maarten Plieger
75 3 Maarten Plieger
<pre>
76 3 Maarten Plieger
77 3 Maarten Plieger
 <WMS>
78 3 Maarten Plieger
    <Title>[INSPIRE::TITLE]</Title>
79 3 Maarten Plieger
    <Abstract>[INSPIRE::ABSTRACT]</Abstract>
80 3 Maarten Plieger
    <RootLayer>
81 3 Maarten Plieger
      <Title>[INSPIRE::TITLE]</Title>
82 3 Maarten Plieger
      <Abstract></Abstract>
83 3 Maarten Plieger
    </RootLayer>
84 3 Maarten Plieger
    <TitleFont     location="/data/fonts/FreeSans.ttf" size="19"/>
85 3 Maarten Plieger
    <SubTitleFont  location="/data/fonts/FreeSans.ttf" size="10"/>
86 3 Maarten Plieger
    <DimensionFont location="/data/fonts/FreeSans.ttf" size="7"/>
87 3 Maarten Plieger
    <ContourFont   location="/data/fonts/FreeSans.ttf" size="7"/>
88 3 Maarten Plieger
    <GridFont      location="/data/fonts/FreeSans.ttf" size="5"/>
89 3 Maarten Plieger
    <WMSFormat name="image/png" format="image/png"/>
90 3 Maarten Plieger
    <Inspire>
91 3 Maarten Plieger
      <ViewServiceCSW>http://data-test.knmi.nl/inspire/csw?Service=CSW&amp;Request=GetRecordById&amp;Version=2.0.2&amp;id=9155a021-ac62-464c-99e2-b4c809e5ecde&amp;outputSchema=http://www.isotc211.org/2005/gmd&amp;elementSetName=full</ViewServiceCSW>
92 3 Maarten Plieger
      <AuthorityURL name="NL.KNMI" onlineresource="http://knmi.nl/"/>
93 3 Maarten Plieger
      <Identifier authority="NL.KNMI" id="id_value"/>
94 3 Maarten Plieger
    </Inspire>
95 3 Maarten Plieger
  </WMS>
96 3 Maarten Plieger
97 3 Maarten Plieger
  <Dataset enabled="true" location="/data/datasetconfigs/"/>
98 3 Maarten Plieger
</pre>
99 3 Maarten Plieger
100 3 Maarten Plieger
Note that in the Inspire section the DatasetCSW is removed, as this option is dependent of the dataset in question.
101 3 Maarten Plieger
102 3 Maarten Plieger
The dataset configuration file needs to have the filename urn_xkdc_ds_nl.knmi__kisinspire2_1_.xml and looks like this:
103 3 Maarten Plieger
<pre>
104 3 Maarten Plieger
<?xml version="1.0" encoding="UTF-8" ?>
105 3 Maarten Plieger
  <Configuration>
106 3 Maarten Plieger
    <WMS>
107 3 Maarten Plieger
      <Inspire>
108 3 Maarten Plieger
        <DatasetCSW>http://data-test.knmi.nl/inspire/csw?Service=CSW&amp;Request=GetRecordById&amp;Version=2.0.2&amp;id=0d6f8f49-94d0-4e21-a7c1-2d703ce1fd22&amp;outputSchema=http://www.isotc211.org/2005/gmd&amp;elementSetName=full</DatasetCSW>
109 3 Maarten Plieger
      </Inspire>
110 3 Maarten Plieger
    </WMS>
111 3 Maarten Plieger
    <Layer type="database">
112 3 Maarten Plieger
      <FilePath filter=".*\.nc$">/data/kisinspire2/1/</FilePath>
113 3 Maarten Plieger
      <Name>TG_air_temperature</Name>
114 3 Maarten Plieger
      <Title>Temperature</Title>
115 3 Maarten Plieger
      <Variable>TG</Variable>
116 3 Maarten Plieger
      <Abstract>Daily mean temperature in (0.1 degrees Celsius);</Abstract>
117 3 Maarten Plieger
    </Layer>
118 3 Maarten Plieger
  </Configuration>
119 3 Maarten Plieger
</pre>
120 3 Maarten Plieger
This file is located in /data/datasetconfigs/
121 3 Maarten Plieger
122 3 Maarten Plieger
Here the WMS->Inspire->DatasetCSW is given, including the Layer.
123 3 Maarten Plieger
124 3 Maarten Plieger
This sub configuration file can be generated with the adagucserver using the following command:
125 3 Maarten Plieger
126 5 Maarten Plieger
<pre>
127 3 Maarten Plieger
adagucserver --getlayers --file /data/kisinspire2/1/inspire_daily_weather_observations_kis_v20131021.nc --inspiredatasetcsw "http://data-test.knmi.nl/inspire/csw?Service=CSW&Request=GetRecordById&Version=2.0.2&id=0d6f8f49-94d0-4e21-a7c1-2d703ce1fd22&outputSchema=http://www.isotc211.org/2005/gmd&elementSetName=full" --datasetpath=/data/kisinspire2/1/ > /data/datasetconfigs/urn_xkdc_ds_nl.knmi__kisinspire2_1_.xml
128 5 Maarten Plieger
</pre>
129 3 Maarten Plieger
130 3 Maarten Plieger
To update the database with these two configuration files you can use the following command:
131 1 Maarten Plieger
132 5 Maarten Plieger
<pre>
133 7 Maarten Plieger
adagucserver --updatedb --config /data/config/inswms.xml,/data/datasetconfigs/urn_xkdc_ds_nl.knmi__kisinspire2_1_.xml --tailpath <optional, path to granule in datasetdirectory>
134 5 Maarten Plieger
</pre>