Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/defra/flood-gis

GIS configuration for Check Flood Risk service
https://github.com/defra/flood-gis

Last synced: 6 days ago
JSON representation

GIS configuration for Check Flood Risk service

Awesome Lists containing this project

README

        

# flood-gis

This is the repository for the geoserver configuration for the service refresh project for the "Check flood risk" service https://github.com/DEFRA/flood-app.

The geoserver installation provides geospatial tiles for our geospatial datasets that are stored in a postgis:postgres installation found at https://github.com/DEFRA/flood-db

# Pre requisites

These data files are designed for use with an installation of Geoserver > 2.8 http://geoserver.org/.

There are several ways to host this, but we use it as a tomcat webapp.

Tomcat installation on Linux: https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04

## installation

Download your version of geoserver.war and extract (if needed) and copy war file to your tomcat webapp directory at: `/opt/tomcat/webapps`

Make sure the war file is owned by the tomcat user: `sudo chown tomcat:tomcat geoserver.war`

## Configuration
The database connection file can be created at `geoserver/data/workspaces/flood/flooddev/datastore.xml`
Format:
```

DataStoreInfoImpl--30633af1:14863bcf984:-7fff
flooddev
Postgis
PostGIS
true

WorkspaceInfoImpl-4d72205b:1489c5817f9:-8000


20
5432
************
postgis
false
300
http://apps.environment-agency.gov.uk/flood
************
false
1000
false
1
************
3
true
10
true
************
300
true
true
false
50
true
************

<__default>false

```
You'll need to update passwd, schema, host, database, user for your postgres database with postgis extension installed. See https://github.com/DEFRA/flood-db

## Data dir
Your tomcat installation needs its geoserver data dir parameter updating as follows (found in `/etc/systemd/system/tomcat.service` if tomcat installation from previous is followed):
`Environment='CATALINA_OPTS=-DGEOSERVER_DATA_DIR=/{absolute_repo_dir}/flood-gis/geoserver/data -Xms512M -Xmx1024M -server -XX:+UseParallelGC'`
Update {absolute_repo_dir} with the dir of this cloned repository

## File ownership
The files need to be writable or owned by the tomcat user that has been set up.
`sudo chown tomcat:tomcat . -R`

## Start up the tomcat service
`sudo service tomcat start`

Navigate to `http://localhost:8080/geoserver` and login with geoserver:admin to access geoserver tool. If successful then the flood layers should be viewable in the app, otherwise check all tomcat, catalina, geoserver logs for issues. Database connection etc.