README.md 3.52 KB
Newer Older
frank.vanderstelt's avatar
frank.vanderstelt committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Raven geoserver
Geoserver instance with the following layers:

| Layer name                               | Layer title                              | Description
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| SE_AQD_DATAFLOW_D	                       | Air quality monitoring stations (usedaqd or eoi)	() | EEA report D.|
| SE_AQD_DATAFLOW_D_ALL	                   | Air quality monitoring stations (all stations)	| Corresponds to data flow D in the Air Quality Directive (all stations). |
| dataflow_C	                             | dataflow_C	| EEA report C. |
| AM.AirQualityManagementZone	             | COUNTRIES zone division for air quality	| Corresponds to data flow B in the Air Quality Directive. | 
| EF.EnvironmentalMonitoringFacilities     | Air quality monitoring stations (Air Quality Directive)| Corresponds to data flow D in the Air Quality Directive (AQD stations). |

## Requirements
The following is required to install and run the application:
* The assumption is made that the latest version of raven is installed, with a postgres database with the postgis extension.
* Java 8 or 11 environment (JRE)
* Geoserver 2.15.2 (http://geoserver.org/release/stable/)
* The Inspire plugin, found under miscellaneous (http://geoserver.org/release/stable/)
* A web container like tomcat to run geoserver

## Installation
Deploy geoserver with the inspire plugin. For more information on this visit the geoserver installation site:

https://docs.geoserver.org/stable/en/user/installation/index.html.

## Configuration
When geoserver is started the jar file will have been expanded. Stop the server and replace the **data/** directory with the one found within this GIT project. This directory contains all the layer information and styles associated eith these layers.

Before starting the server again, we need to fix the database credentials in the following files:
* workspaces/raven/raven_not_aqd/datastore.xml
* workspaces/aqd/raven/datastore.xml

The uppercase strings have to be changed to fit your system. It should point to the raven database.

```xml
<connectionParameters>
  ...
  <entry key="database">DATABASE_NAME?prepareThreshold=0<entry>
  <entry key="host">HOST<entry>
  <entry key="namespace">https://DOMAIN/aqd<entry>
  <entry key="passwd">PASSWORD</entry>
  <entry key="user">USER<entry>
</connectionParameters>
``` 

After this you can start the server.


## Further configuration in the graphical interface
In order to get the correct URLs in the getCapabilities object you have to change the **proxy base url** on each individual workspace and in the global settings.

![Example if editing proxy base](images/proxy.png)

## Test
To test if the layers are working you could for example connect QGIS to the WMS service. It should look something like this with the blue lines showing the zones and the black dots showing the measurement stations:

![Image of aqd layers in QGIS](images/qgis.png)

## SQL files
In this project the is a map with SQL-files. The SQL-query is also found if you click on a layer. You have to scroll down to **Edit sql view** and click on it. You will find something like this:

![Image of the SQL-view](images/sql_view.png)

The SQL-query has some country-specific information, for example the namespace (in this case **SE.NV.AQ**) that has to be changed. The map also includes two files for modelling data. There are no database tables in the current Raven for modelling data. But if this is added to future versions these SQL-files can be used for that purpose.