Difference between revisions of "Land Use Change Assessment Two Ways in SAGA GIS"

From CUOSGwiki
Jump to navigationJump to search
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=Introduction=
 
=Introduction=
The purpose of this tutorial is to introduce users to land use change assessment in SAGA GIS. This will be done two ways, in order to help users to choose which is best for their applications. There will be step-by-step instructions on how to use SAGA GIS to do this assessment. This tutorial will be designed for those who have never used SAGA, and each step will be very detailed. If you have used SAGA before you may be able to skip some parts.
+
The purpose of this tutorial is to introduce users to doing a land use change assessment in SAGA GIS. This will be done using an unsupervised classification, then the land use change assessment. There will be step-by-step instructions on how to use SAGA GIS, as the tutorial is designed for those who have never used SAGA GIS. Each step will be very detailed, therefore if you have used SAGA before, you may be able to skip through some parts.
 
==Land use change assessment==
 
==Land use change assessment==
Land use change assessments can be useful to detect the extent of human influence on natural environment. This is often done by taking two satellite images from different time periods and classifying them, and then calculating the difference between both classified images. ADD MORE INFO.
+
Land use change assessments can be useful to detect the extent of human influence on the natural environment. This is often done by taking two satellite images from different time periods and classifying them, them calculating the difference between both classified images, as well as comparing their histograms, and analyzing a confusion matrix.
  +
  +
Land cover change and land use change are two different types of analysis. Land cover change indicates the physical land type, which can be forest, water, etc, whereas land use is based on how people are using the land.
  +
  +
For this analysis, we want to look at how much a suburb has expanded, and taken over green space, therefore we will be doing a land use change.
 
==SAGA GIS==
 
==SAGA GIS==
SAGA GIS is a free open source software that can be run under Windows and Linux operating systems. SAGA stands for System for Automated Geoscientific Analysis. According to SAGA's website, it is a GIS that has been designed for an easy and effective implementation of spatial algorithms. It offers a comprehensive, growing set of geoscientifc methods and provides easily approachable user interface with many visualisation options. To learn more about SAGA [[www.saga-gis.org| here is the link to their site.]]
+
SAGA GIS is a free open source software that can be run under Windows and Linux operating systems. SAGA stands for System for Automated Geoscientific Analysis. According to SAGA's website, it is a GIS that has been designed for an easy and effective implementation of spatial algorithms. It offers a comprehensive, growing set of geoscientifc methods and provides easily approachable user interface with many visualization options. To learn more about SAGA [[www.saga-gis.org| here is the link to their site.]]
   
 
In order to do the analysis outlined on this page, you will need to download SAGA GIS onto your computer, using the following link [https://sourceforge.net/projects/saga-gis/| SAGA GIS download].
 
In order to do the analysis outlined on this page, you will need to download SAGA GIS onto your computer, using the following link [https://sourceforge.net/projects/saga-gis/| SAGA GIS download].
   
 
==Data==
 
==Data==
The data used in this tutorial was obtained from Google Earth Engine, and I have provided it below. There are two images, the first is an ortho image of Orleans in 2006, and the second is an ortho image of the same area in 2016. These images were chosen as there is a clear change in land use in the 10 years between the images. There are other sources for finding ortho images, such as Land Viewer, and USGS....
+
To do the analysis, you will need two satellite images of the same area. Below, there are two images provided that have been obtained form Google Earth Engine. The images are of Orleans, a suburb in Ottawa, from 2006 and 2016. This area was chosen as there is a significant change in land use between 2006 and 2016 in that area. If you are planning on doing you own analysis, there are many sources to obtain free satellite imagery, these include Land Viewer, USGS, Google Earth Engine (if images are not being used for business), and many others can be found with a quick search on the internet.
   
[[File:Orleans2006.tif|thumb]]
+
[[File:Orleans2006.tif|300px]]
  +
... add data.
 
  +
[[File:Orleans2016.tif|300px]]
   
 
=Pre Classification Workflow=
 
=Pre Classification Workflow=
This is adding the data into SAGA, and setting it all up before classifying.
+
Once you've downloaded and opened up SAGA, you can close the tip window that pops up. Then, you need to add the data into SAGA, and set it up before classifying.
  +
After you have opened SAGA GIS, you need to add the two images provided, or your own two images. This can be done using the following steps:
 
  +
To add the images to the workspace, please follow the steps below:
   
 
'''Adding Data into SAGA GIS'''
 
'''Adding Data into SAGA GIS'''
   
In order to add the data into SAGA you must save it onto your computer somewhere where you can find it, then use the following steps. Below, there is also an image depicting the steps.
+
In order to add the data into SAGA you must save it onto your computer somewhere where you can find it.
   
1. In the top left corner click on Geoprocessing > Imagery > Landsat > Landsat Import with Options
+
1. In the top left corner click on Geoprocessing > Imagery > Landsat > Landsat Import with Options , as seen in the image below.
   
 
[[File:Opening Images.png|500px]]
 
[[File:Opening Images.png|500px]]
Line 39: Line 45:
   
 
=Classifying the data=
 
=Classifying the data=
  +
Next we need to classify the images. This is done by categorizing all pixels from the image into several land cover / land use classes. You will pick the number of classes based on what you are trying to accomplish with your analysis. Here, we are demonstrating how to do an unsupervised classification in SAGA, but it is also possible to do a supervised classification. In an unsupervised classification, the software classifies the images for you, whereas in a supervised classification, you must first collect training data, and the software will run the classification with that data.
bla bla bla
 
  +
 
==Unsupervised classification==
 
==Unsupervised classification==
In order to be able to do a land use change assessment, we must first simplify the images by classifying them. The first way we will do this is using a unsupervised classification method. This is demonstrated in the steps below.
+
In order to be able to do a land use change assessment, we must first simplify the images by classifying them. The first way we will do this is using a unsupervised classification method. This is demonstrated in the steps below. Another tutorial on how to do an unsupervised classification in SAGA GIS is available [[An_Introduction_to_Unsupervised_Image_Classification_in_SAGA_GIS| here.]]
   
 
===These steps need to be done for both images===
 
===These steps need to be done for both images===
   
1. Click Geoprocessing > Imagery > Classification > Unsupervised > K-Means Clustering for Grids
+
'''1.''' Click Geoprocessing > Imagery > Classification > Unsupervised > K-Means Clustering for Grids
   
We use the K-Means Clustering because it assumes that the number of clusters is known, whereas the ISODATA algorithm allows for different number of clusters. In order to keep things simple, we will be using K-Means Clustering. source (http://www.wu.ece.ufl.edu/books/EE/communications/UnsupervisedClassification.html#:~:text=The%20ISODATA%20algorithm%20is%20similar,minimize%20the%20within%20cluster%20variability.)
+
We use the K-Means Clustering because it assumes that the number of clusters is known, whereas the ISODATA algorithm allows for different number of clusters. In order to keep things simple, we will be using K-Means Clustering. [http://www.wu.ece.ufl.edu/books/EE/communications/UnsupervisedClassification.html#:~:text=The%20ISODATA%20algorithm%20is%20similar,minimize%20the%20within%20cluster%20variability.]
   
 
Once you've clicked on K-Means Clustering for Grids, a menu like the one below should pop-up.
 
Once you've clicked on K-Means Clustering for Grids, a menu like the one below should pop-up.
Line 55: Line 62:
 
As you can see, there are specific parameters used to create the unsupervised classification.
 
As you can see, there are specific parameters used to create the unsupervised classification.
   
- The grid system will be the same for both images, and it should be the only one to select from if you have not cropped the image.
+
* The grid system will be the same for both images, and it should be the only one to select from if you have not cropped the image.
   
- Because you have to classify both images, you must choose one image at a time for Grids
+
* Because you have to classify both images, you must choose one image at a time for Grids
   
- Clusters, Statistics, Methos and Cluster under Options can be left as is
+
* Clusters, Statistics, Methods and Cluster under Options can be left as is
   
- Maximum Iterations can be changed to zero **EXPLAIN**
+
* Maximum Iterations can be changed to zero
   
- And select Update Colors from Features, this will be useful for the next step
+
* And select Update Colours from Features, this will be useful for the next step
   
Once you have changed these parameters, click Okay. You can now display your classified images on the map, the same way as putting the original images on it.
+
Once you have changed these parameters, click Okay, they will appear in the data tab. You can now display your classified images on the map, the same way as putting the original images on it.
   
  +
This step just assigns each pixel a vlaue/colour.
2. Now we must simplify the images further by taking the classified table and assigning each cluster a name and colour.
 
   
 
'''2.''' In order to reclassify the images we need to narrow down what classes we'd like to include based on what we are hoping to find. Because the data we are working with is an urban setting I'm mostly interested in seeing how much the urban area has grown, and replaced greenspace. So, we will be taking our 10 classes and narrowing them down to three classes. Water, urban, and green space. It is really up to you on how many classes you would like to include, and will vary based on what you are trying to accomplish.
- To do this, under properties, go to settings and scroll to the bottom of the page where under '''classified''' you will find Table,
 
   
  +
In order to keep things simple, we can assign each class a number:
- Click on the ... to open the table displaying the colours and clusters. Your map and table should look something like the image below for the Orleans 2016 image.
 
 
[[File:Pre change unsupervised.png|600px]]
 
 
- As can be seen, there are 10 classes, but many of them are similar. Because we are trying to determine land use change, we will be relabeling and recolouring some of the classes.
 
 
- We will narrow it down to three classes, '''Urban''', '''Greenspace''', and '''Water'''.
 
 
- When looking at the image, most of what is white, or grey would be considered urban, black looks like water, and green looks like greenspace, therefore we can change the names from cluster to their respective names, as well as assign a colour for each of the three names, as seen below. Once this is done, save the table as a .txt file by pressing save, then press okay.
 
 
[[File:Reclass unsupervised table.png|400px]]
 
 
- Now that both images are reclassified, you can open them up to see what just three colours and classes look like on the maps. They should look something like the image below.
 
 
[[File:Reclassified images unsupervised.png|500px]]
 
 
This is the end of unsupervised classification
 
 
==Reclass to be copy pasted==
 
 
2. In order to reclassify the images we need to narrow down what classes we'd like to include based on what we are hoping to find. Because the data we are working with is an urban setting I'm mostly interested in seeing how much the urban area has grown, and replaced greenspaces. So, we will be taking our 10 classes and narrowing them down to three classes. Water, urban, and green space. Water is to be included for demonstration purposes.
 
   
 
'''Urban will be identified as - 1'''
 
'''Urban will be identified as - 1'''
Line 98: Line 85:
   
 
'''Greenspace will be identified as - 3'''
 
'''Greenspace will be identified as - 3'''
 
The following steps need to be done for both years.
 
   
 
a.
 
a.
   
- Open the classified table, under settings. Here you can either change the colour of each class, or change the description to the name of one of the three classes. In the image below, both have been done, as you can see there are three colors, each representing a class, and the description has been changed.
+
* Open the classified table, under settings. Here you can either change the colour of each class, or change the description to the name of one of the three classes. In the image below, both have been done, as you can see there are three colors, each representing a class, and the description has been changed.
   
- Once those changes have been made, save this table into the workspace by clicking workspace, under save, then press okay.
+
* Once those changes have been made, save this table into the workspace by clicking workspace, under save, then press okay.
   
 
[[File:Reclass1.png|500px]]
 
[[File:Reclass1.png|500px]]
   
b. Open your new table, it will be below the grids in data.
+
* Open your new table, it will be below the grids in data.
   
- Now, add a new field by pressing ''add field'' on the top menu bar. This field will be our land cover class value.
+
* Add a new field by pressing ''add field'' on the top menu bar. This field will be our land cover class value.
   
- Open the table and press the add field button on the top menu bar as shown here. We want to add a new field that will contain our land cover class value.
+
* Open the table and press the add field button on the top menu bar as shown here. We want to add a new field that will contain our land cover class value.
   
- Name the field '''New''' and make sure it is a integer number. It is also important for the position of the field to be before ''Minimum'', as seen in the picture below.
+
* Name the field '''New''' and make sure it is a integer number. It is also important for the position of the field to be before ''Minimum'', as seen in the picture below.
   
- Press Okay
+
* Press Okay
   
 
[[File:Addfield.png|600px]]
 
[[File:Addfield.png|600px]]
   
- You will now have a field titled New. Assign each cluster their proper value based on the colour and/or description you assigned them in step a. Your table should now look like the one below.
+
* You will now have a field titled New. Assign each cluster their proper value based on the colour and/or description you assigned them in step a. Your table should now look like the one below.
   
 
[[File:Reclass num.png|500px]]
 
[[File:Reclass num.png|500px]]
   
- Now you must delete Color, Name, and Description using the delete field option, which is right beside the add field option. Once that is done, press Okay.
+
* You must delete Color, Name, and Description using the delete field option, which is right beside the add field option. Once that is done, press Okay.
   
 
[[File:Erase fields.png|600px]]
 
[[File:Erase fields.png|600px]]
   
- Your new table should just have three variables, New, Minimum, and Maximum, this will be used as our reclassification table.
+
* Your new table should just have three variables, New, Minimum, and Maximum, this will be used as our reclassification table.
   
c. To reclassify the cluster grid you must:
+
'''3.''' To reclassify the cluster grid you must:
   
- Geoprocessing > Grid > Values > Change Grid Values
+
* Geoprocessing > Grid > Values > Change Grid Values
   
- The parameters you need to set in Change Grid Values are displayed in the image below. Grid system and Grid will depend on what your map looks like, as well as what you've named it. But, grid will be the product of your unsupervised classification, not the original image.
+
* The parameters you need to set in Change Grid Values are displayed in the image below. Grid system and Grid will depend on what your map looks like, as well as what you've named it. But, grid will be the product of your unsupervised classification, not the original image.
   
 
[[File:ChangegridValues.png|700px]]
 
[[File:ChangegridValues.png|700px]]
   
- In Lookup table you will click on'''...''' then workspace, beneath load, and choose the table for the year you are working with
+
* In Lookup table you will click on'''...''' then workspace, beneath load, and choose the table for the year you are working with
   
 
[[File:Lookuptableworkspace.png|600px]]
 
[[File:Lookuptableworkspace.png|600px]]
   
-Once you've followed the steps outlined in the image, and have pressed okay, your table should look something like the image below.
+
* Once you've followed the steps outlined in the image, and have pressed okay, your table should look something like the image below.
   
 
[[File:New look up table.png|400px]]
 
[[File:New look up table.png|400px]]
   
- Once you've closed that table, you can open the new map it has created. You will notice that it shows up in graduated colours, so under settings, under colours you should change it to classified.
+
* After you've closed that table, you can open the new map it has created. You will notice that it shows up in graduated colours, so under settings, under colours you should change it to classified.
   
 
[[File:New map reclassified.png|500px]]
 
[[File:New map reclassified.png|500px]]
   
- Open the table under classified. You will notice that only two classes show up, in red and black. Depending on how you've classified your variables, you will have to make some changes.
+
* Open the table under classified. You will notice that only two classes show up, in red and black. Depending on how you've classified your variables, you will have to make some changes.
   
- Add a class by clicking add, and rename all the classes with the appropriate labels, as well as change class one minimum and maximum to 1, class 2, to 2, class 3 to 3. You should also change the colours. Below, you will see what the table will originally look like, and then what it should resemble.
+
* Add a class by clicking add, and rename all the classes with the appropriate labels, as well as change class one minimum and maximum to 1, class 2, to 2, class 3 to 3. You should also change the colours. Below, you will see what the table will originally look like, and then what it should resemble.
   
 
[[File:Table before.png|450px]] [[File:Table_after.png|500px]]
 
[[File:Table before.png|450px]] [[File:Table_after.png|500px]]
   
- Finally, you will have an image that looks something like the image below. Don't forget to do this for both images.
+
* Finally, you will have an image that looks something like the image below. Don't forget to do this for both images.
   
 
[[File:Final reclassified product.png|500px]]
 
[[File:Final reclassified product.png|500px]]
Line 164: Line 149:
 
Now, we will go over a few ways to compare 2006 and 2016, in order to determine how the land has changed based on our unsupervised classification.
 
Now, we will go over a few ways to compare 2006 and 2016, in order to determine how the land has changed based on our unsupervised classification.
   
1. First we will look at the histograms for both years, this can be done by right clicking on the classified image, and selecting histogram, as seen in the image below. The histograms should look something like the second image below.
+
'''1.''' First we will look at the histograms for both years, this can be done by right clicking on the classified image, and selecting histogram, as seen in the image below. The histograms should look something like the second image below.
   
[[File:Histogram.png|200px]]
+
[[File:Histogram.png|300px]]
   
 
[[File:Histogram 2.png|500px]]
 
[[File:Histogram 2.png|500px]]
Line 178: Line 163:
 
The table will appear in the data tab, which you can then open to view the area of each class in square meters.
 
The table will appear in the data tab, which you can then open to view the area of each class in square meters.
   
[[File:Histogram table1.png|300px]] [[File:Histogram tables 2.png|400px]]
+
[[File:Histogram table1.png|300px]] [[File:Histogram tables 2.png|450px]]
   
  +
In order to compare the land cover changes more directly, we can combine the two tables. First, rename the area column in both tables to their respective year. This will help when working with the combined table. Please see image below on how to change field names.
 
  +
'''2.'''In order to compare the land cover changes more directly, we can combine the two tables.
  +
 
First, rename the area column in both tables to their respective year. This will help when working with the combined table. Please see image below on how to change field names.
   
 
Right click on Area, and select rename fields. Then, change the name, as seen in the second picture below.
 
Right click on Area, and select rename fields. Then, change the name, as seen in the second picture below.
Line 198: Line 186:
 
In the diagram properties window select the:
 
In the diagram properties window select the:
   
- Display type as bar
+
* Display type as bar
   
- Label value as 'name'
+
* Label value as 'name'
   
- Choose the two area attributes
+
* Choose the two area attributes
   
Then click Okay. Before pressing okay, your properties should look like the image below.
+
Before pressing okay, your properties should look like the image below.
   
 
[[File:Properties of bar graph.png|400px]]
 
[[File:Properties of bar graph.png|400px]]
Line 211: Line 199:
   
 
[[File:Result Graph.png|400px]]
 
[[File:Result Graph.png|400px]]
  +
  +
This graph is another way to visualize the changes, the colours can be changed as you see fit.
  +
  +
We can see that Urban has increased in the 10 years, whereas water and greenspace have both decreased, as was expected.
   
 
===Confusion Matrix===
 
===Confusion Matrix===
Line 220: Line 212:
 
We will also need an input look up table to define the cell class names.
 
We will also need an input look up table to define the cell class names.
   
Open a lookup table from one of your classified grids (2006 or 2016) and save it to your workspace, as demonstrated before in *fig ?*
+
Open a lookup table from one of your classified grids (2006 or 2016) and save it to your workspace.
   
 
To create the confusion matrix use:
 
To create the confusion matrix use:
   
Geoprocessing > Imagery > Classification > Confusion Matrix (Two Grids)
+
'''Geoprocessing > Imagery > Classification > Confusion Matrix (Two Grids)'''
   
 
Please use the properties as seen in the image below to fill out the confusion matrix. Table was the table we just saved to the workspace. Once you've filled out the properties, press Okay.
 
Please use the properties as seen in the image below to fill out the confusion matrix. Table was the table we just saved to the workspace. Once you've filled out the properties, press Okay.
   
[[File:Confusion matrix.png|400px]]
+
[[File:Confusion matrix.png|500px]]
   
 
A new image will appear in the data window, which should look something like the image below. You can also open the table for the image to see what classes have changed, and from which types of land use.
 
A new image will appear in the data window, which should look something like the image below. You can also open the table for the image to see what classes have changed, and from which types of land use.
   
[[File:Confusion Matrix 2.png|500px]]
+
[[File:Confusion Matrix 2.png|550px]]
   
 
You can also view the image as a histogram by right clicking on it in the data window and selecting histogram, it will look similar to the image below
 
You can also view the image as a histogram by right clicking on it in the data window and selecting histogram, it will look similar to the image below
Line 238: Line 230:
 
[[File:Histogram matrix.png|400px]]
 
[[File:Histogram matrix.png|400px]]
   
Another way to see the changes are by opening the confusion table, which will also appear in the data window. It should be labeled as confusion by default.
+
Another way to see the changes are by opening the confusion table, which will also appear in the data window. This table shows pixel values, which can be converted into square meters or kilometres. It should be labeled as confusion by default.
  +
 
[[File:Confusion table.png|550px]]
  +
 
In order to determine the change in land use these can be converted to meters or kilometres squared by doing the following steps:
  +
 
* The cell value of this data is 30, therefore we can multiply the value by 900 (30x30), which would be the value in m2.
  +
 
* If you would like it in km2, divide that number by 1,000,000.
  +
  +
Converting the pixels to interpretable numbers enables us to determine how land use has changed over a ten year time span. For example from 2006 to 2016, 9.6 square kilometres of greenspace turned into urban area, and 1.7 square kilometres of 'water' was turned into urban area as well.
  +
  +
This concludes the tutorial on how to do a land use change assessment using SAGA GIS.
  +
  +
=Conclusion=
  +
  +
When preparing to do a land use change assessment, we must first classify the data using either a unsupervised, or supervised classification. This way, both images we are looking to compare have the same values assigned to pixels. Deciding which classification method to use is up to the user, and most software can do both classifications. When doing the land use change assessment, there are qualitative and quantitative methods used to analyze the outcome, and both can be used to determine the change between years, based on what you are trying to accomplish.
   
  +
=Resources=
[[File:Confusion table.png|500px]]
 
   
  +
[http://www.wu.ece.ufl.edu/books/EE/communications/UnsupervisedClassification.html#:~:text=The%20ISODATA%20algorithm%20is%20similar,minimize%20the%20within%20cluster%20variability.| Unsupervised Classification algorithms explained]
The values shown in the table are the pixel count. These can be converted to meters or kilometers squared by doing the following steps:
 
   
  +
[http://www.saga-gis.org www.saga-gis.org| SAGA GIS website]
The cell value of this data is 30, therefore we can multiply the value by 900 (30x30), which would be the value in m2
 
   
  +
[[An_Introduction_to_Unsupervised_Image_Classification_in_SAGA_GIS| Unsupervised classification in SAGA GIS]]
If you would like it in km2, divide that number by 1,000,000.
 

Latest revision as of 18:07, 17 December 2020

Introduction

The purpose of this tutorial is to introduce users to doing a land use change assessment in SAGA GIS. This will be done using an unsupervised classification, then the land use change assessment. There will be step-by-step instructions on how to use SAGA GIS, as the tutorial is designed for those who have never used SAGA GIS. Each step will be very detailed, therefore if you have used SAGA before, you may be able to skip through some parts.

Land use change assessment

Land use change assessments can be useful to detect the extent of human influence on the natural environment. This is often done by taking two satellite images from different time periods and classifying them, them calculating the difference between both classified images, as well as comparing their histograms, and analyzing a confusion matrix.

Land cover change and land use change are two different types of analysis. Land cover change indicates the physical land type, which can be forest, water, etc, whereas land use is based on how people are using the land.

For this analysis, we want to look at how much a suburb has expanded, and taken over green space, therefore we will be doing a land use change.

SAGA GIS

SAGA GIS is a free open source software that can be run under Windows and Linux operating systems. SAGA stands for System for Automated Geoscientific Analysis. According to SAGA's website, it is a GIS that has been designed for an easy and effective implementation of spatial algorithms. It offers a comprehensive, growing set of geoscientifc methods and provides easily approachable user interface with many visualization options. To learn more about SAGA here is the link to their site.

In order to do the analysis outlined on this page, you will need to download SAGA GIS onto your computer, using the following link SAGA GIS download.

Data

To do the analysis, you will need two satellite images of the same area. Below, there are two images provided that have been obtained form Google Earth Engine. The images are of Orleans, a suburb in Ottawa, from 2006 and 2016. This area was chosen as there is a significant change in land use between 2006 and 2016 in that area. If you are planning on doing you own analysis, there are many sources to obtain free satellite imagery, these include Land Viewer, USGS, Google Earth Engine (if images are not being used for business), and many others can be found with a quick search on the internet.

File:Orleans2006.tif

File:Orleans2016.tif

Pre Classification Workflow

Once you've downloaded and opened up SAGA, you can close the tip window that pops up. Then, you need to add the data into SAGA, and set it up before classifying.

To add the images to the workspace, please follow the steps below:

Adding Data into SAGA GIS

In order to add the data into SAGA you must save it onto your computer somewhere where you can find it.

1. In the top left corner click on Geoprocessing > Imagery > Landsat > Landsat Import with Options , as seen in the image below.

Opening Images.png

2. Once you've clicked on Landsat Import with Options, a window will pop up like the one below. In this situation you have to click on the ... beside Okay to find the data you would like to select. Once you've selected your data, press Okay.

Opening Images2.png

3. To add both images to the map, in Manager, under Data you must double click on both files, and they will appear

Display maps.png

Once you have followed these three steps, your workspace should look something like this:

Workspace.png

Classifying the data

Next we need to classify the images. This is done by categorizing all pixels from the image into several land cover / land use classes. You will pick the number of classes based on what you are trying to accomplish with your analysis. Here, we are demonstrating how to do an unsupervised classification in SAGA, but it is also possible to do a supervised classification. In an unsupervised classification, the software classifies the images for you, whereas in a supervised classification, you must first collect training data, and the software will run the classification with that data.

Unsupervised classification

In order to be able to do a land use change assessment, we must first simplify the images by classifying them. The first way we will do this is using a unsupervised classification method. This is demonstrated in the steps below. Another tutorial on how to do an unsupervised classification in SAGA GIS is available here.

These steps need to be done for both images

1. Click Geoprocessing > Imagery > Classification > Unsupervised > K-Means Clustering for Grids

We use the K-Means Clustering because it assumes that the number of clusters is known, whereas the ISODATA algorithm allows for different number of clusters. In order to keep things simple, we will be using K-Means Clustering. [1]

Once you've clicked on K-Means Clustering for Grids, a menu like the one below should pop-up.

Unsupervised commands.png

As you can see, there are specific parameters used to create the unsupervised classification.

  • The grid system will be the same for both images, and it should be the only one to select from if you have not cropped the image.
  • Because you have to classify both images, you must choose one image at a time for Grids
  • Clusters, Statistics, Methods and Cluster under Options can be left as is
  • Maximum Iterations can be changed to zero
  • And select Update Colours from Features, this will be useful for the next step

Once you have changed these parameters, click Okay, they will appear in the data tab. You can now display your classified images on the map, the same way as putting the original images on it.

This step just assigns each pixel a vlaue/colour.

2. In order to reclassify the images we need to narrow down what classes we'd like to include based on what we are hoping to find. Because the data we are working with is an urban setting I'm mostly interested in seeing how much the urban area has grown, and replaced greenspace. So, we will be taking our 10 classes and narrowing them down to three classes. Water, urban, and green space. It is really up to you on how many classes you would like to include, and will vary based on what you are trying to accomplish.

In order to keep things simple, we can assign each class a number:

Urban will be identified as - 1

Water will be identified as - 2

Greenspace will be identified as - 3

a.

  • Open the classified table, under settings. Here you can either change the colour of each class, or change the description to the name of one of the three classes. In the image below, both have been done, as you can see there are three colors, each representing a class, and the description has been changed.
  • Once those changes have been made, save this table into the workspace by clicking workspace, under save, then press okay.

Reclass1.png

  • Open your new table, it will be below the grids in data.
  • Add a new field by pressing add field on the top menu bar. This field will be our land cover class value.
  • Open the table and press the add field button on the top menu bar as shown here. We want to add a new field that will contain our land cover class value.
  • Name the field New and make sure it is a integer number. It is also important for the position of the field to be before Minimum, as seen in the picture below.
  • Press Okay

Addfield.png

  • You will now have a field titled New. Assign each cluster their proper value based on the colour and/or description you assigned them in step a. Your table should now look like the one below.

Reclass num.png

  • You must delete Color, Name, and Description using the delete field option, which is right beside the add field option. Once that is done, press Okay.

Erase fields.png

  • Your new table should just have three variables, New, Minimum, and Maximum, this will be used as our reclassification table.

3. To reclassify the cluster grid you must:

  • Geoprocessing > Grid > Values > Change Grid Values
  • The parameters you need to set in Change Grid Values are displayed in the image below. Grid system and Grid will depend on what your map looks like, as well as what you've named it. But, grid will be the product of your unsupervised classification, not the original image.

ChangegridValues.png

  • In Lookup table you will click on... then workspace, beneath load, and choose the table for the year you are working with

Lookuptableworkspace.png

  • Once you've followed the steps outlined in the image, and have pressed okay, your table should look something like the image below.

New look up table.png

  • After you've closed that table, you can open the new map it has created. You will notice that it shows up in graduated colours, so under settings, under colours you should change it to classified.

New map reclassified.png

  • Open the table under classified. You will notice that only two classes show up, in red and black. Depending on how you've classified your variables, you will have to make some changes.
  • Add a class by clicking add, and rename all the classes with the appropriate labels, as well as change class one minimum and maximum to 1, class 2, to 2, class 3 to 3. You should also change the colours. Below, you will see what the table will originally look like, and then what it should resemble.

Table before.png Table after.png

  • Finally, you will have an image that looks something like the image below. Don't forget to do this for both images.

Final reclassified product.png

Land Use Change Assessment

Now, we will go over a few ways to compare 2006 and 2016, in order to determine how the land has changed based on our unsupervised classification.

1. First we will look at the histograms for both years, this can be done by right clicking on the classified image, and selecting histogram, as seen in the image below. The histograms should look something like the second image below.

Histogram.png

Histogram 2.png

The histograms help visualize how the land use has changed. As can be seen, there is more urban space, and less water and greenspace in 2016 than there was in 2006. Evidently, some of what was classified as water should actually be greenspace, but we can still see that the urban has taken over those areas as well, therefore we will leave it as is. In the future, more classes when doing the unsupervised classification may be necessary.

Alternatively, you can view the data in tabulated form by selecting convert to table when the histogram is open.

Convert to table.png

The table will appear in the data tab, which you can then open to view the area of each class in square meters.

Histogram table1.png Histogram tables 2.png


2.In order to compare the land cover changes more directly, we can combine the two tables.

First, rename the area column in both tables to their respective year. This will help when working with the combined table. Please see image below on how to change field names.

Right click on Area, and select rename fields. Then, change the name, as seen in the second picture below.

Rename area.png Rename field to year.png

To combine the two tables use

Geoprocessing > Tables > Tools > Join Attributes from a table

Choose the two histogram tables (2006 and 2016), make sure you have the same parameters as the image below, then click okay.

JoinAttributeTable.png

Right click on the resulting combined table and select ‘Diagram’. It should be the last table under data.

In the diagram properties window select the:

  • Display type as bar
  • Label value as 'name'
  • Choose the two area attributes

Before pressing okay, your properties should look like the image below.

Properties of bar graph.png

Your graph will appear, and look something like the one below.

Result Graph.png

This graph is another way to visualize the changes, the colours can be changed as you see fit.

We can see that Urban has increased in the 10 years, whereas water and greenspace have both decreased, as was expected.

Confusion Matrix

A confusion matrix is a technique used for comparing changes between two raster data sets.

To produce a confusion matrix, grid classes must be defined by the lookup table and values of the grid classes for each image must be the same. Here, we will use the classified grids from 2006 and 2016 to create a confusion matrix.

We will also need an input look up table to define the cell class names.

Open a lookup table from one of your classified grids (2006 or 2016) and save it to your workspace.

To create the confusion matrix use:

Geoprocessing > Imagery > Classification > Confusion Matrix (Two Grids)

Please use the properties as seen in the image below to fill out the confusion matrix. Table was the table we just saved to the workspace. Once you've filled out the properties, press Okay.

Confusion matrix.png

A new image will appear in the data window, which should look something like the image below. You can also open the table for the image to see what classes have changed, and from which types of land use.

Confusion Matrix 2.png

You can also view the image as a histogram by right clicking on it in the data window and selecting histogram, it will look similar to the image below

Histogram matrix.png

Another way to see the changes are by opening the confusion table, which will also appear in the data window. This table shows pixel values, which can be converted into square meters or kilometres. It should be labeled as confusion by default.

Confusion table.png

In order to determine the change in land use these can be converted to meters or kilometres squared by doing the following steps:

  • The cell value of this data is 30, therefore we can multiply the value by 900 (30x30), which would be the value in m2.
  • If you would like it in km2, divide that number by 1,000,000.

Converting the pixels to interpretable numbers enables us to determine how land use has changed over a ten year time span. For example from 2006 to 2016, 9.6 square kilometres of greenspace turned into urban area, and 1.7 square kilometres of 'water' was turned into urban area as well.

This concludes the tutorial on how to do a land use change assessment using SAGA GIS.

Conclusion

When preparing to do a land use change assessment, we must first classify the data using either a unsupervised, or supervised classification. This way, both images we are looking to compare have the same values assigned to pixels. Deciding which classification method to use is up to the user, and most software can do both classifications. When doing the land use change assessment, there are qualitative and quantitative methods used to analyze the outcome, and both can be used to determine the change between years, based on what you are trying to accomplish.

Resources

Unsupervised Classification algorithms explained

www.saga-gis.org| SAGA GIS website

Unsupervised classification in SAGA GIS