Difference between revisions of "Calculating Street Intersection Density in QGIS"

From CUOSGwiki
Jump to navigationJump to search
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
 
===Purpose===
 
===Purpose===
Street intersection density is a useful measure of network connectivity. This tutorial will show how to calculate street intersection density using QGIS. The analysis of calculating street intersection density is commonly used in transportation design, to scope out the best walkability of neighbourhoods and bike paths. This tutorial aims to demonstrate how to use spatial analysis in understanding spatial patterns for urban accessibility while also learning how to use an open-source GIS software available for anyone. In the end, creating a map showing intersection density across a city. This is useful for people in urban planning and land use planning.
+
Street intersection density is a useful measure of network connectivity. This tutorial will show how to calculate street intersection density using QGIS. The analysis of calculating street intersection density is commonly used in transportation design, to scope out the best walkability of neighbourhoods and bike paths. This tutorial aims to demonstrate how to use spatial analysis in understanding spatial patterns for urban accessibility while also learning how to use an open-source GIS software available for anyone. In the end, creating a map showing intersection density across a city. This is useful especially for people in urban planning and land use planning.
   
For example, this tutorial will be calculating the street intersection density of the city of Ottawa.
+
For example, this tutorial will be calculating the street intersection density of the city of Ottawa.
   
 
===About QGIS===
 
===About QGIS===
QGIS (Quantum GIS) is a free and open-source GIS program released under the GNU General Public License. It has a wide variety of features that facilitate the display, analysis, and publishing of spatial data (QGIS, n.d.). In the context of this tutorial, vector data editing and creating grids will be demonstrated. QGIS is available for download on a variety of operating systems from Windows, Mac, Linux, BSD and mobile devices.
+
QGIS (Quantum GIS) is a free and open-source GIS program released under the GNU General Public License. It has a wide variety of features that facilitate the display, analysis, and publishing of spatial data <ref>QGIS: Defining what is QGIS https://www.qgis.org/en/site/about/index.html</ref>. In the context of this tutorial, vector data editing and creating grids will be demonstrated. QGIS is available for download on a variety of operating systems from Windows, Mac, Linux, BSD and mobile devices.
   
 
===''Note''===
 
===''Note''===
The QGIS version used here in this tutorial is 3.14 on a Windows operating system. When trying this tutorial, if you are using a previous or updated version of QGIS or on a different operating system, please keep in mind there may be differences in the figures and instructions used in this tutorial.
+
The QGIS version used here in this tutorial is 3.16 (the latest version as of December 2021) on a Windows operating system. When trying this tutorial, if you are using a previous or updated version of QGIS or on a different operating system, please keep in mind there may be differences in the figures and instructions shown in this tutorial.
   
 
==Getting Started==
 
==Getting Started==
Line 16: Line 16:
   
 
===Finding Data===
 
===Finding Data===
Data for this tutorial was found through the City of Ottawa's Open Data Website. [https://open.ottawa.ca/ HERE]
+
Data for this tutorial was found through the City of Ottawa's Open Data Website <ref>Open Ottawa: Data retrieval https://open.ottawa.ca/</ref>. [https://open.ottawa.ca/ HERE]
   
However, to acquire spatial data for use in QGIS for other cities there are many open data resources including Open Data Catalogues, Open City, etc. A simple Google search of the name of the city and the words “open data” next to it should give you at least a couple options.
+
However, to acquire spatial data for use in QGIS for other cities there are many open data resources including Open Data Catalogues, Open City, GeoHub etc. A simple Google search with the name of the city and the words “open data” next to it should give you at least a couple options.
   
 
Follow along into the next section to learn how to do this tutorial step by step.
 
Follow along into the next section to learn how to do this tutorial step by step.
Line 24: Line 24:
 
==Tutorial==
 
==Tutorial==
 
===Download Data===
 
===Download Data===
  +
[[File:OttawaWards.png|200px|thumb|right|Figure 1. Downloading Wards file from Open Ottawa.]]
===Clipping The Road Network to the City Boundary===
 
  +
The two datasets we will need are:
  +
: 1. The city boundary of Ottawa which can be found by searching '''Wards''' or click on this direct link [https://open.ottawa.ca/datasets/wards/explore?location=45.249481%2C-75.800844%2C1.72 HERE]. Download in Shapefile format (see Figure 1).
  +
  +
: 2. The road centerlines within the City of Ottawa can be found searching '''Centrelines''' or click on this direct link [https://open.ottawa.ca/datasets/road-centrelines/explore?location=45.245850%2C-75.794650%2C1.68 HERE]. Download in Shapefile format (same as downloading Wards file, see Figure 1 for reference).
  +
  +
Extract (unzip) both folders and save in the working directory you will be using.
  +
  +
===Extracting Road Intersections===
  +
The first step is to extract the road intersections.
  +
: 1. To begin, import both shapefiles into QGIS. Go to the '''Browser Panel''' (on the left of your new project screen) then navigate to where you stored the 2 shapefiles from your working directory. Drag and drop both shapefiles to the '''Layers''' panel.
  +
With these files, because of the algorithm, there are some intersections considered for each line segment as a valid intersection. While most intersection points are correct, there are some false positives. For analyzing street intersection density, we need to extract only the intersections when 2 or more streets intersect. To do this, we need to merge all adjacent road segments.
  +
: 2. Open the '''Processing Toolbox''' and locate '''Vector geometry''' then double click on '''Dissolve'''.
   
 
==Conclusion==
 
==Conclusion==

Revision as of 05:11, 25 December 2021

Introduction

Purpose

Street intersection density is a useful measure of network connectivity. This tutorial will show how to calculate street intersection density using QGIS. The analysis of calculating street intersection density is commonly used in transportation design, to scope out the best walkability of neighbourhoods and bike paths. This tutorial aims to demonstrate how to use spatial analysis in understanding spatial patterns for urban accessibility while also learning how to use an open-source GIS software available for anyone. In the end, creating a map showing intersection density across a city. This is useful especially for people in urban planning and land use planning.

For example, this tutorial will be calculating the street intersection density of the city of Ottawa.

About QGIS

QGIS (Quantum GIS) is a free and open-source GIS program released under the GNU General Public License. It has a wide variety of features that facilitate the display, analysis, and publishing of spatial data [1]. In the context of this tutorial, vector data editing and creating grids will be demonstrated. QGIS is available for download on a variety of operating systems from Windows, Mac, Linux, BSD and mobile devices.

Note

The QGIS version used here in this tutorial is 3.16 (the latest version as of December 2021) on a Windows operating system. When trying this tutorial, if you are using a previous or updated version of QGIS or on a different operating system, please keep in mind there may be differences in the figures and instructions shown in this tutorial.

Getting Started

Acquiring QGIS

To begin, download the latest version of QGIS on your operating system. QGIS is available for download on their website. HERE

Finding Data

Data for this tutorial was found through the City of Ottawa's Open Data Website [2]. HERE

However, to acquire spatial data for use in QGIS for other cities there are many open data resources including Open Data Catalogues, Open City, GeoHub etc. A simple Google search with the name of the city and the words “open data” next to it should give you at least a couple options.

Follow along into the next section to learn how to do this tutorial step by step.

Tutorial

Download Data

Figure 1. Downloading Wards file from Open Ottawa.

The two datasets we will need are:

1. The city boundary of Ottawa which can be found by searching Wards or click on this direct link HERE. Download in Shapefile format (see Figure 1).
2. The road centerlines within the City of Ottawa can be found searching Centrelines or click on this direct link HERE. Download in Shapefile format (same as downloading Wards file, see Figure 1 for reference).

Extract (unzip) both folders and save in the working directory you will be using.

Extracting Road Intersections

The first step is to extract the road intersections.

1. To begin, import both shapefiles into QGIS. Go to the Browser Panel (on the left of your new project screen) then navigate to where you stored the 2 shapefiles from your working directory. Drag and drop both shapefiles to the Layers panel.

With these files, because of the algorithm, there are some intersections considered for each line segment as a valid intersection. While most intersection points are correct, there are some false positives. For analyzing street intersection density, we need to extract only the intersections when 2 or more streets intersect. To do this, we need to merge all adjacent road segments.

2. Open the Processing Toolbox and locate Vector geometry then double click on Dissolve.

Conclusion

Resources

  1. QGIS: Defining what is QGIS https://www.qgis.org/en/site/about/index.html
  2. Open Ottawa: Data retrieval https://open.ottawa.ca/