34
QGIS Server: The Good, the Not-so- Good and the Ugly Fiona Hemsley-Flint EDINA

QGIS server: the good, the not-so-good and the ugly

Embed Size (px)

Citation preview

QGIS Server: The Good, the Not-so-Good and the Ugly

Fiona Hemsley-Flint

EDINA

Digimap

• Online mapping portal for data from:

• Available to HE and FE

• Currently 22,000 active users

• 25 million screen maps in last year

• 500,000 print requests per year

Current Architecture

TileCache

On-screen Maps Print Maps

Data Files &

GeognoSIS

Investigation

• Does QGIS Server have the potential to replace our current proprietary server?

• Requirements:

• Excellent quality cartography

• Able to produce PDF for printing

• Performant, scalable & reliable

• Allow user customisation of maps

• [Easy(ish) to use]

QGIS Server

• Open source WMS, WFS and WCS

• FastCGI/CGI (Common Gateway Interface) application written in C++

• Uses QGIS as backend for the GIS logic and for map rendering

• WMS extra parameters (dpi, opacities, filter, selection)

The Set-up

• Installed on a CentOS 7 virtual machine

• Create a QGIS project file in QGIS Desktop

• Upload file to server

• Make a wms request to QGIS Server… http://dm-geo-test.edina.ac.uk/wms/bgs_sld_demo?SERVICE=WMS &LAYERS=Geology%2050k%20Rock%20Unit%20with%20sld &TRANSPARENT=true &VERSION=1.1.1 &REQUEST=GetMap &STYLES= &FORMAT=image%2Fpng &SRS=EPSG%3A27700 &BBOX=176097.792,645691.904,178355.456,647949.568 &WIDTH=256 &HEIGHT=256

The Challenge

• Replicate cartographic style for:

• BGS’s DiGMapGB-50

• OS’s Open Map Local in our greyscale styling

• Replicate our current A4 print template

• Options for map customisation

• Test performance

BGS’s DiGMapGB-50: GeognoSIS

© NERC

BGS’s DiGMapGB-50: QGIS Server

© NERC

Ordnance Survey Open Map Local: GeognoSIS

© Crown copyright and database right 2016

Ordnance Survey Open Map Local: QGIS Server

© Crown copyright and database right 2016

Line Symbology

GeognoSIS QGIS

Polygon Fills

GeognoSIS QGIS

Labelling

Labelling

Cartography: Summary

• Good:

• Can replicate styles

• Import as SLD

• Has additional features missing in GeognoSIS

• Not So Good:

• Can be a bit complex to get spacing and scaling correct on linework

• Ugly:

• WMS tiling results in edge effects on labels and polygon fill patterns

Printing

Printing

Printing: Summary

• Good:

• It is possible!

• Not So Good:

• Seems rather complicated to get bbox/scale correct

• Scale bar tricky to get right, but we have had to do some customisation to GeognoSIS for this too.

• Ugly:

• Dodgy minutes in time report

Map Customisation

Map Customisation

Map Customisation: GeognoSIS

LAYERS= G50_brk, G50_agd, G50_mmov, G50_ln_ft

LAYERS= G50_brk, G50_agd, G50_mmov, G50_sdp

Map Customisation: QGIS

LAYERS= v_geology50k_runit_bedrock, v_geology50k_runit_artificial, v_geology50k_runit_mass_move, Linear

LAYERS= v_geology50k_runit_bedrock, v_geology50k_runit_artificial, v_geology50k_runit_mass_move, v_geology50k_runit_superficial

Map Customisation: MapModeller

Map Customisation: QGIS Desktop

Map Customisation: Summary

• Good:

• It is possible

• Not So Good:

• It’s quite complex, and potentially hard to implement and retain levelling

• Ugly:

• Not much, but reminds me that you can’t call mixed geometry tables in QGIS

Performance: BGS DiGMapGB50

0

5

10

15

20

25

30

Response T

ime (

seconds)

Request

QGIS vs GeognoSIS Server response times

QGIS

GeognoSIS

Performance: Open Map Local

80

90

100

110

120

130

140

0

2

4

6

8

10

12

14

16

0 20 40 60 80

Response T

ime (

seconds)

Request

GeognoSIS

QGIS

MapServer

~ ~

QGIS vs GeognoSIS Server

vs MapServer

response times

Performance Summary

• Good:

• It seems to be reliable and doesn’t crash

• Not So Good:

• Not as performant as GeognoSIS or MapServer

• Ugly:

• The ‘start-up lag’ – very slow response times for the first set of requests.

What Next?

• Try implementing more datasets – especially more complex ones such as Marine and MasterMap

• Ask the experts for advice re. performance

• Follow developments of QGIS Server with move out of QGIS 3 base code (see forum thread: http://lists.osgeo.org/pipermail/qgis-developer/2016-September/044812.html)

Conclusions

• Unfortunately, not viable as is

• Needs SE effort either by us or pay community to do it

• Would be great to see something come out of the discussion in the forum

• Really would like to be able to use it!

Other Users

Faunalia

[email protected] digimap.edina.ac.uk

Resources

• http://docs.qgis.org/2.14/en/docs/user_manual/working_with_ogc/ogc_server_support.html

• http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial

• https://anitagraser.com/2012/04/06/qgis-server-on-windows7-step-by-step/