project logo

QGIS Server Quickstart

QGIS Server provides a web map service (WMS) based on libraries from the Quantum GIS (QGIS) desktop application.

This Quick Start describes how to:

  • update an existing QGIS project and render it with QGIS Server
  • create a new QGIS project and open the WMS directly in a browser
Documentation:

Quick start for Server Installation on Debian/Ubuntu:

QGIS Web Client:

Start GeoExt viewer

OSGeo-Live contains an example of web map viewer based on the GeoExt Javascript framework and using QGIS Server for rendering the map.

  • Click Geospatial ‣ Web Services ‣ QGIS Server

You should see a browser window with a web map viewer showing a world map.

../../_images/qgis_mapserver_browser3.jpg

Alternatively, you can access the application using a browser through http://localhost/qgis_server

We will now change the map styling using QGIS.

Edit QGIS project

  1. Click Geospatial ‣ Desktop GIS ‣ QGIS.
  2. Choose Project ‣ Open... from the menu bar.
  3. Select QGIS-NaturalEarth-Example.qgs and press Open.
    • You should see the same world map rendered by QGIS. We will now change river styling and look at the result in the web map viewer.
  4. Double click ne_10m_rivers_lake_centerlines in the Layers tree.
  5. Change the color in Outline Options to a different blue tone.
  6. Press OK.
    • Rivers are now rendered in a new color.
  7. Save the project with Project ‣ Save.
  8. Reopen the web browser
  9. Zoom in
    • You should now see rivers rendered in the same new color.

Create a new QGIS project

  1. Reopen QGIS
  2. Choose Project ‣ New.
  3. Click Layer ‣ Add Vector Layer....
  4. Browse to dataset /home/user/data/natural_earth2/ne_10m_admin_0_countries.shp.
  5. Press Open.
    • You should see all world countries.
  6. Save the project with Project ‣ Save.
  7. Use file name /home/user/world.qgs and press Save.
  8. Open the WMS URL.
    • You should see all world countries, this time rendered by QGIS Server.

What Next?

To learn more about QGIS Server, a good starting point are the QGIS User Guide and the QGIS Server Wiki page.

Copyright & Disclaimer