Adding web basemaps in QGIS 2.18

This is a very quick guide on adding web basemaps to QGIS 2.18.  I’ve created it as it is often the first step in creating a new map.

The easiest way to add in a basemap from the web is to use one of two plugins to add in the data for you. The two best plugins I have found for doing this are the OpenLayers and QuickMapServices.

OpenLayers:

The OpenLayers plugin from Sourcepole allows you to add in maps layers like OpenStreetMap (Including brilliant styles from Thunderforest and Stamen), Bing, Google and Apple.

The layers area accessed via the Web menu in the top bar of QGIS

The maps are called using their official Javascript API, making them very reliable. The only issue I have encountered is that the maps are slow to return; though I haven’t recently experienced the blank, un-returned tiles that used to blight this plugin in the past.

Use the drop down menus to choose a layer and then simply click on it to add it to your map.

QuickMapServices:

QuickMapServices from NextGIS has a huge number of services available (790 at the last count, but not all of them are active ) . You can select a few of these using the same select and click method as the OpenLayers plugin, but as there are so many to choose from the search interface is a much needed facility:

Once selected from the menu the Search QMS window opens on the right side of the map:

Once you have found a service you want, just click Add. There is a full cataloge on the NextGIS website here: https://qms.nextgis.com/

Along with the regular Web Mapping Services (WMS) you can also get Tile Map Services (TMS), Web Feature Services (WFS) and GeoJSON data piped straight into your map.

I have found layers added via QMS to be much quicker than those added using OpenLayers, however some layers are a little less stable and sometimes all layers from the plugin refuse to work without restarting QGIS.

Verdict:

OpenLayers is steady and stable and can usually be relied upon to provide you with maps. QMS has a much larger range of maps available and serves them up lightning fast, great for backdrop maps when making animated maps with the TimeManager plugin.

Basically, have them both installed and use whichever suits your project!

Creating a Proportional Symbol map in QGIS 2.18

Creating proportional symbol maps in QGIS is made very easy in QGIS with two main methods for making them. You can use basic Single Symbol style with the  Size Assistant in the Data Defined Override,  or you can use the Graduated style and choose Size as the method of gradation. Below is a set of instructions on how to use either method to create proportional point symbols for your map.

The Data

  • Download the 1:10 million populated places (Simple) Shapefile from Natural Earth:
  • Add in the Stamen Toner Lite WMS using either the OpenLayers or QuickMapServices plugins. If you haven’t done that before, here is a quick guide:

Method 1: Graduated Symbols

This method works best when you want to use all the points in your dataset. QGIS allows you to vary the size of the data point based on the values in attributes of the data.

  • First, open the live layer styling menu by pressing F7.

Make sure the top menu is set to the Natural Earth Point data then change Single symbol to be Graduated.

There are now a few new options to play with:

  • Change Column to be pop_max
  • Change Method to Size
  • Change “Size from” to 3 and “to” to 20
  • Click the Classify button to see how this looks.

The map will automatically update to look like the map show below, zoomed in to the UK and Northwest France:

You have flexibility to change the number of classes and how you divide the classes, Equal Interval, Quantiles, Natural Breaks etc. You can also manually edit the classes by double click in the values column in the table.

Method 2: Data Defined Override

If you want a little more control over how the data is displayed this method allows you to quickly change maximum and minimum values without having to set each level in between.

  • First, open the live layer styling menu by pressing F7
  • Make sure the top menu is set to the Natural Earth Point data
  • Click on the Data Driven Override button  on Size

 

 

  • Click on the Size Assistant option at the bottom of the box.

You will now be looking at the Size Assistant dialog. The options here are very similar to using the method described above, allowing you to select the field to base the size on and having control over size of the points.

  • Set the Field to be POP_MAX
  • Set the Scale method to be Radius
  • Change the “Size from” to be 3 and “to” to be 20

As you can see in the example above the symbols automatically scale from the smallest to the largest values in the field selected. However where this method has a big advantage over the previous one you can set the upper limit to be different. The points will now automatically scale to this value without you having to manually update each range. This can be very useful if you are viewing only a portion of the data.

In the area we zoomed to in the previous method the largest cities are London and Paris, both having a population of below 10,000,000

  • Change the “Values from” to be 0 and “to10,000,000

You can now see int he map below there is a bigger range of point sizes than the previous method for the area of the map.

Blend Modes

A little added tip is to use the blend modes on your symbology, so you can see the basemap through the shapes and reveal the detail on any overlapping symbols:

  • In the Layer Rendering section of the style tab change the Layer blending mode to be Multiply. This will allow you to see the basemap through the points
  • Change the Feature blending mode to be Multiply. This will allow you to see overlapping points within the point dataset.

The Result: