Providing geoscience data globally OneGeology 10 year anniversary in 2017 logo Navigation
Main content
Bottom links


Home > How to serve a OneGeology WMS > Creating MapServer CLASS definitions using QGIS

Appendix D: Creating MapServer CLASS definitions using Quantum GIS

Quantum GIS (QGIS) is a user friendly Open Source Geographic Information System (GIS) licensed under the GNU General Public License ( QGIS is an official project of the Open Source Geospatial Foundation (OSGeo) ( It runs on Linux, Unix, Mac OSX, and Windows and supports numerous vector, raster, and database formats and functionalities.

The current stable version of QGIS (QGIS 2.12) is available for download from

For information on how to use QGIS to view WMS and WFS services see the ‘how to’ section 1.4.7

You can use the MapServer Export QGIS plugin to create a .map configuration file. You will first need to enable the plugin, which comes bundled as part of the standard installation, through the Plugins menu. Select Manage plugins then select MapServer Export from the QGIS Plugin Manager.

QGIS Enabling the MapServer Export plugin

With the map data you wish to serve as a WMS open in QGIS, select Plugins and then MapServer Export to start the conversion process.

QGIS Running the MapServer Export plugin

You are given some options when you run the plugin (as below). You may use the defaults or add your own (as we have here). It isn’t important if you don’t know what to enter at this stage as you can edit the values in the .map file in any text editor. It may help though if add some dummy values, just so you get the correct structure.

QGIS MapServer Export: Save project to map file

When you have made all the edits you want to add, click ok. If there are no errors, you will get a results summary window (as below).

QGIS MapServer Export results summary

Note the URLs shown in the results summary will not work in the OneGeology exemplar service set-up (as detailed in this cookbook); you will need to follow the instructions in Section 4.3 to complete the set-up process.

Section last modified: 19 June 2011


OneGeology © 2016. This site is hosted by the British Geological Survey but responsibility for the content of the site lies with OneGeology not with the British Geological Survey. Questions, suggestions, or comments regarding the contents of this site should be directed to the OneGeology administration.