Creating a Buffer Analysis in QGIS

From CUOSGwiki
Revision as of 17:53, 22 December 2021 by Benjamincolbourne (talk | contribs)
Jump to navigationJump to search

Buffer’s are a tool used to calculate the distance from an object or set of objects in an environment. In GIS, buffers are ideal for analysis’ that involve distance constraints. Some examples of these would be the proximity of an endangered species to urban development or tracking the extent of nuclear fallout. Buffers can be very versatile and are able to provide distances with both raster and vector data (points, lines, polygons) by creating polygons around your designated input features. Additionally, you can either use a fixed width buffer, such as the endangered species example provided above, or a variable width buffer, such as the nuclear fallout example where wind conditions may affect the extent of the area over time. There are countless buffer tools and methods spread across multiple GIS platforms such as ArcGIS Pro/Desktop, QGIS, Maptitude and many more that are all useful.

Purpose

The purpose of this demonstration is to show users a step-by-step process on how to use the QGIS plugin ‘multi-distance buffer’ in QGIS. This GIS procedure that will be demonstrated is a buffering/overlay tutorial which will show the minimum distance required for installing septic systems from various lakes in Quebec cottage country. The step-by-step process will cover how to download/install the software along with the data, the steps required to create the buffer(s) as well as composing the final map.

Software/Data

The goal of this demonstration is to utilize open-source software and data. Therefore, QGIS will be the software of choice given its versatility and range of buffering options as well as all data is retrieved from Open Canada

Software: This tutorial used QGIS 3.16.14 (long term release). You may use the latest version on QGIS for this demonstration. However, given the Multi-distance buffer plugin that we will be using is not native to the software, you may encounter difficulties in future software releases.

Data:

Once QGIS is installed and all data is downloaded, extract (unzip) your data into the folder you wish to use as your directory.

Methodology

The goal for this demonstration is to find a set of lakes in Quebec cottage country where you would want to construct a cottage or house that would require a septic system. Septic systems in Quebec must have a minimum distance of 15m from the edge of a Lake, watercourse, swamp or pond. This is stated under section 7.2 of Regulation respecting wastewater disposal systems for isolated dwellings by LegisQuebec. With this information in mind, we will create two buffers. One that is 15m from the edge of the lake (assuming this is the high-water mark) and another that is 100m from the lake (which has randomly been chosen to demonstrate the capabilities of the multi-distance buffer). After both buffers have been completed, a map with proper labeling will be created as a final product.

Process

Import Data

Import the data into QGIS under Layer → Add Layer → Add Vector Layer or by finding your directory under your Browser panel. Once all four layers have been loaded, re-name them as you wish for easier identification down the road. For example ghy_000c11a_e to LakesRivers.


Figure 4. Layers loaded and renamed in QGIS


Reproject

Next, we will fix the projection so that the boundaries look nicer and that the project’s units are in metres. Under the Vector tab → Data Management ToolsReproject layer select the ‘Run as Batch Process…’ button at the bottom left of the window.


Figure 2. Reproject layer: Run as batch process


Once the new window has been opened, select AutofillSelect From Open Layers. A new window will pop up: click Select All then click OK. Set the target CRS to WGS 84 [4978].


Figure 3. Reproject batch process environment


Once the CRS is set, click the three dots → name as 'reprojected' and save the files in your working directory. Under Autofill Settings select Fill with parameter values under Autofill mode and Input under Parameter to use. Check off the ‘load layers on completion’ box at the bottom left then click Run.

Note: It is important to make sure your new layers are created in compliance with how your operating system saves its files. i.e., no special characters or spaces etc. Additionally, you may encounter a ‘?’ beside each one of your layers indicating the layer has not been assigned a CRS. If this is the case, click on the ‘?’ and assign the CRS to the same projection as you have just performed (i.e., WGS 84 [4978]. Additionally click the CRS button at the bottom right corner of QGIS (little globe) and make sure it is set to WGS 84 [4978].

Figure 4. Example of what your QGIS environment should look like so far


Install the Plugin

Under PluginsManage and Install Plugins… search for ‘Multi-distance buffer’ and click install.

Figure 5. Showing the Multi-distance buffer from the QGIS plugin menu


Fix Invalid Geometries

In this section we will fix some invalid geometries as there are some issues with the reprojectedLakesRivers layer where the geometries are not aligned.

In your Processing Toolbox search for Check Validity open up the tool. Select your lakes and rivers layer under Input Layer and keep all of the original settings the same.

Figure 6. Correct settings for the Check Validity tool


Figure 7. Red dots represent all of the polygons that require altering using the Validity

Next, under your Processing Toolbox, search for the Fix Geometries and open the tool. Select your lakes and rivers layer under Input Layer and make sure you save the file to your working directory. Click Run.

Figure 8. Example of the correct selections for the Fix Geometries tool

Clip

This next section will show how to clip your various layers into the designated study area you wish to do your buffer analysis. Important note: it is NOT necessary to do section 4.5.1 as it is only necessary for less powerful workstations that would have trouble loading all the lakes while panning and zooming through the map. Again, it should be noted that this demonstration works on any polygon of your choosing, therefore you do not have to select the same lakes that will be subsequently shown.

Province Clip

Right-click your Provinces and Territories layer and select Filter, this will open up your Query Builder.

Figure 9. Query Builder used to select the Province of Quebec

To select only the province of Quebec, in the query builder, input the following query: “PRENAME” = ‘Quebec’. Click OK. Now only the province of Quebec should be visible in your view.

Figure 10. Example of your environment from correct use of the query builder

Next, we will clip all four layers to the extent of the province of Quebec. To do this, under the Processing Toolbox, search for the Clip tool, right-click and select ‘Run as Batch Process’. Under input layer, click AutofillSelect From Open Layers, a new window will pop up: click Select All then click OK. Next, click the three dots → name as 'clipped' and save the files in your working directory. Under Autofill Settings select Fill with parameter values under Autofill mode and Input under Parameter to use. Check off the ‘load layers on completion’ box at the bottom left then click Run


Figure 11. View of Quebec, Canada


Study Area

Buffer

Dissolve

Multi-Distance Buffer

Buffer Roads/Overlay

Categorize

Map