Difference between revisions of "Change Detection using Whitebox"

From CUOSGwiki
Jump to navigationJump to search
 
(127 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
 
== Disclaimer ==
 
== Disclaimer ==
   
  +
Please note that this tutorial has been created for [http://www3.carleton.ca/cu0809uc/courses/GEOM/4008.html GEOM 4008 Advanced Topics in Geographic Information Systems] at [http://www.carleton.ca/ Carleton University] in order to demonstrate a method of change detection analysis using [http://en.wikipedia.org/wiki/Free_and_open-source_software Free and Open-Source Software (FOSS)]. It is highly recommended that these steps are followed in the order that they appear to avoid confusion. The tutorial is set up to be performed on a Windows operating system.
this is a test
 
 
   
 
== Purpose ==
 
== Purpose ==
   
  +
The purpose of the project was to develop a method to detect change in an environment using FOSS. This tutorial has been created to allow individuals who are not familiar with GIS to successfully complete this analysis using [http://www.uoguelph.ca/~hydrogeo/Whitebox/ Whitebox (3.2.1)]. This tutorial will be carried out by analyzing the temporal changes that occur in a subsection of the [http://en.wikipedia.org/wiki/Greater_Toronto_Area Greater Toronto Area (GTA)]. The end result of this tutorial will be the creation of a change detection map using the [http://www.uoguelph.ca/~hydrogeo/Whitebox/Help/WriteFunctionMemoryInsertion.html write function memory insertion] method. This will provide qualitative insight into the temporal change of land cover in a subsection of the GTA.
this is a test
 
 
   
 
== Data ==
 
== Data ==
   
  +
In order to perform a change detection analysis, satellite imagery is required. For this tutorial, Landsat imagery of the GTA will be used and can be found by in the [http://www.usgs.gov/ United States Geological Survey (USGS)] Landsat image database using the search tool [http://earthexplorer.usgs.gov/ Earth Explorer].
Again this is a test
 
  +
  +
[[File:Datatable.jpg|centre]]
  +
  +
Note: A [https://earthexplorer.usgs.gov/register/ free account] with the USGS is required to download the required Level 1 satellite data and to also have the option for batch downloads.
  +
  +
== Whitebox Installation ==
  +
  +
Whitebox can be downloaded from the following [http://www.uoguelph.ca/~hydrogeo/Whitebox/download.shtml link], and the zip file can be extracted to a user defined location. Whitebox unlike other programs does not require the software to be installed onto a computer. Instead, Whitebox runs as an [http://en.wikipedia.org/wiki/JAR_%28file_format%29 executable jar file] which uses Java to operate, meaning that Java must be installed on the computer to operate.
  +
  +
Note: While running Whitebox, an out of memory error window can occur. To fix this issue a 64-bit version of java is required. The following [http://whiteboxgeospatial.wordpress.com/2014/02/05/getting-the-most-out-of-whitebox-gat/ link], gives a detailed explanation as to why the error occurs along with the steps necessary to fix the error.
  +
  +
== Methodology ==
  +
  +
=== Starting Whitebox ===
  +
  +
*Locate and open the extracted Whitebox 3.2.1 folder [[File:FolderPic.jpg]]
  +
  +
*Click on WhiteboxGIS file
  +
  +
=== Adding Landsat Data ===
  +
  +
The type of change detection analysis being performed requires two different Landsat Bands. The first Landsat band is band one from the 2004 Landsat image and band one from the 2011 Landsat image.
  +
  +
*Click on the Tools tab above the table of contents on the left
  +
  +
*Click Data Import/Export from the available tools
  +
  +
*Click Import GeoTIFF (.tif)
  +
[[File:ImportGeoTIFF.jpg|centre]]
  +
  +
*The Import GeoTIFF window will appear
  +
[[File:ImportGeoTIFFWind.jpg|centre]]
  +
*Click on the open folder icon
  +
  +
*Browse to the location where the Landsat images were extracted too
  +
  +
*Select Band one from the 2004 Landsat image
  +
  +
*Click open
  +
  +
*Band one for the 2004 Landsat should now appear within the dialog box of the Import GeoTIFF window
  +
  +
*Click run to add band one to Whitebox
  +
[[File:Band1inWindow.jpg|centre]]
  +
  +
*This process is repeated for band 1 for the 2011 Landsat image
  +
  +
=== Changing Projection ===
  +
  +
Each band will be transformed into WGS 84 UTM Zone 18N.
  +
  +
*Click on the Tools tab above the table of content on the left
  +
  +
*Click Conversion Tools from the available tools
  +
  +
*Click on Coordinate System Transformation
  +
[[File:ImportGeoTIFF.jpg|centre]]
  +
  +
*The Coordinate System Transformation window will appear
  +
[[File:CSTWindow.jpg|centre]]
  +
  +
*Click on the open folder relating to the input file
  +
  +
*Browse the location of band one for the 2004 Landsat image
  +
  +
*Select the band one file with the .dep extension
  +
  +
*Click Open
  +
  +
*Click on the open folder relating to Output File
  +
  +
*Save the file in the same folder as the non-transformed band with the following name 2004-Band1-Transformed
  +
  +
*Click save
  +
  +
*Select UTM to Geographic (Lat/Long)
  +
  +
*Select WGS 84 for the ellipsoid
  +
  +
*Select Zone 17 and North
  +
  +
*Select Nearest Neighbour for Interpolation Method
  +
  +
*Click Okay to perform the transformation
  +
[[File:TransformedInputs.jpg|centre]]
  +
  +
*This process is repeated for band one of the 2011 Landsat image.
  +
  +
=== Adding Transformed Data ===
  +
  +
*Click the add layer button located along the top toolbar [[File:Addbutton.jpg]]
  +
  +
*Browse to where the transformed band is located
  +
  +
*Select the transformed band
  +
  +
*Click Open
  +
  +
*This process is repeated for band one of the 2011 Landsat image.
  +
  +
=== Setting Area of Interest ===
  +
  +
Note: Whitebox currently has no way of modifying the vertices of a polygon shapefile. As a result, the area of interest will be manually selected.
  +
  +
*Click on the layers tab above the table of content on the left
  +
  +
*Right click on one of the transformed bands and select zoom to layer
  +
  +
*Click the zoom in button in the toolbar at the top
  +
[[File:zoomtolayer.jpg|centre]]
  +
  +
*With the zoom in button selected[[File:zoominbuton.jpg]] from the top toolbar, click and drag on the image, creating a square around a portion of the GTA
  +
[[File:selectingarea.jpg|centre]]
  +
  +
*Right click on 2004-Band1-Transformed layer found in the layers tab
  +
  +
*Click Clip layer to current extent
  +
[[File:Cliplayertocurrentextent.png|centre]]
  +
  +
*A popup window will appear, giving you the option to name the new layer. Call the new layer 2004-Band1-Transformed-Clipped making sure to use the same naming format for the 2011 Landsat Band
  +
  +
*This process is repeated for band one of the 2011 Landsat image.
  +
  +
=== Adding Clipped Data ===
  +
  +
*Click the add layer button located along the top toolbar [[File:Addbutton.jpg]]
  +
  +
*Browse to where the clipped 2004 band is located
  +
  +
*Select the clipped band
  +
  +
*Click Open
  +
  +
*This process is repeated for band one of the 2011 Landsat image.
  +
  +
=== Band Normalization ===
  +
  +
This step is to normalize the two Landsat bands to each other.
  +
  +
*Click on the Tools tab above the table of contents to the left
  +
  +
*Click on the Image Processing Tools under Available Tools
  +
  +
*Click on Image Enhancement
  +
  +
*Click on Histogram Match (Two Images)
  +
[[File:HistogramMatching.png|centre]]
  +
  +
*The Histogram Match (Two Images) window will appear
  +
[[File:HistogramMatchingWindow.jpg|centre]]
  +
  +
  +
*Click on the open folder relating to the Input Raster File To Modify
  +
  +
*Browse too and select 2004-Band1-Transformed-Clipped
  +
  +
*Click on the Input Reference Raster File
  +
  +
*Browse to and select 2011-Band1-Transformed-Clipped
  +
  +
*Click on the folder relating to the Output Raster File and name the file 2004-Band1-Transformed-Clipped-Matched
  +
  +
*Click Run to perform the histogram matching
  +
[[File:MatchedBand1.jpg|centre]]
  +
  +
=== Write Function Memory Insertion ===
  +
  +
*Click on the Tools tab above the table of contents to the left
  +
  +
*Click on the Image Processing Tools under Available Tools
  +
  +
*Click on Change Detection
  +
  +
*Click on Write Function Memory Insertion
  +
[[File:WFMLocation.jpg|centre]]
  +
  +
*The Write Function Memory Insertion window will appear
  +
[[File:WFMWindow.jpg|centre]]
  +
  +
*Click on the folder relating to the Input First Data File
  +
  +
*Browse to and select the 2004-Band1-Transformed-Clipped-Matched
  +
  +
*Click on the folder relating to the Input Second Date File
  +
  +
*Brose to and select the 2011-Band1-Transformed-Clipped
  +
  +
*Leave the Input Third Date File blank
  +
  +
*Click on the folder relating to Output Raster File and name the file Band1-ChangeDetection
  +
  +
*Click Run to perform the Write Function Memory Insertion
  +
[[File:WFMWindowfill.jpg|centre]]
  +
  +
*Output of write function memory insertion change detection method
  +
[[File:changedetectionfinalproduct.jpg|centre]]
  +
  +
== Conclusion ==
  +
  +
The final product of the tutorial is a qualitative assessment of temporal change occurring in the selected area of the GTA . The method of change detection used, write function memory insertion, is one of the many methods available in Whitebox. Although Whitebox does have some limitations, particularly with vector data, it has proven to be very effective in its ability to handle Landsat imagery for change detection analysis.
  +
  +
== References ==
  +
  +
[http://www.uoguelph.ca/~hydrogeo/Whitebox/Help/MainHelp.html Whitebox Geospatial Analysis Toolbox Help]
  +
  +
Jensen, J.R. 2005. Introductory digital image processing: A remote sensing perspective, 3rd Ed. Prentice Hall series in Geographic Information Science, Upper Saddle River, N.J.

Latest revision as of 23:53, 21 December 2014

Disclaimer

Please note that this tutorial has been created for GEOM 4008 Advanced Topics in Geographic Information Systems at Carleton University in order to demonstrate a method of change detection analysis using Free and Open-Source Software (FOSS). It is highly recommended that these steps are followed in the order that they appear to avoid confusion. The tutorial is set up to be performed on a Windows operating system.

Purpose

The purpose of the project was to develop a method to detect change in an environment using FOSS. This tutorial has been created to allow individuals who are not familiar with GIS to successfully complete this analysis using Whitebox (3.2.1). This tutorial will be carried out by analyzing the temporal changes that occur in a subsection of the Greater Toronto Area (GTA). The end result of this tutorial will be the creation of a change detection map using the write function memory insertion method. This will provide qualitative insight into the temporal change of land cover in a subsection of the GTA.

Data

In order to perform a change detection analysis, satellite imagery is required. For this tutorial, Landsat imagery of the GTA will be used and can be found by in the United States Geological Survey (USGS) Landsat image database using the search tool Earth Explorer.

Datatable.jpg

Note: A free account with the USGS is required to download the required Level 1 satellite data and to also have the option for batch downloads.

Whitebox Installation

Whitebox can be downloaded from the following link, and the zip file can be extracted to a user defined location. Whitebox unlike other programs does not require the software to be installed onto a computer. Instead, Whitebox runs as an executable jar file which uses Java to operate, meaning that Java must be installed on the computer to operate.

Note: While running Whitebox, an out of memory error window can occur. To fix this issue a 64-bit version of java is required. The following link, gives a detailed explanation as to why the error occurs along with the steps necessary to fix the error.

Methodology

Starting Whitebox

  • Locate and open the extracted Whitebox 3.2.1 folder FolderPic.jpg
  • Click on WhiteboxGIS file

Adding Landsat Data

The type of change detection analysis being performed requires two different Landsat Bands. The first Landsat band is band one from the 2004 Landsat image and band one from the 2011 Landsat image.

  • Click on the Tools tab above the table of contents on the left
  • Click Data Import/Export from the available tools
  • Click Import GeoTIFF (.tif)
ImportGeoTIFF.jpg
  • The Import GeoTIFF window will appear
ImportGeoTIFFWind.jpg
  • Click on the open folder icon
  • Browse to the location where the Landsat images were extracted too
  • Select Band one from the 2004 Landsat image
  • Click open
  • Band one for the 2004 Landsat should now appear within the dialog box of the Import GeoTIFF window
  • Click run to add band one to Whitebox
Band1inWindow.jpg
  • This process is repeated for band 1 for the 2011 Landsat image

Changing Projection

Each band will be transformed into WGS 84 UTM Zone 18N.

  • Click on the Tools tab above the table of content on the left
  • Click Conversion Tools from the available tools
  • Click on Coordinate System Transformation
ImportGeoTIFF.jpg
  • The Coordinate System Transformation window will appear
CSTWindow.jpg
  • Click on the open folder relating to the input file
  • Browse the location of band one for the 2004 Landsat image
  • Select the band one file with the .dep extension
  • Click Open
  • Click on the open folder relating to Output File
  • Save the file in the same folder as the non-transformed band with the following name 2004-Band1-Transformed
  • Click save
  • Select UTM to Geographic (Lat/Long)
  • Select WGS 84 for the ellipsoid
  • Select Zone 17 and North
  • Select Nearest Neighbour for Interpolation Method
  • Click Okay to perform the transformation
TransformedInputs.jpg
  • This process is repeated for band one of the 2011 Landsat image.

Adding Transformed Data

  • Click the add layer button located along the top toolbar Addbutton.jpg
  • Browse to where the transformed band is located
  • Select the transformed band
  • Click Open
  • This process is repeated for band one of the 2011 Landsat image.

Setting Area of Interest

Note: Whitebox currently has no way of modifying the vertices of a polygon shapefile. As a result, the area of interest will be manually selected.

  • Click on the layers tab above the table of content on the left
  • Right click on one of the transformed bands and select zoom to layer
  • Click the zoom in button in the toolbar at the top
Zoomtolayer.jpg
  • With the zoom in button selectedZoominbuton.jpg from the top toolbar, click and drag on the image, creating a square around a portion of the GTA
Selectingarea.jpg
  • Right click on 2004-Band1-Transformed layer found in the layers tab
  • Click Clip layer to current extent
Cliplayertocurrentextent.png
  • A popup window will appear, giving you the option to name the new layer. Call the new layer 2004-Band1-Transformed-Clipped making sure to use the same naming format for the 2011 Landsat Band
  • This process is repeated for band one of the 2011 Landsat image.

Adding Clipped Data

  • Click the add layer button located along the top toolbar Addbutton.jpg
  • Browse to where the clipped 2004 band is located
  • Select the clipped band
  • Click Open
  • This process is repeated for band one of the 2011 Landsat image.

Band Normalization

This step is to normalize the two Landsat bands to each other.

  • Click on the Tools tab above the table of contents to the left
  • Click on the Image Processing Tools under Available Tools
  • Click on Image Enhancement
  • Click on Histogram Match (Two Images)
HistogramMatching.png
  • The Histogram Match (Two Images) window will appear
HistogramMatchingWindow.jpg


  • Click on the open folder relating to the Input Raster File To Modify
  • Browse too and select 2004-Band1-Transformed-Clipped
  • Click on the Input Reference Raster File
  • Browse to and select 2011-Band1-Transformed-Clipped
  • Click on the folder relating to the Output Raster File and name the file 2004-Band1-Transformed-Clipped-Matched
  • Click Run to perform the histogram matching
MatchedBand1.jpg

Write Function Memory Insertion

  • Click on the Tools tab above the table of contents to the left
  • Click on the Image Processing Tools under Available Tools
  • Click on Change Detection
  • Click on Write Function Memory Insertion
WFMLocation.jpg
  • The Write Function Memory Insertion window will appear
WFMWindow.jpg
  • Click on the folder relating to the Input First Data File
  • Browse to and select the 2004-Band1-Transformed-Clipped-Matched
  • Click on the folder relating to the Input Second Date File
  • Brose to and select the 2011-Band1-Transformed-Clipped
  • Leave the Input Third Date File blank
  • Click on the folder relating to Output Raster File and name the file Band1-ChangeDetection
  • Click Run to perform the Write Function Memory Insertion
WFMWindowfill.jpg
  • Output of write function memory insertion change detection method
Changedetectionfinalproduct.jpg

Conclusion

The final product of the tutorial is a qualitative assessment of temporal change occurring in the selected area of the GTA . The method of change detection used, write function memory insertion, is one of the many methods available in Whitebox. Although Whitebox does have some limitations, particularly with vector data, it has proven to be very effective in its ability to handle Landsat imagery for change detection analysis.

References

Whitebox Geospatial Analysis Toolbox Help

Jensen, J.R. 2005. Introductory digital image processing: A remote sensing perspective, 3rd Ed. Prentice Hall series in Geographic Information Science, Upper Saddle River, N.J.