2012-09-26

QGIS Server quick test


...but if you need to quickly design (colors, simbology, labels, zoom rules) and publish web maps, without the need of manually/copy-n-pasting MapServer MapFiles, then QGIS Server is here to help. Using an instance of QGIS - the great opensource desktop GIS - you will be able to design nice maps including zoom based rules and advanced simbology and then view the web map(powered by QGIS Server!) with exactly THE SAME appearance as defined in QGIS desktop. A WYSIWYG design-and-publish method.


General features

  • Web Map Service (WMS) implementation
  • Built-in PDF output
  • WYSIWYG map creation with QGIS
  • Advanced cartographic symbolisation
  • Supports Styled Layer Descriptor (SLD)
  • Identification of features and display of attribute data

Documentation and setup

By now, QGIS Server project still lacks more user-oriented docs. So, for a quick test, I found OSGeo Live 6 distro easier than trying to set it up under a Windows box.

Publish a first QGIS Server map

When publishing your QGIS desktop map to QGIS Server take care with:
  • use "relative path" project option and remember data files path (.shp, .tab, .tif, etc) will be relative to .qgs project file
  • when labeling layers, your QGIS Server might have the same fonts available - the same you use on QGIS desktop
  • and for SVG symbols, you will have to put these files at QGIS server and also adjust .svg paths editing the XML code of .qgs project file
After adjusting your QGIS project, copy the .qgs file, data files and SVG files to your QGIS Server machine. Also check .qgs code to ensure that there's no trouble with paths - wrong reference or file/folder without read permission for the webserver user.

Then, finally open your WMS layers using any WMS compliant desktop GIS using an URL like this:
http://myserver/cgi-bin/qgis_mapserv.fcgi?map=/path/to/the/project-map/myexample.qgs&VERSION=1.3.0

Links