QGIS - LOADING A WMS LAYER
The QGIS documentation provides an excellent walk-through on how to load a WMS layer. These instructions are adapted from the QGIS docs with additional details on the DataBC services.
- Open QGIS and create a new project.
- Open Data Source Manager > WMS/WMTS tab.
- Create a New connection.
- Provide a name like
DataBC Layers
and set the URL tohttps://openmaps.gov.bc.ca/geo/ows?SERVICE=WMS&REQUEST=GetCapabilities
, leaving the other settings as is. - Click OK.
- Click Connect and allow a moment for the layers to load. You should see:
- Use the search bar to find a dataset of interest. For this example, we will add Health Authority Boundaries.
-
Click on the
372_373
-Health_Area_Boundaries
layer. Then change the Coordinate Reference System to match your map - if you are using a typical web basemap, chances are it is inEPSG:3857 - WGS 84 / Pseudo-Mercator
.WMS Styles
The multiple options shown for a given dataset are different styles for the same data, e.g.
Outlined
(Name372
) shows only boundaries, whileColour_Themed
(373
) shows a coloured fill for each health area.372_373
is a combination of both. A similar pattern is followed for most datasets. - Click Add to load the layer.
- Close the Data Source Manager window.
- Drag the new layer to the top of the list in the Layers panel.
- Right click the new layer and click Zoom to Layer(s).
- Explore the data - zoom in, pan around. Labels are visible for some services at pre-defined scales. Any symbology is shown in a legend in the layer list.
- The identify tool allows viewing individual feature information.
The nature and limitations of WMS
The WMS layer looks like it’s made up of vectors, yet it seems to be a raster, and you can’t change its symbology. Why is that?
This is how a WMS works: it’s a map, similar to a normal map on paper, that you receive as an image. What usually happens is that you have vector layers, which QGIS renders as a map. But using a WMS, those vector layers are on the WMS server, which renders it as a map and sends that map to you as an image. QGIS can display this image, but can’t change its symbology, because all that is handled on the server.
This has several advantages, because you don’t need to worry about the symbology. It’s already worked out, and should be nice to look at on any competently designed WMS.
On the other hand, you can’t change the symbology if you don’t like it, and if things change on the WMS server, then they’ll change on your map as well. This is why you sometimes want to use a Web Feature Service (WFS) instead, which gives you vector layers separately, and not as part of a WMS-style map.
Jump into the WFS tutorial to learn more!