Difference between revisions of "Site suitability using SAGA GIS"

From CUOSGwiki
Jump to navigationJump to search
 
(31 intermediate revisions by one other user not shown)
Line 3: Line 3:
   
 
== Introduction ==
 
== Introduction ==
Wind energy refers to the process of creating electricity using the wind, or air flows that occur naturally in the earth's atmosphere. Modern wind turbines are used to capture kinetic energy from the wind and generate electricity. A collection of wind turbines is deemed a wind farm. Wind farms are best placed in locations that are near costal areas, or in open plains. Canada has [[https://en.wikipedia.org/wiki/List_of_wind_farms_in_Canada 36]] wind farms, with the majority being in Quebec and Ontario. What happens if we want to create a new wind farm somewhere? What are the factors we should be taking into consideration?
+
Wind energy refers to the process of creating electricity using the wind, or air flows that occur naturally in the earth's atmosphere. Modern wind turbines are used to capture kinetic energy from the wind and generate electricity. A collection of wind turbines is deemed a wind farm. Wind farms are best placed in locations that are near costal areas, or in open plains. Canada has [https://en.wikipedia.org/wiki/List_of_wind_farms_in_Canada 36] wind farms, with the majority being in Quebec and Ontario. What happens if we want to create a new wind farm somewhere? What are the factors we should be taking into consideration?
   
   
In this tutorial you will be given instructions to conduct a MCE in order to best determine the location of a wind farm in the region of Southern Manitoba bordering Saskatchewan.
+
In this tutorial you will be given instructions to conduct a MCE in order to best determine the location of a wind farm in the region of Southern Manitoba bordering Saskatchewan.
   
 
== Data ==
 
== Data ==
Line 12: Line 12:
   
 
== Software required (SAGA GIS and QGIS) ==
 
== Software required (SAGA GIS and QGIS) ==
System for Automated Geoscientific Analyses, also known as [http://www.saga-gis.org/en/index.html SAGA], is a great free and open source software (FOSS GIS tool). SAGA is great tool that offers users a comprehensive and growing set of geoscientific methods and modules that allow for manipulating and analyzing vector or raster data. SAGA also allows for users to script in commands using its Command Line Interpreter (CMD). Despite being not very user friendly, the CMD has the advantage that it can be executed from batch script files, which in turn enables a further automation of complex work flows and the routine processing of mass data. QGIS is available for Windows and Linux. Download the latest version of [https://sourceforge.net/projects/saga-gis/files/SAGA%20-%207/ SAGA (v.7.9.0)] to begin this tutorial.
+
System for Automated Geoscientific Analyses, also known as [http://www.saga-gis.org/en/index.html SAGA], is a great free and open source software package (FOSS GIS tool). It offers users a comprehensive and growing set of geoscientific methods and modules that allow for manipulating and analyzing vector or raster data. SAGA also allows for users to script in commands using its Command Line Interpreter (CMD). Despite being not very user friendly, the CMD has the advantage that it can be executed from batch script files, which in turn enables a further automation of complex work flows and the routine processing of mass data. QGIS is available for Windows and Linux.
   
  +
Download the latest version of [https://sourceforge.net/projects/saga-gis/files/SAGA%20-%207/ SAGA (v.7.9.0)] to begin this tutorial.
   
Additionally, you should also have [https://www.qgis.org/en/site/forusers/download.html QGIS (v.3.14)] installed as it is required in the very preliminary steps to make the data easier to work with.
+
Additionally, you should also have [https://www.qgis.org/en/site/forusers/download.html QGIS (v.3.14)] installed as it is required in the very preliminary steps to make the data easier to work with.
   
 
== Tutorial ==
 
== Tutorial ==
 
Now that you have downloaded the software and shapefiles, it is time to begin.
 
Now that you have downloaded the software and shapefiles, it is time to begin.
 
   
 
=== Preparing the Data ===
 
=== Preparing the Data ===
 
Open QGIS and go to the '''Layer''' menu -> '''Add Layer''' -> '''Add Vector Layer'''. In the pop-up window, set your source type as '''File''' and click the '''Browse''' button under the '''Source''' header. Browse to where your shapefile is and double-click it or highlight it and select '''Open'''.
 
Open QGIS and go to the '''Layer''' menu -> '''Add Layer''' -> '''Add Vector Layer'''. In the pop-up window, set your source type as '''File''' and click the '''Browse''' button under the '''Source''' header. Browse to where your shapefile is and double-click it or highlight it and select '''Open'''.
   
  +
Upon opening the shapefile for the Virden region, proceed to right click the layer in the '''Layers''' window and click '''Open Attribute Table'''. Following this, click the '''Select/filter features using form''' button. On the far right of the window, beside the '''CLASSNAME''' field change the '''Excludes Field''' to '''Contains'''. Following this, in the field, type in '''agri''' and click the '''Select Features''' button at the bottom of the window. Doing so will highlight all the Agricultural and Agri - Forage Fields in the shapefile.
insert photo
 
  +
  +
[[File:Filter for selecting features.png|500px|thumb|none|Selecting features by using the filter option in the attribute table]]
  +
  +
  +
Close the attribute table and again right click the layer in the '''Layers''' window. This time click '''Export''' and select ''' Save Selected Features As'''. This will open a new window. Enter the file name of your choosing and set the format to '''Esri Shapefile''', then click '''OK'''. Doing so will create a new shapefile. In our case, it was called '''Agriculture'''.
  +
[[File:Save selected features as.png|500px|thumb|none|Saving selected features as a new shapefile]]
   
Upon opening the shapefile for the Virden region, proceed to right click the layer in the '''Layers''' window and click '''Open Attribute Table'''. Following this, click the '''Select/filter features using form''' button. On the far right of the window, beside the '''CLASSNAME''' field change the '''Excludes Field''' to '''Contains'''. Following this, in the field, type in '''agri''' and click the '''Select Features''' button at the bottom of the window. Doing so will highlight all the Agricultural and Agri - Forage Fields in the shapefile. Close the attribute table and again right click the layer in the '''Layers''' window. This time click '''Export''' and select ''' Save Selected Features As'''. This will open a new window. Enter the file name of your choosing and set the format to '''Esri Shapefile''', then click '''OK'''. Doing so will create a new shapefile. In our case, it was called '''Agriculture'''. Click the '''Deselect Features from All Layers''' button in the toolbar at the top, and then repeat the process again for all other classes in the original shapefile.
 
   
  +
Click the '''Deselect Features from All Layers''' button in the toolbar at the top, and then repeat the process again for all other classes in the original shapefile.
[[File:ProjectProperties.png|650px|thumb|none|Selecting NAD83 in the CRS Projection menu (QGIS 3.14)]]
 
   
   
Line 34: Line 39:
 
Launch SAGA and in the '''Data Sources''' window navigate to where your newly create shapefiles for all the different classes and the Virden City shapefiles are located. Clicking a file will automatically add it to the '''Manager Window''' under the '''Data''' tab. Do this for every shapefile.
 
Launch SAGA and in the '''Data Sources''' window navigate to where your newly create shapefiles for all the different classes and the Virden City shapefiles are located. Clicking a file will automatically add it to the '''Manager Window''' under the '''Data''' tab. Do this for every shapefile.
   
[[File:SetVectorDirectory.png|650px|thumb|none|Choosing your source location]]
+
[[File:Shapefiles in SAGA.png|300px|thumb|none|The manager window with the Data tab open showcasing all the added shapefiles]]
   
 
How SAGA works is that files can in the '''Data''' tab can be added to the '''Maps''' tab by simply right clicking the file and selecting '''Add to Map'''. If this is the first file you are doing this with, it will automatically create a new map with the name of the given file. For subsequent files, it will prompt you on which map you wish to add your chosen shapefile to.
 
How SAGA works is that files can in the '''Data''' tab can be added to the '''Maps''' tab by simply right clicking the file and selecting '''Add to Map'''. If this is the first file you are doing this with, it will automatically create a new map with the name of the given file. For subsequent files, it will prompt you on which map you wish to add your chosen shapefile to.
   
  +
[[File:Adding shapefiles to map in SAGA.png|400px|thumb|none|The process of adding shapefiles to a map in SAGA]]
Insert photo of adding to map
 
   
   
Line 46: Line 51:
 
In order to define the project area first click the '''Tools''' tab, then click '''Shapes''' -> '''Tools''' -> '''Create New Shapes Layer'''. This will open a window as seen below
 
In order to define the project area first click the '''Tools''' tab, then click '''Shapes''' -> '''Tools''' -> '''Create New Shapes Layer'''. This will open a window as seen below
   
  +
[[File:Create new shapes layer.png|250px|thumb|none|Creating a new Shapes Layer]]
insert photo
 
   
 
Enter the name you wish and change the '''Shape Type''' to '''Polygon''', then hit '''Execute'''.
 
Enter the name you wish and change the '''Shape Type''' to '''Polygon''', then hit '''Execute'''.
  +
To create a new grid system, in the '''Tools''' tab, click '''Grid''' -> '''Tools''' -> '''Create Grid System'''. In the window that opens, change the '''Cell Size''' to 30, the '''Initialization Value''' to 1 and the '''Extent Definition''' to '''One or more shapes layers'''. In the '''>> Shapes Layers''' field, input the polygon that you created. This will create a new grid definition with the value:
 
  +
Once this new shape is created, add it to a map along with the other shapefiles we imported in the previous step. Note that because the shapefile has no actual shape to it, we must create one.
  +
  +
Begin by clicking the shapefile in the Map Tab, and then select the mouse button in the toolbar on the top of the screen ([[File:Mouse.png|20px|frameless|]]). Then click on the map itself to bring up a menu. Select '''Add Part''' and then begin to trace the outline of the completed shapefiles like below:
  +
  +
[[File:Addshape to map projection layer.png|500px|thumb|none|Creating a new shape in the MapProjectionLayer]]
  +
  +
  +
  +
[[File:Tracing.png|500px|thumb|none|Tracing the boundaries of the Land Used shapefiles]]
  +
  +
Once completed, the Layer will have a new instance, with the ID of 0. This will be used to create the grid system that will host the other grids we make in the next few steps.
  +
  +
To create a new grid system, in the '''Tools''' tab, click '''Grid''' -> '''Tools''' -> '''Create Grid System'''. In the window that opens, change the '''Cell Size''' to 30, the '''Initialization Value''' to 1 and the '''Extent Definition''' to '''One or more shapes layers'''. In the '''>> Shapes Layers''' field, input the polygon that you created.
  +
  +
[[File:Creating grid system.png|300px|thumb|none|Creating a grid system using a shape layer]]
  +
  +
  +
This will create a new grid definition with a value similar to: "30; 3647x 3868y; 321532.093525x 5427575.539568y"
   
   
Line 55: Line 78:
   
 
=== Creating Constraints ===
 
=== Creating Constraints ===
The next step in the MCE, and something that is important to think about is where do we not want our wind farm to be located? Ideally it should be in a location that is far from civilization and is on dry land and away from water bodies. This is what would be considered a constraint. In order to determine the best location for our future wind farm, we must create constraints for urban areas and water bodies.
+
The next step in the MCE, and something that is important to think about is where do we not want our wind farm to be located? Ideally it should be in a location that is far from civilization, is on dry land, away from forests and away from water bodies. This is what would be considered a constraint. In order to determine the best location for our future wind farm, we must create constraints for forested + urban areas and water bodies + wetlands.
  +
   
==== Water Constraint ====
 
 
In order to build our constraint, we must first transform our shapefiles into grids by navigating to '''Grid''' -> '''Gridding''' -> '''Shapes to Grid''' and using the following settings:
 
In order to build our constraint, we must first transform our shapefiles into grids by navigating to '''Grid''' -> '''Gridding''' -> '''Shapes to Grid''' and using the following settings:
   
- For '''>>Shapes''' input your desire shapefile.
+
- For '''>>Shapes''' input your desire shapefile (in our case it is our waterbodies shapefile)
 
- For '''Attribute''' select '''ID''' if it is not chosen.
 
- For '''Attribute''' select '''ID''' if it is not chosen.
 
- For '''Output Values''' select '''data/no-data'''.
 
- For '''Output Values''' select '''data/no-data'''.
Line 68: Line 91:
 
- Hit '''Execute'''
 
- Hit '''Execute'''
   
  +
[[File:Shapes to grid.png|350px|thumb|none|Shapes to grid settings]]
   
   
  +
Repeat the above for the wetlands shapefile as well.
The selected points that are now highlighted can be saved as their own shapefile. To do this, right click on the accidents layer, mouse over '''Export''', then select '''Save Selected Features As''' and a window will appear.
 
   
  +
The above steps results in all water bodies and wetlands grid cells being assigned a value of 1 with all non-water grid cells that contain no-data being assigned a data value of 0.
[[File:CreatingNewLayerViaSelected.png|650px|thumb|none|OPtions to choose to create a new layer using selected features.]]
 
   
  +
In this window, the format that the shapefile should be saved under is "ESRI Shapefile". Additionally, you will be given the option to set the CRS of the shapefile you are about to create. Set the CRS to the Project CRS, in this case it will be '''Project CRS: ESPG:2951 - NAD83(CSRS)/MTM zone 9'''. Name the file what you please, and then click '''OK'''. Doing so will create and save the shapefile in the location/folder where the Map Project is saved.
 
  +
Once you have created your grids for both wetlands and water bodies, they must be combined into a single grid map. Navigate to '''Grid''' -> '''Calculus''' -> '''Grid Calculator''' and use the following settings:
   
  +
- For '''>Grids''' enter the grids for both wetlands and water bodies
[[File:SaveVectorLayerAsWindow1.png|650px|thumb|none|Choosing the CRS of the file and the Format]]
 
  +
- For '''<<Result''' leave as '''<create>'''
  +
- For '''Formula''' enter '''g1+g2'''
  +
- Check the '''Use NoData''' box
  +
- Hit '''Execute'''
  +
- Right click the newly created grid and rename it to something of your liking
   
  +
[[File:Grid calculator (wetland+waterbodies).png|350px|thumb|none|Grid Calculator settings]]
Repeat both the '''Editing Attribute Tables: Selecting by Expression''' and '''Saving Selected Points (Shapefile)''' steps until all the impact types have been saved as their own individual shapefiles.
 
   
   
[[File:WhatItShouldLookLike.png|650px|thumb|none|Map of Ottawa region, with accidents categorized by type. Wards of Ottawa converted to grayscale to better emphasize difference in accident types.]]
 
   
  +
Upon creating this new grid map, it must be reclassified. Navigate to '''Grid''' -> '''Tools''' -> '''Reclassify Grid Values''' and use the following settings:
=== Selecting a Specific Area ===
 
To select a specific area, open the attribute table for the Wards shapefile layer. Click on the '''Select features using an expression''' ([[File:Screenshot 2020-10-03 211358.png|frameless|link=]]) button.
 
   
  +
- For '''Method''' select range
The '''Select By Expression''' window will appear, and in the function list, expand the '''Fields and Values''' and select the specific area you want to study. In our case, Barrhaven is the chosen site. In order to select only Barrhaven, we can use a number of different options for the expression: ''' "WARD_EN" = 'BARRHAVEN' ''', ''' "WARD_NAME_" = 'Barrhaven' ''', ''' "WARD_NAM_1" = 'Barrhaven' ''', ''' "DESCRIPTIO" = 'BARRHAVEN - Jan Harder' '''. Any of them do the job.
 
  +
- For '''Minimum Value''' input '''1.0'''
  +
- For '''Maximum Value''' input '''2.0'''
  +
- For '''New Value''' input '''1.0'''
  +
- For '''Operator''' select '''<='''
  +
- Deselect '''NoData Values''' and '''Other Values'''
  +
- For ''' Data Storage Type''' select '''[same as input grid]'''
  +
- For '''No Data Value''' under the Output Grid options, leave as '''No Data Value of Input Grid'''
   
  +
[[File:Reclassify grid values (wetland+water).png|350px|thumb|none|Reclassify settings]]
If we were tasked with selecting more than one ward at a time, our expression would look something like: ''' "WARD_EN" = 'BARRHAVEN' OR "WARD_EN" = 'CUMBERLAND' '''. Once the wards you want are selected, save and create shapefiles for the selected layers as described in the '''Saving Selected Points (Shapefile)''' section.
 
   
[[File:Barrhaven1.png|650px|thumb|none|Barrhaven Ward highlighted; selected via Select by Expression]]
 
   
=== Clipping Files ===
 
When the newly merged shapefile has been made, you can simply clip all of the other information (accidents, roads, railways, pedestrian paths) onto the study area as well. To do this, go to the '''Vector Menu''', select '''Geoprocessing Tools''' and then select '''Clip'''.
 
   
  +
Once our grid has been reclassified, we must then create a buffer area around our new water gird features. To do this navigate to '''Grid''' -> '''Tools''' -> '''Grid Buffer''' and use the following settings:
[[File:VectorMenu.png|400px|thumb|none]]
 
   
  +
- For '''>> Features''' choose your the reclassified grid you created in the previous step
A clip window will appear and the input vector layer will be what shapefile you want to clip onto the output vector layer. For example, in order to clip all the Side Swipe Accidents that occurred in the Barrhaven area, the input vector layer should be '''Side Swipe Accidents''' and the overlay layer would be the '''Barrhaven''' shapefile that was created in the previous selection. For output shapefile, you can browse to the folder that contains all of your other shapefiles and choose a name for your clipped file.
 
  +
- For '''<< Buffer''' leave as '''<create>'''
  +
- For '''Type''' select '''Fixed'''
  +
- For '''Distance''' input a value of your choosing. The value chosen is presented in feet. Knowing this we chose a value of 250. If cell is to be chosen instead of fixed, then the value entered is the number of cells wide you wish for the buffer to be.
   
[[File:Clip Window.png|650px|thumb|none|Clip Window]]
+
[[File:Grid buffer(wetland+water).png|350px|thumb|none|Grid buffer settings]]
   
When clipping the other shapefiles, the overlay layer remains the same, but the input vector layer changes. Proceed to clip all the other vector layers as done above, and format them to the style of your liking. Once completed, you should have a map similar to something below.
 
   
[[File:BarrhavenClip.png|650px|thumb|none|Example of a completed Barrhaven, with all required layers clipped to it.]]
 
   
  +
After creating our buffer, we must reclassify the grid once more to finally have our Water + Wetlands Constraint. Once again navigate to '''Grid''' -> '''Tools''' -> '''Reclassify Grid Values''' and use the following settings:
   
  +
- For '''Method''' select '''Simple Table'''
=== Analyzing the Data ===
 
  +
- In the '''Lookup Table''' that appears, use the following settings:
  +
- For Row 1, Minimum = 0.0, Maximum = 0.0, New = 1.0
  +
- For Row 2, Minimum = 1.0, Maximum = 2.0, New = 0.0
  +
- For '''Operator''' select '''min <= value <= max'''
  +
- Leave '''NoData Values''' and '''Other Values''' unchecked
  +
- For ''' Data Storage Type''' select '''[same as input grid]'''
  +
- For '''No Data Value''' under the Output Grid options, leave as '''No Data Value of Input Grid'''
   
  +
[[File:Lookuptable (wetland+water).png|350px|thumb|none|Reclassification via lookup table settings]]
In order to determine how many of each accident type has occurred, one can right click the layer in the '''Layers''' menu on the bottom left of the display, and can "check" the '''Show Features Count''', which then displays the number of occurrences for the layer beside the layer name.
 
   
[[File:ShowFeaturesCount.png|650px|thumb|none|]]
 
   
   
  +
Once completed you should have something that looks similar to this:
[[File:FeatureCount.png|frameless|none]]
 
   
  +
[[File:Areas in blue = suitable (wetland+water).png|500px|thumb|none|Reclassified map of waterbodies and wetland constraint]]
   
  +
As we can seen in the photo, all the areas that are in blue are areas that are outside the buffer range and can be considered areas that are viable for a windfarm.
Lets say that we wanted to determine how many Rear End accidents occurred near Local roads, we would first create a buffer around the clipped rear end accidents shapefile. To do so you select '''Vector''' -> '''Geoprocessing Tools''' -> '''Buffer'''. In this example, a buffer distance of 25m was used and the segments to approximate value was 25. The created file will be temporary, which we can then later save if desired.
 
   
[[File:BufferWindow.png|650px|thumb|none]]
 
   
  +
Repeat all the steps above for the Forests and Urban shapefiles to create a constraint for Forests and Urban areas. The result should look similar to below:
Once we have the desired buffer for the desired accident type, we can then filter and use the '''Select by Expression''' option in the attribute table of the clipped Roads shapefile to filter and select the roads whose ''' "SUBCLASS" = 'LOCAL' '''. Once this is completed, the local roads will be highlighted in yellow on your screen.
 
   
  +
[[File:Areas in green = suitable (forest + urban).png|500px|thumb|none|Reclassified map of forested and urban areas constraint]]
With these two steps completed, we then use the intersection tool found by selecting '''Vector''' -> '''Geoprocessing Tools''' -> '''Intersection'''. Our input layer will be the clipped Road shapefile with the '''"Selected features only"''' button checked, and the overlay layer being our temporary Buffered shapefile that we created in the first step of this section.
 
   
[[File:IntersectionWindow.png|650px|thumb|none]]
 
   
This will again create a temporary shapefile. Once created we can again determine the count of the new shapefile, which in turn tells us how many Rear end accidents occurred within 25 meters of a local road. In this case, 36.
 
   
  +
=== Using Boolean Aggregation to Create a Site Suitability Map ===
[[File:IntersectionCount.png|frameless|none]]
 
  +
After we have created buffers for both the water + wetlands, and the forested + urban areas, we can proceed to creating our site suitability map. In this method, we will be using a Boolean aggregation approach, which is different from the weighted measures approach that is often seen in tools such as [https://clarklabs.org/terrset/ TerrSet] software.
   
  +
The Boolean aggregation approach takes all criteria from grid maps that contain 1s and 0s and allows them to be easily aggregated into a final solution using basic Boolean algebra. The tool that we will be using is the '''Grid Calculator''' which can be found by navigation to '''Grid''' -> '''Calculus''' -> '''Grid Calculator'''.
   
  +
Once the tool is open, we must add in all of our constraint grids and all the areas we believe are suitable for the building of a wind farm, which in our case are the grasslands and the agricultural field grids we created at the beginning of the tutorial. Use the following settings to create the site suitability map:
Using these methods, you can perform a multitude of operations to interpret things such as how many accidents occur within a distance from pedestrian pathways, how many accidents occur within a ward, how many accidents occur within a distance from railways, how many of a certain accident type occur within a distance from other accident types etc.
 
   
  +
- For '''> Grids''' choose your water + wetland constraint grid, your forested + urban constraint grid, your agricultural fields grid and your grassland grid.
  +
- For '''<< Result''' leave as '''<create>'''
  +
- Leave '''> Grids from Different System''' as default
  +
- For '''Formula''' enter '''g1*g2*g3*g4'''
  +
- Enter a name of your choosing in the '''Name''' field
  +
- Leave '''Take Formula''' and '''Use No-Data''' unchecked
  +
- Set '''Data Type''' to '''4 byte floating point number'''
  +
- Hit '''Execute'''
   
  +
[[File:Settings to create site suitability map (grid calculator).png|350px|thumb|none|Settings for grid calculator to create a site suitability map]]
=== Making a Map ===
 
   
Once we have produced the data that we want to showcase, we can use QGIS to make an aesthetically pleasing map. First, turn on all of the layers that you would like to be showcased and turn off all others by selecting and unselecting the checkbox next to each layer name. I want to showcase different types of accidents that occur within Barrhaven so I have selected these layers:
 
   
[[File:LayersTurnedOn.png|300px|thumb|none|All of the wanted layers that I wish to add to the map are selected.]]
 
   
  +
The result should be something similar to below:
Select '''Project''' -> '''New Printer Composer''' and then type a name for your map in the text box and select '''OK''' (it does not have to be the same as the title you place on your final map). In the pop-up window, select '''Layout''' -> '''Add Map''' ([[File:AddMap.png|frameless]]) and then draw a rectangle on your canvas where you would like your map. To reposition your map display, select '''Layout''' -> '''Move Content'''. Now you can drag your map into place and zoom in and out. Under the '''Item Properties''' tab on the right hand side, you can also change the scale to get the perfect sizing.
 
   
[[File:ItemProperties.png|300px|thumb|none|Changing the scale.]]
+
[[File:Site suitability map.png|500px|thumb|none|Site suitability map created using constraints and factors]]
   
To add a title, select '''Layout'''-> '''Add Label''' and draw a box for your title. Under '''Item Properties''' -> '''Label''' you can type your title in the textbox and change the font type, size, colour etc.
 
   
To add a north arrow, select '''Layout''' -> '''Add Image''' and draw a box on your canvas. Under Item Properties -> Search directories you can view different North Arrows and choose which one you would like to use.
 
   
  +
Areas in red are the areas that are deemed to be suitable for building of a windfarm.
[[File:Northarrow.PNG|300px|thumb|none|Choosing a north arrow]]
 
   
Similarly, you can add a scale bar by selecting '''Layout''' -> '''Add Scalebar'''.
 
   
  +
The output map has the value 1 where all areas of suitability intersect for all criteria and the value 0 for all areas that are unsuitable for one or more of the criteria. Suitability in one criterion cannot compensate for a lack of suitability in any other layer. They do not trade off. By meeting all criteria, the result is the best locations possible for the building of a wind farm.
To add a legend select '''Layout''' -> '''Add Legend'''. In the Item Properties tab, there is a '''Legend Items''' menu. Here you can adjust which layers you wish to add to your legend. Should you have multiple layers that you don't wish to add, you can uncheck the "Auto Update" box, which will then allow you to freely remove legend entries. To rename legend items, double click a legend item and enter the text you want displayed. You can also rearrange legend items by dragging them up and down, or using the up and down arrow
 
([[File:LegendControls.png|frameless]]) buttons underneath the list of legend entries.
 
   
Once you are happy with your map, you can export it as an image, SVG or PDF by selecting '''Composer''' from the top left hand menu and choosing either '''Export as Image, Export as SVG or Export as PDF'''. Here is an example of a completed map of Barrhaven that indicates locations of different types of traffic accidents from 2018.
 
 
[[File:Final Map.png|650px|thumb|none|Different Types of Car Accidents that Occurred in Barrhaven in 2018]]
 
   
 
== Conclusion ==
 
== Conclusion ==
  +
SAGA when used with its GUI is a user-friendly software that provides users with many different tools and modules that aid in geoscientific analysis. In this tutorial SAGA was used to produce a site suitability map for the location of a wind farm in the Southern region of Manitoba bordering against Saskatchewan using the Boolean aggregation method. While straightforward, the method does not allow for any trade offs in the suitability of criterions. A weighted linear combination method is likely also possible to be completed using tools such as ''Fuzzify''.
QGIS is an intuitive and user-friendly software that in this instance has allowed the production of a map that showcases traffic accidents in the Barrhaven ward of Ottawa as well as allowed the user to analyze different scenarios. This is just an example of the many ways that a few shapefiles can be combined to produce a multitude of useful and easily understood data
 
  +
   
 
== References ==
 
== References ==
   
*City of Ottawa. (2020). OpenData Ottawa | City of Ottawa. Retrieved October 6, 2020, From City of Ottawa: http://data.ottawa.ca/
+
*Province of Manitoba. Manitoba Land Initiative | Core Maps - Data Warehouse | Digital Topographic Maps. Retrieved December 5, 2020, from Province of Manitoba: http://mli2.gov.mb.ca/t20k/topo062f.html
 
*City of Ottawa. (2014). Safer Roads Ottawa Program | City of Ottawa. Retrieved December 20, 2014, from City of Ottawa: http://ottawa.ca/en/residents/transportation-and-parking/safer-roads-ottawa-program
 
 
*City of Ottawa. (2014). Safety Improvement Program | City of Ottawa. Retrieved December 20, 2014, from City of Ottawa: http://ottawa.ca/en/residents/transportation-and-parking/road-safety/safety-improvement-program
 
   
*MacOdrum Library. (2014). Maps, Data and Government Information Centre | MacOdrum Library. Retrieved December 19, 2014, from MacOdrum Library: https://www.library.carleton.ca/contact/service-points/maps-data-and-government-information-centre
+
*Province of Manitoba. Manitoba Land Initiative | Core Maps - Data Warehouse | Land Use / Land Cover. Retrieved December 5, 2020, from Province of Manitoba: http://mli2.gov.mb.ca/landuse/index.html
   
*QGIS. (2014). Discover QGIS. Retrieved December 20, 2014, from QGIS: http://www.qgis.org/en/site/about/index.html
+
*SAGA. Discover SAGA. Retrieved December 5, 2014, from SAGA: http://www.saga-gis.org/en/index.html
   
*QGIS. (2014). Download QGIS. Retrieved December 20, 2014, from QGIS: http://www.qgis.org/en/site/forusers/download.html
+
*SAGA. Download SAGA. Retrieved December 5, 2020, from QGIS: https://sourceforge.net/projects/saga-gis/files/SAGA%20-%207/

Latest revision as of 11:20, 13 January 2021

Purpose

The purpose of this tutorial is to explain and show users how to perform a multi criterion analysis (MCE) on a dataset of their choosing using SAGA GIS. The example chosen in this tutorial is the production of a site suitability map to determine the best location for a windfarm in southern Manitoba.

Introduction

Wind energy refers to the process of creating electricity using the wind, or air flows that occur naturally in the earth's atmosphere. Modern wind turbines are used to capture kinetic energy from the wind and generate electricity. A collection of wind turbines is deemed a wind farm. Wind farms are best placed in locations that are near costal areas, or in open plains. Canada has 36 wind farms, with the majority being in Quebec and Ontario. What happens if we want to create a new wind farm somewhere? What are the factors we should be taking into consideration?


In this tutorial you will be given instructions to conduct a MCE in order to best determine the location of a wind farm in the region of Southern Manitoba bordering Saskatchewan.

Data

The data used in this tutorial is available through the Government of Manitoba's Land Initiative Website. The files used in this tutorial are a polygon shapefile of the Virden Region from 2006 and a shapefile of the City of Virden which includes buildings, utility lines, etc. To get ready for this tutorial, you should download all of these shapefiles and keep them in a working folder on your PC to make your work easier to locate.

Software required (SAGA GIS and QGIS)

System for Automated Geoscientific Analyses, also known as SAGA, is a great free and open source software package (FOSS GIS tool). It offers users a comprehensive and growing set of geoscientific methods and modules that allow for manipulating and analyzing vector or raster data. SAGA also allows for users to script in commands using its Command Line Interpreter (CMD). Despite being not very user friendly, the CMD has the advantage that it can be executed from batch script files, which in turn enables a further automation of complex work flows and the routine processing of mass data. QGIS is available for Windows and Linux.

Download the latest version of SAGA (v.7.9.0) to begin this tutorial.

Additionally, you should also have QGIS (v.3.14) installed as it is required in the very preliminary steps to make the data easier to work with.

Tutorial

Now that you have downloaded the software and shapefiles, it is time to begin.

Preparing the Data

Open QGIS and go to the Layer menu -> Add Layer -> Add Vector Layer. In the pop-up window, set your source type as File and click the Browse button under the Source header. Browse to where your shapefile is and double-click it or highlight it and select Open.

Upon opening the shapefile for the Virden region, proceed to right click the layer in the Layers window and click Open Attribute Table. Following this, click the Select/filter features using form button. On the far right of the window, beside the CLASSNAME field change the Excludes Field to Contains. Following this, in the field, type in agri and click the Select Features button at the bottom of the window. Doing so will highlight all the Agricultural and Agri - Forage Fields in the shapefile.

Selecting features by using the filter option in the attribute table


Close the attribute table and again right click the layer in the Layers window. This time click Export and select Save Selected Features As. This will open a new window. Enter the file name of your choosing and set the format to Esri Shapefile, then click OK. Doing so will create a new shapefile. In our case, it was called Agriculture.

Saving selected features as a new shapefile


Click the Deselect Features from All Layers button in the toolbar at the top, and then repeat the process again for all other classes in the original shapefile.


Adding Shapefiles into SAGA

Launch SAGA and in the Data Sources window navigate to where your newly create shapefiles for all the different classes and the Virden City shapefiles are located. Clicking a file will automatically add it to the Manager Window under the Data tab. Do this for every shapefile.

The manager window with the Data tab open showcasing all the added shapefiles

How SAGA works is that files can in the Data tab can be added to the Maps tab by simply right clicking the file and selecting Add to Map. If this is the first file you are doing this with, it will automatically create a new map with the name of the given file. For subsequent files, it will prompt you on which map you wish to add your chosen shapefile to.

The process of adding shapefiles to a map in SAGA


Defining a Project Area and Creating Grid Maps

Grid maps are members of a specific grid system defined by a spatial extent and cell size. When a grid map is loaded into a SAGA work session, if the grid system it is a member did not already exist for the session, it is now listed along with any other loaded grid systems. In this tutorial, a specific grid system is defined for the project area and referred to as the project area grid system.

In order to define the project area first click the Tools tab, then click Shapes -> Tools -> Create New Shapes Layer. This will open a window as seen below

Creating a new Shapes Layer

Enter the name you wish and change the Shape Type to Polygon, then hit Execute.

Once this new shape is created, add it to a map along with the other shapefiles we imported in the previous step. Note that because the shapefile has no actual shape to it, we must create one.

Begin by clicking the shapefile in the Map Tab, and then select the mouse button in the toolbar on the top of the screen (Mouse.png). Then click on the map itself to bring up a menu. Select Add Part and then begin to trace the outline of the completed shapefiles like below:

Creating a new shape in the MapProjectionLayer


Tracing the boundaries of the Land Used shapefiles

Once completed, the Layer will have a new instance, with the ID of 0. This will be used to create the grid system that will host the other grids we make in the next few steps.

To create a new grid system, in the Tools tab, click Grid -> Tools -> Create Grid System. In the window that opens, change the Cell Size to 30, the Initialization Value to 1 and the Extent Definition to One or more shapes layers. In the >> Shapes Layers field, input the polygon that you created.

Creating a grid system using a shape layer


This will create a new grid definition with a value similar to: "30; 3647x 3868y; 321532.093525x 5427575.539568y"


When a new grid system is created, a dummy grid map is automatically created as a member of the new grid system.

Creating Constraints

The next step in the MCE, and something that is important to think about is where do we not want our wind farm to be located? Ideally it should be in a location that is far from civilization, is on dry land, away from forests and away from water bodies. This is what would be considered a constraint. In order to determine the best location for our future wind farm, we must create constraints for forested + urban areas and water bodies + wetlands.


In order to build our constraint, we must first transform our shapefiles into grids by navigating to Grid -> Gridding -> Shapes to Grid and using the following settings:

- For >>Shapes input your desire shapefile (in our case it is our waterbodies shapefile)
- For Attribute select ID if it is not chosen.
- For Output Values select data/no-data.
- For Target Grid System select grid or grid system 
- For Grid System select the grid system created in the Defining a Project Area and Creating Grid Maps step.
- Leave the <<Grid option as <create>
- Hit Execute
Shapes to grid settings


Repeat the above for the wetlands shapefile as well.

The above steps results in all water bodies and wetlands grid cells being assigned a value of 1 with all non-water grid cells that contain no-data being assigned a data value of 0.


Once you have created your grids for both wetlands and water bodies, they must be combined into a single grid map. Navigate to Grid -> Calculus -> Grid Calculator and use the following settings:

- For >Grids enter the grids for both wetlands and water bodies
- For <<Result leave as <create>
- For Formula enter g1+g2
- Check the Use NoData box
- Hit Execute 
- Right click the newly created grid and rename it to something of your liking
Grid Calculator settings


Upon creating this new grid map, it must be reclassified. Navigate to Grid -> Tools -> Reclassify Grid Values and use the following settings:

- For Method select range
- For Minimum Value input 1.0
- For Maximum Value input 2.0
- For New Value input 1.0
- For Operator select <=
- Deselect NoData Values and Other Values
- For  Data Storage Type select [same as input grid]
- For No Data Value under the Output Grid options, leave as No Data Value of Input Grid
Reclassify settings


Once our grid has been reclassified, we must then create a buffer area around our new water gird features. To do this navigate to Grid -> Tools -> Grid Buffer and use the following settings:

- For >> Features choose your the reclassified grid you created in the previous step
- For << Buffer leave as <create>
- For Type select Fixed
- For Distance input a value of your choosing. The value chosen is presented in feet. Knowing this we chose a value of 250. If cell is to be chosen instead of fixed, then the value entered is the number of cells wide you wish for the buffer to be. 
Grid buffer settings


After creating our buffer, we must reclassify the grid once more to finally have our Water + Wetlands Constraint. Once again navigate to Grid -> Tools -> Reclassify Grid Values and use the following settings:

- For Method select Simple Table
   - In the Lookup Table that appears, use the following settings:
      - For Row 1, Minimum = 0.0, Maximum = 0.0, New = 1.0
      - For Row 2, Minimum = 1.0, Maximum = 2.0, New = 0.0
- For Operator select min <= value <= max
- Leave NoData Values and Other Values unchecked
- For  Data Storage Type select [same as input grid]
- For No Data Value under the Output Grid options, leave as No Data Value of Input Grid
Reclassification via lookup table settings


Once completed you should have something that looks similar to this:

Reclassified map of waterbodies and wetland constraint

As we can seen in the photo, all the areas that are in blue are areas that are outside the buffer range and can be considered areas that are viable for a windfarm.


Repeat all the steps above for the Forests and Urban shapefiles to create a constraint for Forests and Urban areas. The result should look similar to below:

Reclassified map of forested and urban areas constraint


Using Boolean Aggregation to Create a Site Suitability Map

After we have created buffers for both the water + wetlands, and the forested + urban areas, we can proceed to creating our site suitability map. In this method, we will be using a Boolean aggregation approach, which is different from the weighted measures approach that is often seen in tools such as TerrSet software.

The Boolean aggregation approach takes all criteria from grid maps that contain 1s and 0s and allows them to be easily aggregated into a final solution using basic Boolean algebra. The tool that we will be using is the Grid Calculator which can be found by navigation to Grid -> Calculus -> Grid Calculator.

Once the tool is open, we must add in all of our constraint grids and all the areas we believe are suitable for the building of a wind farm, which in our case are the grasslands and the agricultural field grids we created at the beginning of the tutorial. Use the following settings to create the site suitability map:

- For > Grids choose your water + wetland constraint grid, your forested + urban constraint grid, your agricultural fields grid and your grassland grid.
- For << Result leave as <create>
- Leave > Grids from Different System as default
- For Formula enter g1*g2*g3*g4
- Enter a name of your choosing in the Name field
- Leave Take Formula and Use No-Data unchecked
- Set Data Type to 4 byte floating point number
- Hit Execute
Settings for grid calculator to create a site suitability map


The result should be something similar to below:

Site suitability map created using constraints and factors


Areas in red are the areas that are deemed to be suitable for building of a windfarm.


The output map has the value 1 where all areas of suitability intersect for all criteria and the value 0 for all areas that are unsuitable for one or more of the criteria. Suitability in one criterion cannot compensate for a lack of suitability in any other layer. They do not trade off. By meeting all criteria, the result is the best locations possible for the building of a wind farm.


Conclusion

SAGA when used with its GUI is a user-friendly software that provides users with many different tools and modules that aid in geoscientific analysis. In this tutorial SAGA was used to produce a site suitability map for the location of a wind farm in the Southern region of Manitoba bordering against Saskatchewan using the Boolean aggregation method. While straightforward, the method does not allow for any trade offs in the suitability of criterions. A weighted linear combination method is likely also possible to be completed using tools such as Fuzzify.


References