Quantum GIS and MapServer

One of the main barriers I had to using MapServer as a web GIS server was that layers had to be symbolised iqgisn a text editor, using a MAPFILE. It was cumbersome to keep editing and refreshing a browser, there was no easy way to check for errors, and you have to learn the syntax and keywords.

Whilst this is ok for smaller projects where I could make these myself, larger projects require non-programmers to gather data, symbolise it, and handle the map layouts and creation.

I’ve just discovered that another of the OSGeo‘s projects, Quantum GIS (often abbreviated to QGIS) has a tool that can take a map project created and symbolised in the desktop application, and export it to a MAPFILE which can be read by MapServer. This seems to be the missing link in a complete Open Source GIS stack.

I had a few problems finding where this tool was installed. By default the Python files should be in the C:\OSGeo4W\apps\qgis\python\plugins\mapserver_export directory, however this directory did not exist after running through a default installation without paying attention.

OSGeo have a custom installer that you can use to install all their software including MapServer, QuantumGIS, and GRASS. To install Quantum GIS follow the notes on this wiki page. Clearly you need to select QGIS, but the MapServer Export tool also requires python-qgis. I think I missed this the first time round, however you can always rerun the installer to add new packages and libraries.

The OSGeo Installer

The OSGeo Installer

Once you have the Python for QGIS library installed open QGIS, and go to Plugins >> Fetch Python Plugins. The MapServer Export plug-in should be installed. Now go to Plug-Ins >> Manage Plugins and check the MapServer Export box as below.

osgeo4w2

You should now see a new MapServer Export menu item on the Plugins menu.

Further Details

There is a good introduction to using QGIS at http://spatialhorizons.com/category/qgis/

You can also install a standalone version of MapServer Export – http://spatialserver.net/qgis2ms/.



Leave a Reply

Your email address will not be published. Required fields are marked *

Comment

You may use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>