Difference between revisions of "Multiple Criteria Evaluation in Allocating Land for Waste Incineration"

From CUOSGwiki
Jump to navigationJump to search
 
(107 intermediate revisions by 8 users not shown)
Line 1: Line 1:
  +
=Introduction=
This report should serve as a tutorial instructing a user in basic multi-objective decision making using a variety of Open Source software: GRASS GIS, Quantum GIS and OpenOffice Calc. With it they will be able to import vector and raster data, convert vectors to raster and use map algebra to produce a land allocation map according to the factors and constraints set up by the project.
 
   
  +
This tutorial instructs a user in basic, multi-objective decision making using Quantum GIS with Grass and OpenOffice Calc. With it they will be able to import vector and raster data, convert vectors to raster, and use map algebra to produce a land allocation map according to the factors and constraints set up by the project. Since the original time of writing (2010) software capabilities have changed, and the tutorial has been edited to reflect these changes.
'''Creating a GRASS GIS Database'''
 
   
  +
=Data and Software Versions=
In order to use GRASS software for spatial analysis a new mapset must be created to store vector and raster data. This process can be completed by a series of steps:
 
   
  +
The software used for this tutorial are:
1. Open GRASS GIS and click the “Location Wizard” radio button to define a new GRASS database.
 
   
  +
'''''QGIS 3.8.3 Zanzibar''''' (https://www.qgis.org/en/site/); and
2. Choose a GIS Data Directory and Project Location, these are both folders that will be created for the database. Click “Next” to proceed to choose a method in creating the new location.
 
   
  +
'''''Apache OpenOffice 4.1.6''''' (http://www.openoffice.org/).
3. Select the radio button labelled “Read projection and datum terms from a georeferenced data file”. This will allow the coordinate system for the GRASS database to draw from the shapefile data included in the project, NAD83 MTM Zone 9. This is the appropriate projection and datum for the Ottawa area. Click
 
“Next”.
 
   
  +
'''''Note:'''''
4. In the following dialogue box browse for and select any one of the shapefile data to read its projection and datum characteristics for the GRASS database.
 
Figure 1 through 4 illustrates the creation of a GRASS GIS database.
 
   
  +
Microsoft Excel is also acceptable to complete certain tasks if you wish not to download the Apache OpenOffice Software (Requires minor changes to SQL entries).
[[File:GrassStart.jpg]]
 
   
  +
'''''Microsoft Excel''''' (https://www.microsoft.com/en-ca/microsoft-365/p/excel/cfq7ttc0k7dx/?activetab=pivot%3aoverviewtab)
''Figure 1. GRASS welcome GUI''
 
   
  +
While the original version of this tutorial used GRASS GIS, it is not necessary in the current version of QGIS.
[[File:GrassStart2.jpg]]
 
   
  +
'''''Datasets used:'''''
''Figure 2. Define a GRASS database location and name''
 
   
  +
'''''Waterbodies'''''
[[File:GrassStart3.jpg]]
 
   
  +
https://open.ottawa.ca/datasets/water/data
''Figure 3. Choose a method of creating a new location''
 
   
  +
'''''Bedrock''''' (ed. note: There are multiple Datasets of Biophysical Nature in the database, be sure to extract and insert Bedrock dataset only.)
[[File:GrassStart4.jpg]]
 
   
  +
https://library.carleton.ca/find/gis/geospatial-data/national-capital-commission-thematic-data
''Figure 4. Select a georeferenced file''
 
   
  +
'''''Landuse 2010''''' (ed. note: 2010 dataset requires high system capacity as files and datasets are huge. Be sure to use university computers if feasible.)
'''Import Shapefile Data to GRASS'''
 
   
  +
https://library.carleton.ca/find/gis/geospatial-data/ottawa-thematic-data
Now that the GRASS database has been created we can import all necessary vector shapefile and raster data necessary to fulfill the project objectives. This process can completed by using the bulk import command in GRASS:
 
1. Navigate to the Menu Bar, select FileImport Vector DataBulk Import of Vector Data
 
2. In this dialogue box we can select a directory to import a set of shapefiles
 
3. Select the “Directory” radio button then navigate to the projects shapefile directory as the source, select “ESRI Shapefile” as the format. Be sure to select the radio box labelled “Override projection (use location’s projection)” this will ensure that the shapefiles’ projection and datum will match the mapset. Click “Next”. Figure 5 illustrates the Bulk Import Vector Data GUI.
 
   
  +
'''''Road_Centrelines''''' (Note: Updated versions of Road data can be included in future projects for better outcomes.)
[[File:Example.jpg]]
 
  +
''Figure 5. Bulk import of vector data''
 
  +
https://open.ottawa.ca/datasets/road-centrelines/explore?location=45.284471%2C-75.687542%2C3.89
   
  +
=QGIS=
'''Feature Value Allocation'''
 
   
  +
To begin the project, open QGIS, and perform the following steps:
To determine the parcels of land most suitable for Waste Depots and Incineration Sites we can assign a specific cost value to acceptable and unacceptable attributes. Preparing the vector data in this manner will allow us to easily determine the placement of sites by visual inspection.
 
   
  +
1. From the browser pane (or the layer tab) add the water, bedrock, and landuse_2005 shapefiles to the project.
'''A) Feature Value Allocation: Land Use'''
 
  +
Note: The Road_centrelines is not needed until the final map is created.
   
  +
2. If there is a projection conflict, QGIS will generate a popup indicating a transformation. Hit accept.
The land use data categorizes parcels of land according to Ottawa municipal guidelines. Acceptable land use categories for this project are:
 
  +
Note: All shapefiles must be reprojected (see below).
• Vacant Land
 
• Vacant Building
 
• Industrial
 
• Idle and Shrub Land
 
• Open Space
 
• Pits and Quarries
 
All other land use categories are unacceptable, acceptable categories will receive a low cost value and unacceptable categories will receive a high cost value. In order to do this we will use OpenOffice Calc program to modify the attribute database files. Although this procedure can be done using GRASS this program consumes far less system resources to perform the same operation because it is not concerned with the spatial component of the vector data using the database.
 
   
  +
To perform the reprojection:
1. Activate the OpenOffice Calc program and open the LandUse2005 database file by navigating to through the GRASS mapset directory: ProjectGrassDatabases-->newLocation-->PERMANENT-->dbf
 
2. A “character set encoding” dialogue box will appear, select the “Western Europe (ISO-8859-1) character set and click OK. This is the encoding that was used to produce the database file therefore we need to use it now to read them properly. Figure 6 illustrates the character set encoding GUI.
 
   
  +
1. Select Vector > Data Management > Reproject layer.
   
  +
2. Select Run as Batch Process and add the shapefiles as the input layers.
[[File:Example.jpg]]
 
Figure 6. OpenOffice Calc character set encoding
 
   
  +
3. Set the project CRS as the Target CRS (should be something similar to NAD83/MTM zone 9).
3. Now that the LandUse database file has been loaded into the spread we need to create a new column called “Value”. Do so by entering “VALUE, N, 7, 2” in the E1 cell. This will ensure that a new attribute column will be added to the vector file in GRASS.
 
4. To assign the proper cost values to the categories we can use a logical function that will assign “1” to acceptable categories and “1000” to unacceptable categories. In the E2 cell enter the logical function: =IF(B11="V1"; 1; IF(B11="M1"; 1; IF(B11="V2"; 1; IF(B11="ROS"; 1; IF(B11="OS"; 1; IF(B11="QS"; 1; 1000))))))
 
5. Migrate the function by copying the E2 cell contents and pasting it to every row in the VALUE column. Save the database file and when asked about format select “Keep Current Format”. Figure 7 illustrates the database file edit performed in step 4.
 
   
  +
4. Using the button to the right of the reprojected field name, navigate to the folder containing the other shapefiles.
[[File:Example.jpg]]
 
Figure 7. Using a logical function to assign values in OpenOffice Calc
 
 
'''B) Feature Value Allocation: Bedrock'''
 
   
  +
5.Save each shapefile with a unique name.
The bedrock data contains bedrock composition and is limited to the Ottawa-Central region. We want to allocate land upon bedrock with little to no remaining economic value to other industries or to the City of Ottawa. According to the geological survey carried out by the Ministry of Natural Resources’ Mineral Resource division the Ottawa-Central region describes several bedrock types of little to no economic value:
 
   
  +
6. Ensure Load layers on completion is selected.
• EASTVIEW FORMATION, DARK GREY LIMESTONE WITH SHALE BANDS
 
• MARCH FORMATION, INTERBEDED GREY CALAREOUS SANDSTONE & DOLOMITE.
 
• CARLSBAD FORMATION, GREY SHALE SOME DOLOMITE LAYERS.
 
• BILLINGS FORMATION
 
• ROCKCLIFFE FORMATION, GREY GREEN SHALE WITH GREY SANDSTONE LENSES.
 
• QUATERNARY FORMATION, THICK DRIFT, RECENT ALLUVIUM & PLEISTOCENE GLACIAL DEPOSITS.
 
   
  +
7. Run.
To allocate values to acceptable and unacceptable bedrock types follow steps 1 through 5 of the Land Use feature allocation section but use the logical function as follows:
 
• = IF(D2=1; 1; IF(D2=2; 1; IF(D2=4; 1; IF(D2=5; 1; IF(D2=10; 1; IF(D2=12; 1; 1000))))))
 
   
  +
An image of this process can be seen in Figure 1.
'''C) Feature Value Allocation: WaterFeatures'''
 
   
  +
[[File:Reproject.bmp]]
The WaterFeatures polygon vector contains data on all water features in the Ottawa region including rivers, streams and ponds. For this project, all water features will receive a high cost value of 1000 making allocation a much simpler matter than the two previous database files. To allocate values to its database table follow steps 1 through 5 but designate the VALUE cell as follows:
 
• =1000
 
This will assign a value of 1000 to every feature in the WaterFeaturesvector.
 
   
  +
''Figure 1. A screenshot of the batch reprojection tool.''
Now that each of the vectors have received an appropriate value for its features we can proceed to work with the elevation data by creating an interpolation and slope surface.
 
   
  +
The reprojected shapefiles should load into the project window.
'''Converting Vector Data to Raster'''
 
   
  +
From these reprojected shapefiles, the attribute tables will need to be exported to a CSV exported to the OpenOffice Calc or Microsoft Excel application to facilitate easier editing.
We will use the Quantum GIS program to convert the vector data to raster, it’s graphical user interface (GUI) will allow us to easily change the GRASS mapset region resolution which are crucial parameters when working with raster data. When working with raster data the GRASS mapset will refer to the resolution settings of the region, each pixel will reflect the North-South and East-West settings. To ensure optimal conversion of polygon and line vector data the resolution should be set to match the dimensions of the smallest feature, point vector data does not encounter difficulty in this process (unless points lie outside the region extent) and each point will count as the centroid for each pixel.
 
   
  +
To extract the attribute tables for the shapefiles, right click the layer-> export->save features as->CSV, and apply the relevant parameters, as seen in figure 2.
First we will change the mapset region resolution parameters to convert the Land Use vector data as follows:
 
1. Activate Quantum GIS and navigate through the Menu bar: PluginsGRASSOpen Mapset. Find the primary mapset folder and click “OK” to open the mapset.
 
2. Edit the GRASS mapset region by clicking the icon . This will open the Region GUI. Figure 8 illustrates the GRASS region GUI.
 
3. Change the N-S Res to 25 units and the E-W Res to 25 units. GRASS uses rectangular pixels so the N-S resolution will automatically be lesser than the E-W resolution. This will instruct the raster conversion tool to create a 25m pixel per vector line or area.
 
   
  +
[[File:QGISExport.png]]
   
  +
''Figure 2. A screenshot of the Export tool, indicating the parameters required for exportation of the attribute tables in QGIS (Note: The window can change depending on the version of QGIS in use). ''
   
[[File:Example.jpg]]
 
   
  +
Once this step has been completed, the newly created CSVs can be opened in Open Office Calc OR Microsoft Excel.
   
  +
=Feature Value Allocation Using OpenOffice Calc OR Microsoft Excel=
   
  +
To determine the parcels of land most suitable for Waste Depots and Incineration Sites we can assign a specific cost value to acceptable and unacceptable attributes. Preparing the vector data in this manner will allow us to easily determine the placement of sites by visual inspection.
   
   
  +
==A) Feature Value Allocation: Landuse==
  +
  +
The land use data categorizes parcels of land according to Ottawa municipal guidelines. Acceptable land use categories for this project are:
   
  +
* Vacant Land
  +
* Vacant Building
  +
* Idle and Shrub Land
  +
* Open Space
  +
* Pits and Quarries
   
  +
Industrial Areas can also be used in the land allocation although in accordance with the definition of industrial Area by the City of Ottawa, Industrial Areas are places of manufacturing, assembly, warehousing or storage and wholesaling of goods. Nonetheless, they can release many harmful gases and chemicals causing possible effects on public living around it. Therefore, they have not been included in the updated version of the study to take into consideration any harm that they may cause.
   
  +
All other land use categories are unacceptable. Acceptable categories will receive a low cost value and unacceptable categories will receive a high cost value. In order to do this we can use OpenOffice Calc or Microsoft Excel program to modify the attribute files. Although this procedure can be done using GRASS, OpenOffice Calc and Excel consumes fewer system resources to perform the same operation because it is not concerned with the spatial component of the vector data using the database.
   
  +
'''''Note: Majority of the steps can be replicated in Microsoft Excel. Instructions are added in areas where changes in SQL entries are required.'''''
Figure 8. GRASS Region GUI
 
   
  +
==B)Importing and Toggling Data in OpenOffice Calc==
Now that we have the region set we can convert the Land Use vector to raster using the GRASS “shell” command module. For each vector data we will alter the region resolution settings to reflect the vector characteristics. Open the GRASS shell module by clicking the icon and activating the shell. Figure 10 illustrates the GRASS shell module, in the shell we will enter the command to convert the Land Use vector as follows:
 
   
  +
1.To begin allocation, activate the OpenOffice Calc program and open the Landuse_2010 CSV.
v.to.rast --overwrite input=landuse2005 output=LandUseRaster column=VALUE labelcolumn=VALUE
 
   
  +
2. A “character set encoding” dialogue box will appear. Note that some of the accented characters may not convert correctly, even if the encoding language is identical; this can be edited using the “find and replace” function. Be sure to select "TAB" as the separator, as shown in figure 3.
 
Figure 9. GRASS shell module to convert vector to raster
 
   
  +
  +
[[File:OpenOffice1.bmp]]
   
  +
''Figure 5. OpenOffice Calc character set encoding.''
When the process has been completed we can convert the Bedrock vector as follows:
 
   
v.to.rast --overwrite input=BedRock output=BedRockRaster column=VALUE labelcolumn=VALUE
 
   
  +
Now that the Landuse database file has been loaded into the spreadsheet:
Before we convert the WaterFeatures vector to raster we must apply a buffer to it. No Incineration Facility or Waste Depot should be constructed within 300 metres of any body of water. The most efficient way to do this is to alter the Region settings to 5m resolution and use the v.buffer tool to place a buffer around the WaterFeatures vector. Using the GRASS shell input the command as follows:
 
   
  +
1.create a column named "Value".
v.buffer input= WaterFeatures output= WaterFeatures Vector --overwrite type=area layer=1 distances=300 tolerance=0.1
 
   
  +
2. To assign the proper cost values to the categories we can use a logical function that will assign “1” to acceptable categories and “1000” to unacceptable categories. In the VALUE column, type =IF(A2="V1"; 1; IF(A2="M1"; 1; IF(A2="V2"; 1; IF(A2="ROS"; 1; IF(A2="OS"; 1; IF(A2="QS"; 1; 1000))))). This will sort the LU_2005 values for later processing.
This will create a new vector with round polygons. Now we can convert that vector to raster as follows:
 
   
  +
3. Apply this formula to the entire column by selecting the small black box in the right-hand corner and dragging it down the column. See figure 6.
v.to.rast --overwrite input= WaterFeatures Vector output= WaterFeaturesRaster column=VALUE labelcolumn=VALUE
 
   
In this manner we have created three separate rasters. The LandUseRaster and BedRockRaster each contain 2 pixel classes: 1 and 1000 to indicate acceptable and unacceptable land respectively. The WaterFeaturesRaster contains only 1 pixel class because its buffered zone indicates only unacceptable areas for construction. It is important to make note that the rasters were created with NULL values where no pixel received a value due to the vectors’ extents. In the final land allocation process we will use GRASS’s map algebra tool to combine the rasters and so their NULL values must be accounted for. Figures 10 through 12 illustrate the WaterFeatures, LandUse and Bedrock rasters.
 
   
  +
[[File:Landuse csv.bmp]]
   
  +
''Figure 6. A sample of the Landuse_2005 edited CSV.''
   
   
  +
4. Save the file, and select “Keep Current Format” when prompted.
   
  +
==C) Feature Value Allocation: Bedrock==
   
  +
The bedrock data contains bedrock composition and is limited to the Ottawa-Central region. We want to allocate land upon bedrock with little to no remaining economic value to other industries or to the City of Ottawa. According to the geological survey carried out by the Ministry of Natural Resources’ Mineral Resource division the Ottawa-Central region describes several bedrock types of little to no economic value:
   
  +
* EASTVIEW FORMATION, DARK GREY LIMESTONE WITH SHALE BANDS
  +
* MARCH FORMATION, INTERBEDED GREY CALCAREOUS SANDSTONE & DOLOMITE.
  +
* CARLSBAD FORMATION, GREY SHALE SOME DOLOMITE LAYERS.
  +
* BILLINGS FORMATION
  +
* ROCKCLIFFE FORMATION, GREY GREEN SHALE WITH GREY SANDSTONE LENSES.
  +
* QUATERNARY FORMATION, THICK DRIFT, RECENT ALLUVIUM & PLEISTOCENE GLACIAL DEPOSITS.
   
  +
Report the same steps as the landuse_2005 allocation above, using the formula
Figure 10. WaterFeatures Raster
 
  +
=IF(C2=1; 1; IF(C2=2; 1; IF(C2=4; 1; IF(C2=5; 1; IF(C2=10; 1; IF(C2=12; 1; 1000)))))), which uses the "class" values to sort the data.
   
  +
==D) Feature Value Allocation: Water==
Figure 11. LandUse Raster
 
   
  +
The water polygon vector contains data on all water features in the Ottawa region, including rivers, streams, and ponds. For this project, all water features will receive a high cost value of 1000.
  +
Under the VALUE column, use the formula =1000, and apply to the entire column.
   
  +
==E) Importing and Toggling Data in Microsoft Excel==
   
   
  +
1. To begin allocation using Microsoft Excel, you need to import the data in a specific format. Open Excel ---> Data ---> Get Data ---> From File ---> From CSV/File
   
   
  +
2. A window pane similar to the Figure Below will appear. Change and toggle the delimiter to get results similar to the figure below. Load the data after.
Figure 12. Bedrock Raster
 
   
  +
[[File: EXCELPROP.png]]
Dealing with NULL Raster Values
 
   
  +
Figure 3: Data import pane in microsoft Excel.
To deal with the NULL raster values we can use the r.null tool in the GRASS shell to assign a value of 0 so they can be recognize by map algrebra but do not participate in the combination process:
 
   
r.null map=WaterFeaturesRaster null=0
 
r.null map=BedRockRaster null=0
 
r.null map=LandUseRaster null=0
 
   
  +
3. Once the data is loaded, Add a new Field into the top column named 'Value'. In the first cell, Add the following SQL entry for each file-
These commands will create a separate class for null values in the system memory and will appear visually as a different colour.
 
   
  +
'''''Landuse CSV: "=IF(A3="V1",1,IF(A3="V2",1,IF(A3="ROS",1,IF(A3="OS",1,IF(A3="QS",1,1000)))))"'''''
Land Allocation Process using Map Algebra
 
   
Now that we have the 3 rasters we can use map algebra to create a Land Use Suitability Map that should indicate the maximum area for use by Incineration Facilities and Waste Depots. When the suitability map has been created we can return the map NULL values to NULL instead of 0 so that only the relevant areas are shown.
 
   
  +
'''''Bedrock CSV: "=IF(C3=1, 3, IF(C3=5, 1, IF(C3=8, 1, IF(C3=9, 1, IF(C3=10, 1, IF(C3=12, 1, 1000))))))"'''''
1. WaterFeatures Raster contains two pixel values in addition to the null values: 1 and 2. We must use map algebra to reduce both classes to a value of 1 then convert them back to their original cost value of 1000.
 
2. In the GRASS shell enter the following commands to return WaterFeaturesRaster to a single high cost value:
 
• r.mapcalculator –overwrite formula=(oldraster^0)*1000 outfile=WaterFeaturesA
 
3. Then we use map algebra again to create the Land Use Suitability Map
 
• r.mapcalculator --overwrite formula=WaterFeaturesA+ BedRockRaster + LandUseRaster outfile=LandUseSuitabilityMap
 
4. Now that the Land Use Suitability Map has been created we can convert the null values back to zero:
 
• r.null map=LandUseSuitabilityMap setnull=0
 
Figure 13 illustrates the output LandUseSuitabilityMap from the map algebra process.
 
   
   
  +
'''''Water CSV: Follow the same steps as mentioned in OpenOffice Calc section above.'''''
   
   
  +
4. With entry of each cell, the remaining cells in the workbook should be completed automatically.
   
  +
[[File: EXCELPROP2.png]]
   
  +
Figure 4: How to input the SQL entry in Microsoft Excel.
   
  +
=Joining Attributes In QGIS=
  +
Once the CSVs are complete, they need to be added to QGIS, and joined to the respective shapefiles. To add them:
   
  +
Step 1.Navigate to the layer tab--> add layer--> add delimited text layer. A popup will appear, and the parameters can be set.
  +
  +
Step 2. For the join, Right click the target shapefile -> properties -> joins -> add joins (indicated in this version as a plus sign near the bottom of the window)-> select the target csv -> input parameters. Step 3. Ensure the join field and target field are the same, the editable join layer is toggled, and the selected joined field is "VALUE". An example can be seen in figure 7.
   
   
  +
[[File:Vector_join.bmp]]
   
  +
''Figure 7. An example of the join function.''
   
Figure 13. LandUseSuitabilityMap
 
The output raster contains four different pixel classes. In order to approximate the real world land-use allocation we can convert the raster to vector then use QuantumGIS’s superior symbology system to differentiate between acceptable and unacceptable land.
 
1. Using the GRASS shell enter this command to convert to vector:
 
• r.to.vect -s -v input=LandUseSuitabilityMap output=LandAllocationMap feature=area
 
2. Add the output vector to the QuantumGIS map space and open the symobology settings by right-clicking the vector and selecting “Properties”.
 
3. In the “symbology” tab set the Legend Type to “Unique Value” and Classification field to “VALUE”, click the Classify radio button.
 
4. Now we see that several classes have been created as a result of the map algrebra, recall that we had set acceptable land allocations to a value of 1 and unacceptable land allocations to 1000. Due to the map algrebra process acceptable values will have a maximum value of 2 indicating areas of appropriate land use and bedrock type as well as being at least 300m away from any body of water.
 
5. De-select the radio button “Restrict changes to common properties” and assign like colours to values 1 and 2 and like colours to the remaining classes. This will ensure a clear land allocation vector for visual inspection.
 
   
  +
Step 4. To ensure the “VALUE” attribute is an integer, not a string, open the attribute table of each shapefile, select the edit button, add a new integer field with a length of 4, and use field calculator to copy the string field(see figure 8) by:
Figure 14 illustrates the symbology GUI for the Land Allocation Map. Figure 15 illustrates the Land Allocation Map with two classes yellow representing suitable land allocations and red representing unsuitable land. The black areas represent remnants of the nodata process when converting from raster to vector. By adding the Ottawa Transportion vector data to the mapset Incineration Facilites and Waste Depots can be positioned appropriately to serve different communities in an optimal fashion.
 
   
  +
1. Select the “update field” button;
   
  +
2. Type in the string field name;
   
  +
3. Select okay.
   
   
  +
[[File:Field Calc.PNG]]
   
  +
''Figure 8. An example of the field calculator function.''
   
  +
=Converting Vector Data to Raster=
  +
Once the CSVs have been joined to the shapefiles, they can be converted from vector to raster, as shown in figure 9.
   
  +
1. Navigate to the processing toolbox--> GRASS-->Vector-->v.to.rast.
   
  +
2. Set the source of raster values to "attr" parameter, the "VALUE" column as the "attr" parameter, and the region cell size as 25. Name the raster appropriately,
  +
  +
3. run.
   
   
  +
[[File:Rasterize.bmp]]
   
  +
''Figure 9. A screenshot of the vector to raster tool.''
   
   
  +
Before we convert the Water vector to raster we must apply a buffer to it. No Incineration Facility or Waste Depot should be constructed within 300 metres of any body of water. To do this:
   
  +
1. Navigate to the tool by Processing toolbox--> Vector--> v.buffer (as seen in figure 10).
   
  +
2. Set the buffer distance in map units to "300", and name the shapefile appropriately.
Figure 14. GRASS symbology GUI
 
   
  +
3. All other parameters can be left as the default.
   
  +
4. Run.
   
  +
Once this has completed, the buffed water features can be rasterized, as outlined above.
   
   
  +
[[File:V buff.bmp]]
   
  +
''Figure 10. An example of the "vector buffer" tool.''
  +
  +
  +
Now that there are three rasters, Open the layer properties of each and navigate to symbology, and hit the classify button to bring the pixel count down to 1 and/or 1000 for the raster files. The results can be seen in the below figures. Yellow shoes areas of high cost (unsuitable) and purple show the areas of low cost (suitable).
  +
  +
[[File: Water.png]]
  +
  +
''Figure 11. The result of rasterization on the buffed water data.''
  +
  +
[[File: Bedrock.png]]
  +
  +
''Figure 12. The result of rasterization on the bedrock data.''
  +
  +
[[File: Landuse.png]]
  +
  +
''Figure 13. The result of rasterization on the landuse data.''
  +
  +
=Using Map Algebra to Allocate Best Area for Incineration=
  +
  +
Now that we have the 3 rasters, we can create a Land Use Suitability Map. This map should indicate the maximum area for use by incineration facilities and waste depots.
  +
  +
To create the map:
  +
  +
1. From the raster tab, navigate to miscellaneous, then merge. An example of the tool can be seen in figure 14.
  +
  +
2. Add all three rasters to the input layers.
  +
  +
3. Leave the defaults.
  +
  +
4. Name the file appropriately.
  +
  +
5. Run. Figure 15 is an example of the original output.
  +
  +
  +
[[File:Merge_incin.PNG ]]
  +
  +
''Figure 14. A screenshot of the merge tool.''
  +
  +
  +
[[File: MERGE.PNG]]
  +
  +
''Figure 15. The original output of the "merge" tool.''
  +
  +
  +
As seen in figure 15, the original output is black and white, and only has two values; 0 and 1000. This can be adjusted by changing the symbology to paletted/Unique values, selecting the "classify" button, and it will render the raster to 0, 1, and 1000 values. The result can be seen in figure 15.
  +
  +
  +
[[File: FinalMergeS.JPG]]
  +
  +
''Figure 16.Land suitability.''
  +
  +
  +
The final step is to reconvert the raster to vector, and add the road_centerlines data. To reconvert:
  +
  +
1. navigate to Processing Toolbox--> GRASS--> Raster--> r.to.vect.
  +
  +
2. Set the input as the land suitability raster, with "area" as the feature type.
  +
  +
3. Name appropriately.
  +
  +
4. Leave the rest as default.
  +
  +
5. Run.
  +
  +
  +
[[File:Land allocation.PNG]]
  +
  +
''Figure 17. The "raster to vector" tool.''
   
   
  +
It is here that the road_centerlines become relevant, so if they are not on the mapset yet, they can be added now.
  +
Open the symbology settings by right-clicking the vector and selecting “Properties”.
   
  +
In the “symbology” tab, set the Legend Type to “Catagorized” and Classification field (here labelled "column") to “VALUE”, and click the Classify radio button. This should add the "0", "1", and "1000" values.
   
   
  +
[[File: SYMBOLOGY.PNG]]
   
  +
''Figure 18. The symbology of the newly created vector map should indicate the null values (represented by the 0), the "1"(indicating suitability) and the "1000" (indicating unsuitability), shown here in grey, green, and red, respectively. The road network is indicated in black."
   
   
  +
[[File: FINALPRODUCT.PNG]]
   
  +
''Figure 19. A land allocation map with Green areas displaying possible Waste Incineration Facility Locations.''
   
   
  +
If desired, a map layout can be applied, but it is not strictly necessary.
   
  +
=Conclusion=
  +
This tutorial showed how to create a land allocation map for waste allocation, using two open-source software packages. The original version of the project included steps that required coding, as well as the use of a stand-alone GRASS GIS application. In the updated version of QGIS integrated with GRASS, this is no longer necessary. However, QGIS does have command prompt scripting capabilities, if a person preferred. OpenOffice Calc is an open source, MS Excel alternative that enables editing of the attribute tables. Ms Excel can be used for users that find it easier to use and execute similar activites. It is possible to perform this task within QGIS itself using the map calculator in the application, but this option can be less intuitive, and more cumbersome.
   
  +
=References=
   
  +
*Fraser, John Z. (1976). ''Mineral Resource Survey''. In ''DIVISION OF MINES, GEOLOGICAL BRANCH Open File Report 5217''. Retried November 25, 2010 from
Figure 15. Land Allocation Map
 
  +
[http://www.geologyontario.mndm.gov.on.ca/mndmfiles/pub/data/imaging/OFR5217/OFR5217.pdf Online Reference]
   
  +
[[Category:Tutorials]]
Conclusion
 
This tutorial instructed the process of using vector data to determine land allocation according to several factors and contraints, the result being a Land Allocation Map showing areas appropriate for Incineration and Waste Depots. We used several GRASS and Quantum GIS tools to carry out project objectives as well as OpenOffice Calc which played an important role in assigning cost value to land parcels.
 

Latest revision as of 09:31, 1 October 2021

Introduction

This tutorial instructs a user in basic, multi-objective decision making using Quantum GIS with Grass and OpenOffice Calc. With it they will be able to import vector and raster data, convert vectors to raster, and use map algebra to produce a land allocation map according to the factors and constraints set up by the project. Since the original time of writing (2010) software capabilities have changed, and the tutorial has been edited to reflect these changes.

Data and Software Versions

The software used for this tutorial are:

QGIS 3.8.3 Zanzibar (https://www.qgis.org/en/site/); and

Apache OpenOffice 4.1.6 (http://www.openoffice.org/).

Note:

Microsoft Excel is also acceptable to complete certain tasks if you wish not to download the Apache OpenOffice Software (Requires minor changes to SQL entries).

Microsoft Excel (https://www.microsoft.com/en-ca/microsoft-365/p/excel/cfq7ttc0k7dx/?activetab=pivot%3aoverviewtab)

While the original version of this tutorial used GRASS GIS, it is not necessary in the current version of QGIS.

Datasets used:

Waterbodies

https://open.ottawa.ca/datasets/water/data

Bedrock (ed. note: There are multiple Datasets of Biophysical Nature in the database, be sure to extract and insert Bedrock dataset only.)

https://library.carleton.ca/find/gis/geospatial-data/national-capital-commission-thematic-data

Landuse 2010 (ed. note: 2010 dataset requires high system capacity as files and datasets are huge. Be sure to use university computers if feasible.)

https://library.carleton.ca/find/gis/geospatial-data/ottawa-thematic-data

Road_Centrelines (Note: Updated versions of Road data can be included in future projects for better outcomes.)

https://open.ottawa.ca/datasets/road-centrelines/explore?location=45.284471%2C-75.687542%2C3.89

QGIS

To begin the project, open QGIS, and perform the following steps:

1. From the browser pane (or the layer tab) add the water, bedrock, and landuse_2005 shapefiles to the project. Note: The Road_centrelines is not needed until the final map is created.

2. If there is a projection conflict, QGIS will generate a popup indicating a transformation. Hit accept. Note: All shapefiles must be reprojected (see below).

To perform the reprojection:

1. Select Vector > Data Management > Reproject layer.

2. Select Run as Batch Process and add the shapefiles as the input layers.

3. Set the project CRS as the Target CRS (should be something similar to NAD83/MTM zone 9).

4. Using the button to the right of the reprojected field name, navigate to the folder containing the other shapefiles.

5.Save each shapefile with a unique name.

6. Ensure Load layers on completion is selected.

7. Run.

An image of this process can be seen in Figure 1.

Reproject.bmp

Figure 1. A screenshot of the batch reprojection tool.

The reprojected shapefiles should load into the project window.

From these reprojected shapefiles, the attribute tables will need to be exported to a CSV exported to the OpenOffice Calc or Microsoft Excel application to facilitate easier editing.

To extract the attribute tables for the shapefiles, right click the layer-> export->save features as->CSV, and apply the relevant parameters, as seen in figure 2.

QGISExport.png

Figure 2. A screenshot of the Export tool, indicating the parameters required for exportation of the attribute tables in QGIS (Note: The window can change depending on the version of QGIS in use).


Once this step has been completed, the newly created CSVs can be opened in Open Office Calc OR Microsoft Excel.

Feature Value Allocation Using OpenOffice Calc OR Microsoft Excel

To determine the parcels of land most suitable for Waste Depots and Incineration Sites we can assign a specific cost value to acceptable and unacceptable attributes. Preparing the vector data in this manner will allow us to easily determine the placement of sites by visual inspection.


A) Feature Value Allocation: Landuse

The land use data categorizes parcels of land according to Ottawa municipal guidelines. Acceptable land use categories for this project are:

  • Vacant Land
  • Vacant Building
  • Idle and Shrub Land
  • Open Space
  • Pits and Quarries

Industrial Areas can also be used in the land allocation although in accordance with the definition of industrial Area by the City of Ottawa, Industrial Areas are places of manufacturing, assembly, warehousing or storage and wholesaling of goods. Nonetheless, they can release many harmful gases and chemicals causing possible effects on public living around it. Therefore, they have not been included in the updated version of the study to take into consideration any harm that they may cause.

All other land use categories are unacceptable. Acceptable categories will receive a low cost value and unacceptable categories will receive a high cost value. In order to do this we can use OpenOffice Calc or Microsoft Excel program to modify the attribute files. Although this procedure can be done using GRASS, OpenOffice Calc and Excel consumes fewer system resources to perform the same operation because it is not concerned with the spatial component of the vector data using the database.

Note: Majority of the steps can be replicated in Microsoft Excel. Instructions are added in areas where changes in SQL entries are required.

B)Importing and Toggling Data in OpenOffice Calc

1.To begin allocation, activate the OpenOffice Calc program and open the Landuse_2010 CSV.

2. A “character set encoding” dialogue box will appear. Note that some of the accented characters may not convert correctly, even if the encoding language is identical; this can be edited using the “find and replace” function. Be sure to select "TAB" as the separator, as shown in figure 3.


OpenOffice1.bmp

Figure 5. OpenOffice Calc character set encoding.


Now that the Landuse database file has been loaded into the spreadsheet:

1.create a column named "Value".

2. To assign the proper cost values to the categories we can use a logical function that will assign “1” to acceptable categories and “1000” to unacceptable categories. In the VALUE column, type =IF(A2="V1"; 1; IF(A2="M1"; 1; IF(A2="V2"; 1; IF(A2="ROS"; 1; IF(A2="OS"; 1; IF(A2="QS"; 1; 1000))))). This will sort the LU_2005 values for later processing.

3. Apply this formula to the entire column by selecting the small black box in the right-hand corner and dragging it down the column. See figure 6.


Landuse csv.bmp

Figure 6. A sample of the Landuse_2005 edited CSV.


4. Save the file, and select “Keep Current Format” when prompted.

C) Feature Value Allocation: Bedrock

The bedrock data contains bedrock composition and is limited to the Ottawa-Central region. We want to allocate land upon bedrock with little to no remaining economic value to other industries or to the City of Ottawa. According to the geological survey carried out by the Ministry of Natural Resources’ Mineral Resource division the Ottawa-Central region describes several bedrock types of little to no economic value:

  • EASTVIEW FORMATION, DARK GREY LIMESTONE WITH SHALE BANDS
  • MARCH FORMATION, INTERBEDED GREY CALCAREOUS SANDSTONE & DOLOMITE.
  • CARLSBAD FORMATION, GREY SHALE SOME DOLOMITE LAYERS.
  • BILLINGS FORMATION
  • ROCKCLIFFE FORMATION, GREY GREEN SHALE WITH GREY SANDSTONE LENSES.
  • QUATERNARY FORMATION, THICK DRIFT, RECENT ALLUVIUM & PLEISTOCENE GLACIAL DEPOSITS.

Report the same steps as the landuse_2005 allocation above, using the formula =IF(C2=1; 1; IF(C2=2; 1; IF(C2=4; 1; IF(C2=5; 1; IF(C2=10; 1; IF(C2=12; 1; 1000)))))), which uses the "class" values to sort the data.

D) Feature Value Allocation: Water

The water polygon vector contains data on all water features in the Ottawa region, including rivers, streams, and ponds. For this project, all water features will receive a high cost value of 1000. Under the VALUE column, use the formula =1000, and apply to the entire column.

E) Importing and Toggling Data in Microsoft Excel

1. To begin allocation using Microsoft Excel, you need to import the data in a specific format. Open Excel ---> Data ---> Get Data ---> From File ---> From CSV/File


2. A window pane similar to the Figure Below will appear. Change and toggle the delimiter to get results similar to the figure below. Load the data after.

EXCELPROP.png

Figure 3: Data import pane in microsoft Excel.


3. Once the data is loaded, Add a new Field into the top column named 'Value'. In the first cell, Add the following SQL entry for each file-

Landuse CSV: "=IF(A3="V1",1,IF(A3="V2",1,IF(A3="ROS",1,IF(A3="OS",1,IF(A3="QS",1,1000)))))"


Bedrock CSV: "=IF(C3=1, 3, IF(C3=5, 1, IF(C3=8, 1, IF(C3=9, 1, IF(C3=10, 1, IF(C3=12, 1, 1000))))))"


Water CSV: Follow the same steps as mentioned in OpenOffice Calc section above.


4. With entry of each cell, the remaining cells in the workbook should be completed automatically.

EXCELPROP2.png

Figure 4: How to input the SQL entry in Microsoft Excel.

Joining Attributes In QGIS

Once the CSVs are complete, they need to be added to QGIS, and joined to the respective shapefiles. To add them:

Step 1.Navigate to the layer tab--> add layer--> add delimited text layer. A popup will appear, and the parameters can be set.

Step 2. For the join, Right click the target shapefile -> properties -> joins -> add joins (indicated in this version as a plus sign near the bottom of the window)-> select the target csv -> input parameters. Step 3. Ensure the join field and target field are the same, the editable join layer is toggled, and the selected joined field is "VALUE". An example can be seen in figure 7.


Vector join.bmp

Figure 7. An example of the join function.


Step 4. To ensure the “VALUE” attribute is an integer, not a string, open the attribute table of each shapefile, select the edit button, add a new integer field with a length of 4, and use field calculator to copy the string field(see figure 8) by:

1. Select the “update field” button;

2. Type in the string field name;

3. Select okay.


Field Calc.PNG

Figure 8. An example of the field calculator function.

Converting Vector Data to Raster

Once the CSVs have been joined to the shapefiles, they can be converted from vector to raster, as shown in figure 9.

1. Navigate to the processing toolbox--> GRASS-->Vector-->v.to.rast.

2. Set the source of raster values to "attr" parameter, the "VALUE" column as the "attr" parameter, and the region cell size as 25. Name the raster appropriately,

3. run.


Rasterize.bmp

Figure 9. A screenshot of the vector to raster tool.


Before we convert the Water vector to raster we must apply a buffer to it. No Incineration Facility or Waste Depot should be constructed within 300 metres of any body of water. To do this:

1. Navigate to the tool by Processing toolbox--> Vector--> v.buffer (as seen in figure 10).

2. Set the buffer distance in map units to "300", and name the shapefile appropriately.

3. All other parameters can be left as the default.

4. Run.

Once this has completed, the buffed water features can be rasterized, as outlined above.


V buff.bmp

Figure 10. An example of the "vector buffer" tool.


Now that there are three rasters, Open the layer properties of each and navigate to symbology, and hit the classify button to bring the pixel count down to 1 and/or 1000 for the raster files. The results can be seen in the below figures. Yellow shoes areas of high cost (unsuitable) and purple show the areas of low cost (suitable).

Water.png

Figure 11. The result of rasterization on the buffed water data.

Bedrock.png

Figure 12. The result of rasterization on the bedrock data.

Landuse.png

Figure 13. The result of rasterization on the landuse data.

Using Map Algebra to Allocate Best Area for Incineration

Now that we have the 3 rasters, we can create a Land Use Suitability Map. This map should indicate the maximum area for use by incineration facilities and waste depots.

To create the map:

1. From the raster tab, navigate to miscellaneous, then merge. An example of the tool can be seen in figure 14.

2. Add all three rasters to the input layers.

3. Leave the defaults.

4. Name the file appropriately.

5. Run. Figure 15 is an example of the original output.


Merge incin.PNG

Figure 14. A screenshot of the merge tool.


MERGE.PNG

Figure 15. The original output of the "merge" tool.


As seen in figure 15, the original output is black and white, and only has two values; 0 and 1000. This can be adjusted by changing the symbology to paletted/Unique values, selecting the "classify" button, and it will render the raster to 0, 1, and 1000 values. The result can be seen in figure 15.


FinalMergeS.JPG

Figure 16.Land suitability.


The final step is to reconvert the raster to vector, and add the road_centerlines data. To reconvert:

1. navigate to Processing Toolbox--> GRASS--> Raster--> r.to.vect.

2. Set the input as the land suitability raster, with "area" as the feature type.

3. Name appropriately.

4. Leave the rest as default.

5. Run.


Land allocation.PNG

Figure 17. The "raster to vector" tool.


It is here that the road_centerlines become relevant, so if they are not on the mapset yet, they can be added now. Open the symbology settings by right-clicking the vector and selecting “Properties”.

In the “symbology” tab, set the Legend Type to “Catagorized” and Classification field (here labelled "column") to “VALUE”, and click the Classify radio button. This should add the "0", "1", and "1000" values.


SYMBOLOGY.PNG

Figure 18. The symbology of the newly created vector map should indicate the null values (represented by the 0), the "1"(indicating suitability) and the "1000" (indicating unsuitability), shown here in grey, green, and red, respectively. The road network is indicated in black."


FINALPRODUCT.PNG

Figure 19. A land allocation map with Green areas displaying possible Waste Incineration Facility Locations.


If desired, a map layout can be applied, but it is not strictly necessary.

Conclusion

This tutorial showed how to create a land allocation map for waste allocation, using two open-source software packages. The original version of the project included steps that required coding, as well as the use of a stand-alone GRASS GIS application. In the updated version of QGIS integrated with GRASS, this is no longer necessary. However, QGIS does have command prompt scripting capabilities, if a person preferred. OpenOffice Calc is an open source, MS Excel alternative that enables editing of the attribute tables. Ms Excel can be used for users that find it easier to use and execute similar activites. It is possible to perform this task within QGIS itself using the map calculator in the application, but this option can be less intuitive, and more cumbersome.

References

  • Fraser, John Z. (1976). Mineral Resource Survey. In DIVISION OF MINES, GEOLOGICAL BRANCH Open File Report 5217. Retried November 25, 2010 from

Online Reference