SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

336
i User Guide for SAGA (version 2.0.5) Volume 2 By Vern Cimmery November, 2010

Transcript of SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

Page 1: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

i

User Guide for SAGA (version 2.0.5) Volume 2

By Vern Cimmery November, 2010

Page 2: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

ii

User Guide for SAGA (version 2.0.5) Copyright ©2010 Vern Cimmery Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution–ShareAlike license. A copy of the license can be downloaded from the Creative Commons website at www.creativecommons.org. The license applies to the entire text of this book, plus all the illustrations that are by Vern Cimmery.

Page 3: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

iii

Acknowledgment Most of the System for Automated Geo-Scientific Analysis or SAGA was created and developed by the working-group Geosystem Analysis (formerly associated with Göttingen University and currently with Hamburg University), headed by Prof. Dr. Jürgen Böhner. The current versions of SAGA are mainly due to the creativeness and participation of the core set of developers; namely Rüdiger Köthe, Andre Ringeler, Victor Olaya, Dr. Christian Caro, Dr. Volker Wichmann, Prof. Dr. Jürgen Böhner and, in particular Dr. Olaf Conrad, who shouldered the main programming work. However, SAGA would not have reached this level of sophistication without that multitude of methodical innovations cooperatively worked out by the working-group Geosystem Analysis as a whole in context with national and international environment related research projects. Dr. Volker Wichmann has provided a significant amount of assistance in the production of this guide. His feedback and supportive collaboration have made this User Guide for SAGA (version 2.0.5) feasible and possible. I cannot express enough appreciation for his support. Volume 2 of this User Guide is an expansion of Chapter 7 in the 2007 User Guide for SAGA Version 2. As such, it introduces users to the use of SAGA functions and modules to address hypothetical spatial analysis issues. This volume assumes reader familiarity with Volume 1. Please feel free to e-mail me if you have any questions or suggestions for improvement. My e-mail address is: [email protected] This User Guide for SAGA (Volume 2) is contributed to the SAGA user community to, hopefully, assist the user in successfully applying the SAGA functions, tools, commands, and procedures in addressing applications specific to spatial analysis. Please feel free to make a copy, reference the document, etc., as you desire. I would appreciate if you gave me credit for the effort I have invested. There is no intention to violate any software copyrights indirectly related to SAGA. You are free:

• To copy, distribute, display, and use this manual. • To make derivative works. • To make commercial use of this work.

Under the following conditions:

• Attribution. You must give the original author credit.

Page 4: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

iv

• Share alike. If you alter, transform, or build upon this work, you may distribute the result.

• Work only under a license identical to this one. • For any reuse or distribution, you must make clear to others the license terms of

this work. • Any of these conditions can be waived if you get permission from the copyright

holder. Your fair use and other rights are in no way affected by the above. For any further information, please contact the author at the following e–mail address [email protected].

Page 5: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

v

Table of Content

User Guide for SAGA (version 2.0.5)................................................... i Acknowledgment ............................................................................................................... iii Table of Content ................................................................................................................. v List of Figures .................................................................................................................. viii Chapter 1 – Introduction to Volume 2 ...................................................................... 1

Description: Chapter 2 – Some SAGA Basics................................................................ 1 Description: Chapter 3 – SAGA Buffer Modules........................................................... 2 Description: Chapter 4 – Creating Data Layers from DEMs in SAGA.......................... 3 Description: Chapter 5 – Generating a Watershed Basins Layer ................................... 4 Description: Chapter 6 – Evaluating Proposed Community Park Sites.......................... 5 Description: Chapter 7 – Using SAGA With Digital Satellite Images........................... 6 Description: Chapter 8 – The SAGA Point Cloud (.spc) Data Type .............................. 7 Description: Volume 1.................................................................................................... 8

Chapter 2 - Some SAGA Basics .................................................................................. 9 List of Data Layers, Tables and Maps In Work Session................................................. 9 Rename a Grid or Shapes Data Layer........................................................................... 13 The SAGA Grid Calculator .......................................................................................... 17 Re-Classifying Grid Data Values.................................................................................. 27 Using the Change Grid Values Module........................................................................ 27 Using the Reclassify Grid Values Module .................................................................... 32 Creating a Vector Layer from a Grid Data Layer ......................................................... 42 Viewshed Analysis........................................................................................................ 47

Chapter 3 - SAGA Buffer Modules .......................................................................... 64 Introduction................................................................................................................... 64 The Shapes – Tools/Shapes Buffer Module .................................................................. 65 Example 1 ..................................................................................................................... 66 Example 2 ..................................................................................................................... 71 The Grid – Tools/Grid Buffer Module.......................................................................... 76 Example 1 ..................................................................................................................... 77 Example 2 ..................................................................................................................... 80 The Grid – Tools/Grid Proximity Buffer Module ......................................................... 86 Example 1 ..................................................................................................................... 87 Example 2 ..................................................................................................................... 91 The Grid – Tools/Threshold Buffer Module ............................................................... 100 Example 1 ................................................................................................................... 102 Example 2 ................................................................................................................... 104 Example 3 ................................................................................................................... 108

Chapter 4 – Creating Data Layers from DEMs in SAGA................................ 111 Introduction................................................................................................................. 111 Creating Slope and Aspect Maps From a DEM.......................................................... 111 Developing Terrain Form Grid Data Layers............................................................... 117 Creating Contour Shapes Data Layers........................................................................ 123

Chapter 5 - Generating a Watershed Basins Layer .......................................... 128 Preparing a DEM Data Layer for Hydrology Analysis .............................................. 128

Page 6: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

vi

Calculating Catchment Area ....................................................................................... 134 Defining Channel Networks ....................................................................................... 141 Defining Watershed Basins......................................................................................... 148

Chapter 6 - Evaluating Proposed Community Park Sites ............................... 151 Selection Criteria ........................................................................................................ 152 Criterion 1: Identifying the boundary for Grapeview................................................. 152 Criterion 2: identifying Open Space land use in Mason County and Grapeview....... 156 Criterion 3: Open Space parcels must be a minimum size of 5 contiguous acres ...... 158 Criterion 4: Open Space land parcels with road access .............................................. 162 Criterion 5: The park parcel cannot be adjacent to these land uses: industry, commercial, mineral extraction, and utilities.............................................................. 169 Criterion 6: The park parcel may be adjacent to these land uses: agriculture, commercial recreation, public, rural and residential................................................... 169 Criterion 7: The park is most suitable adjacent to these land uses: open space, forest, rural, and water ........................................................................................................... 170 Criterion 8: The highest amount of ground surface with slopes between 0 and 3 degrees..................................................................................................................................... 170 Criterion 9: The viewing of these land use classes in the foreground and middle-ground will be minimized: industry, commercial, mineral extraction, utilities. This criterion will be used to compare parcel choices....................................................................... 172 Discussion of Results.................................................................................................. 181 Summary ..................................................................................................................... 185

Chapter 7 – Using SAGA With Digital Satellite Images .................................. 186 Imagery Background Information............................................................................... 187 Contrast Enhancements............................................................................................... 190 Filters .......................................................................................................................... 203 Ratios .......................................................................................................................... 215 Composite Images....................................................................................................... 228 Vegetation Indices ...................................................................................................... 232 The Normalized Difference Vegetation Index............................................................ 233 Ratio............................................................................................................................ 235 The Ratio Vegetation Index (RVI) ............................................................................. 237 Transformed Vegetation Index (TVI)......................................................................... 240 Corrected Transformed Vegetation Index (CTVI) ..................................................... 242 Normalized Ratio Vegetation Index (NRVI).............................................................. 244 Image Classification.................................................................................................... 247 Unsupervised Classification........................................................................................ 248 Supervised Classification............................................................................................ 255 Preparing the Input Polygon Shapes Data Layer ........................................................ 263

Chapter 8 – The SAGA Point Cloud (.spc) Data Type ..................................... 273 Point Cloud Type Background Information ............................................................... 273 Importing a .las File .................................................................................................... 274 Cluster Analysis for Point Clouds............................................................................... 278 How to Delete a Point Cloud Attribute....................................................................... 286 Point Cloud Attribute Calculator ................................................................................ 287 Selecting a Subset of a Point Cloud Layer.................................................................. 290

Page 7: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

vii

The Shapes – Point Clouds/Point Cloud Reclassifier/Subset Extractor Module ....... 292 Thinning a Point Cloud............................................................................................... 298 Creating a Point Cloud Layer from Other SAGA Data Types ................................... 299 Converting a Point Cloud to a Grid Data Layer ......................................................... 304 Saving a Point Cloud Layer to Shapes Data Layer..................................................... 306 Transforming a Point Cloud Layer ............................................................................. 307 The Shapes – Point Cloud Viewer/Point Cloud Viewer Module................................ 309

APPENDIX I – Volume 2 Example Data Layers ............................................... 314

Page 8: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

viii

List of Figures Figure 2-1. An example of the ‘Data’ tab area list in the workspace. .............................. 11 Figure 2-2. The ‘Maps’ tab area list in the Workspace window....................................... 13 Figure 2-3. The parameters page for a DEM data layer. .................................................. 14 Figure 2-4. Viewing the storage file name in the ‘Description’ area of the ‘Object

Properties’ window. .................................................................................................. 16 Figure 2-5. The Grid Calculator parameter settings page................................................ 18 Figure 2-6. The ‘Grids’ input window for the Grid Calculator module. ......................... 19 Figure 2-7. The two population grid data layers in Map Layout view windows.............. 21 Figure 2-8. The ‘Grid Calculator’ settings page used for the ‘ADD’ example. ............... 22 Figure 2-9. The composite grid data layer for total population. ....................................... 23 Figure 2-10. The initial Grid Calculator parameter settings page.................................... 25 Figure 2-11. The ‘Grids’ input window............................................................................ 26 Figure 2-12. The Grid Calculator parameter settings window used with a Boolean

formula...................................................................................................................... 26 Figure 2-13. The slope and aspect grid data layers prior to recoding............................... 27 Figure 2-14. The Change Grid Values module parameter settings page.......................... 29 Figure 2-15. The ‘Lookup Table’ for the slope recode..................................................... 30 Figure 2-16. Comparing the original slope data layer with the recoded data layer. ......... 31 Figure 2-17. The ‘Lookup Table’ for the aspect recoding................................................ 32 Figure 2-18. Comparing the original aspect data layer with the recoded data layer. ....... 32 Figure 2-19. The parameter settings page for the Reclassify Grid Values module........... 33 Figure 2-20. Comparing the original ‘MCschoolDist’ data values to the ‘Reclassified

Grid’ values............................................................................................................... 35 Figure 2-21. The Mason County census tract grid data layer. .......................................... 36 Figure 2-22. Using the “range” method to combine several data values.......................... 37 Figure 2-23. A blank ‘Lookup Table’ for entering data class values. .............................. 38 Figure 2-24. The ‘Lookup Table’ with new data classes defined based on elevation

criteria. ...................................................................................................................... 39 Figure 2-25. Using the “table” method to create input to a wildlife habitat model. ......... 40 Figure 2-26. The color lookup table for the elevation input to a wildlife habitat model.. 40 Figure 2-27. The Vectorising Grid Classes parameter settings page................................ 42 Figure 2-28. The parameter settings page for the ‘MCwaterbasins’ shape data layer...... 44 Figure 2-29. The ‘MCwaterbasins’ shapes data layer default display.............................. 45 Figure 2-30. Choosing a shapes data layer polygon boundary color................................ 46 Figure 2-31. The watershed basin shapes data layer as an overlay on the DEM grid data

layer........................................................................................................................... 47 Figure 2-32. The Mason County DEM and watershed basins. ......................................... 49 Figure 2-33. The selected watershed basins. .................................................................... 50 Figure 2-34. The ‘New layer from selected shapes’ parameter window. ......................... 50 Figure 2-35. A new shapes data layer based on selected watershed basins...................... 51 Figure 2-36. The ‘Clip Grid with Polygon’ parameters window...................................... 52 Figure 2-37. The DEM grid data layer for the four watershed basins. ............................. 52 Figure 2-38. The observer location (the black plus symbol). ........................................... 53 Figure 2-39. The Visibility (single point) module parameters window. ........................... 53

Page 9: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

ix

Figure 2-40. The entries for the Visibility (single point) module parameter settings page.................................................................................................................................... 54

Figure 2-41. The enlarged DEM displaying the observer location and the ‘Visibility’ grid data layers. ................................................................................................................ 55

Figure 2-42. The ‘Visibility’ grid data layer updated. ...................................................... 56 Figure 2-43. Two perspectives for the Bear Gulch Camp flagpole seen area. ................. 56 Figure 2-44. The ‘3D-View’ properties page. .................................................................. 57 Figure 2-45. The ‘Grid Proximity Buffer’ parameters window........................................ 58 Figure 2-46. The distance buffers for the Bear Gulch Campground. ............................... 60 Figure 2-47. The ‘Reclassify Grid Values’ parameters page............................................ 61 Figure 2-48. The lookup table for reclassifying the buffer zones into foreground, mid-

ground and background............................................................................................. 62 Figure 2-49. The visual zone grid data layer. ................................................................... 62 Figure 3-1. Settings page for module Shapes Buffer. ....................................................... 65 Figure 3-2. A portion of the ‘MasonFD3roads’ attribute table......................................... 66 Figure 3-3. The settings used to create ROW zones (buffers) adjacent to roads.............. 67 Figure 3-4. The new ‘MasonFD3ROWs’ polygon shapes data layer............................... 67 Figure 3-5. Settings for the Shapes – Grid/Clip Grid with Polygon module.................... 69 Figure 3-6. The settings for the Geostatistics – Grids/Zonal Grid Statistics module

execution. .................................................................................................................. 70 Figure 3-7. The ‘Result Table’ with the ‘Acres’ column included................................... 71 Figure 3-8. The settings for the Shapes – Tools/Shapes Buffer module to create the

distance zones. .......................................................................................................... 72 Figure 3-9. The output polygon shapes data layer from the Shapes Buffer module. ........ 73 Figure 3-10. The attribute table for the ‘PointDistZones’ polygon shapes data layer...... 73 Figure 3-11. The settings used with the Clip Points with Polygons module. ................... 74 Figure 3-12. The new point shapes data layers for each distance zone. Zone 25 is upper

left and zone 100 is lower right................................................................................. 75 Figure 3-13. A portion of the attribute table for zone 100................................................ 75 Figure 3-14. Settings page for module Grid Buffer. ......................................................... 76 Figure 3-15. The Grid - Tools/Grid Buffer settings used to create buffers around water

bodies. ....................................................................................................................... 77 Figure 3-16. The ‘MClakes’ layer (on the left) and the Grid Buffer output on the right. 78 Figure 3-17. The Grid Calculator parameter settings page.............................................. 78 Figure 3-18. The Grid Calculator parameter settings page for creating a new grid data

layer........................................................................................................................... 79 Figure 3-19. The grid layer identifying road areas of interest. ......................................... 80 Figure 3-20. Zoomed in area of the ‘MFDrdsROW’ grid data layer................................ 81 Figure 3-21. Settings page for creating the road ROW grid data layer. ........................... 81 Figure 3-22. The Grapeview Road Maintenance District ROW map............................... 82 Figure 3-23. The Grid Calculator settings for creating a new grid data layer containing

the data for the 120’ ROW width road...................................................................... 83 Figure 3-24. The Grid – Tools/Grid Buffer settings for the 60’ wide ROW buffer layer. 84 Figure 3-25. Example of the buffer “overlap” problem.................................................... 85 Figure 3-26. A zoomed in portion of the Grapeview Road Maintenance District ROW

map............................................................................................................................ 86

Page 10: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

x

Figure 3-27. The stream network for Mason County. ...................................................... 87 Figure 3-28. The Mason County general land use grid data layer.................................... 88 Figure 3-29. The Grid – Tools/Grid Proximity Buffer module settings page used to create

the ‘<<Buffer Grid’ layer.......................................................................................... 88 Figure 3-30. The grid data layer containing 200’ buffers adjacent to streams. ................ 89 Figure 3-31. The settings I used with the Geostatistics – Grids/Zonal Grid Statistics

module....................................................................................................................... 90 Figure 3-32. The ‘Zonal Statistics’ table listing acres by land use within the streams 200’

buffer......................................................................................................................... 91 Figure 3-33. Relative environmental impacts due to timber harvesting. .......................... 91 Figure 3-34. The Grid – Calculator/Grid Calculus module settings used to create a

forestry land use layer............................................................................................... 92 Figure 3-35. The forest land use map for Mason County. ................................................ 93 Figure 3-36. The slope gradient reclassify table............................................................... 93 Figure 3-37. The Grid – Tools/Reclassify Grid Values module settings for the new slope

class grid data layer................................................................................................... 94 Figure 3-38. The ‘MasonSlpClasses’ grid data layer........................................................ 95 Figure 3-39. The ‘Query builder for shapes’ settings for the first execution of the module.

................................................................................................................................... 96 Figure 3-40. A portion of the ‘MasonTrans’ attribute table on the left and the selected

roads on the right. ..................................................................................................... 96 Figure 3-41. The Grid – Tools/Grid Proximity Buffer module settings page................... 97 Figure 3-42. The “simple” table used to produce the distance zone grid data layer......... 98 Figure 3-43. The output ‘Zonal Statistics [c/5.3777]’. ..................................................... 99 Figure 3-44. Acres by distance zone by slope class........................................................ 100 Figure 3-45. Acres by relative environmental impact categories. .................................. 100 Figure 3-46. Settings page for module Threshold Buffer. .............................................. 100 Figure 3-47. Settings for the Threshold Buffer module for the first example................. 102 Figure 3-48. Module output on the left and less than 10 degree slope map on the right.103 Figure 3-49. Threshold Buffer module output for Example 1. ....................................... 103 Figure 3-50. Settings for the Threshold Buffer module using the “Relative from cell

value” option........................................................................................................... 105 Figure 3-51. Comparing the module ‘Buffer Grid’ output with the module input for the

‘Values Grid’ parameter. ........................................................................................ 106 Figure 3-52. A zoomed in view of the two ‘Buffer Grids’ and the DEM grid data layer.

................................................................................................................................. 107 Figure 3-53. Settings for the Threshold Buffer module using an input ‘>Threshold Grid’

and the “Relative from cell value” option............................................................... 108 Figure 3-54. A zoomed in areas of the ‘LCchannelnet’ layer (upper left), the output

‘Buffer’ layer (upper right), and the ‘Value grid’ DEM layer. ............................... 109 Figure 4-1. The Local Morphometry module parameters page. ..................................... 111 Figure 4-2. The parameter settings page for creating Slope and Aspect grid data layers

with the Local Morphometry module. .................................................................... 113 Figure 4-3. Slope and Aspect grid data layers created with the Local Morphometry

module..................................................................................................................... 114

Page 11: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

xi

Figure 4-4. Reviewing the data histograms for the ‘Slope’ and ‘Aspect’ grid data layers.................................................................................................................................. 114

Figure 4-5. Reviewing the data tables for the ‘Slope’ and ‘Aspect’ grid data layers. .... 115 Figure 4-6. The Z-Factor parameters for the new Slope and Aspect grid data layers. ... 115 Figure 4-7. The initial Grid Calculator settings page..................................................... 116 Figure 4-8. The Grid Calculator settings page with a formula for converting Radians to

Degrees. .................................................................................................................. 117 Figure 4-9. The parameter settings page for the Surface Specific Points module. ......... 118 Figure 4-10. The terrain form grid data layer. ................................................................ 120 Figure 4-11. The Grid Calculator module parameter settings page............................... 121 Figure 4-12. The Grid Calculator module parameter settings page using a Boolean

formula to create a ridge landform grid data layer. ................................................ 122 Figure 4-13. A new grid data for the ridges landform. ................................................... 122 Figure 4-14. The Contour Lines from Grid module parameter settings page................. 123 Figure 4-15. Final settings for execution of the Contour Lines from Grid module........ 125 Figure 4-16. The ‘Object Properties’ parameter settings for the new contour shapes data

layer......................................................................................................................... 126 Figure 4-17. The DEM grid data layer with a contour overlay. ..................................... 127 Figure 5-1. The Sink Removal parameter settings page.................................................. 129 Figure 5-2. Final settings for the execution of the Sink Removal module. ..................... 130 Figure 5-3. A new DEM grid data layer with “sinks” removed. .................................... 130 Figure 5-4. The Grid Calculator parameter settings page.............................................. 131 Figure 5-5. The Grid Calculator parameter settings page for creating a grid data layer

showing “sinks”. ..................................................................................................... 132 Figure 5-6. The “sinks” grid data layer showing the elevation differences between two

DEM’s..................................................................................................................... 132 Figure 5-7. Checking grid cell data values. .................................................................... 133 Figure 5-8. The Parallel Processing parameter settings page........................................ 136 Figure 5-9. The parameter settings used to generate the ‘Catchment Area’ grid data layer.

................................................................................................................................. 138 Figure 5-10. The Catchment Area grid data layer. ......................................................... 138 Figure 5-11. The catchment area grid data description window..................................... 139 Figure 5-12. The catchment area grid data description window..................................... 140 Figure 5-13. The Catchment Area grid data layer using the ‘Logarithmic’ option. ....... 141 Figure 5-14. The Channel Network parameter settings page.......................................... 142 Figure 5-15. The parameter settings used for the Channel Network module. ................ 143 Figure 5-16. The Channel network and Channel Direction grid data layers. ................. 144 Figure 5-17. A zoomed in portion of the Channel Network grid data layer. .................. 144 Figure 5-18. A zoomed in portion of the Channel Direction grid data layer.................. 145 Figure 5-19. The parameter settings page for the ‘Channel Network’ shapes data layer.

................................................................................................................................. 146 Figure 5-20. A color table used with shapes data layers................................................. 147 Figure 5-21. The DEM grid data layer with a shape data layer channel network overlain.

................................................................................................................................. 148 Figure 5-22. The Watershed Basins module parameter settings page. ........................... 149

Page 12: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

xii

Figure 5-23. Watershed Basins module settings for creating a watershed basins grid data layer......................................................................................................................... 150

Figure 5-24. A watershed basin grid data layer. ............................................................. 150 Figure 6-1. The Grapeview School District (on the left in solid green) and the Grapeview

Volunteer Fire Department #3 (on the right in solid red). ...................................... 153 Figure 6-2. The Shapes Tools/New layer from selected shapes module settings for

creating the ‘MasonSDgrapeview’ layer. ............................................................... 154 Figure 6-3. The Shapes-Polygon/Polygon Intersection module settings for creating the

‘MasonGV’ layer. ................................................................................................... 154 Figure 6-4. The polygons representing the hamlet of Grapeview (‘MasonGV’). .......... 155 Figure 6-5. The Grid-Gridding/Shapes to Grid module settings, vector to raster

conversion. .............................................................................................................. 155 Figure 6-6. The Mason County General Land Use class map. ....................................... 156 Figure 6-7. The Grid Calculator module settings for creating the open space land use grid

data layer for the Grapeview hamlet. ...................................................................... 157 Figure 6-8. Open Space and Rural land uses in Grapeview (‘GVOpSpgr)’. .................. 158 Figure 6-9. The settings for the Grid-Filter/Filter Clumps module for identifying >5 acre

cell groupings.......................................................................................................... 159 Figure 6-10. Grapeview Open Space areas greater than 5 acres in size. ........................ 160 Figure 6-11. Open Space areas in Grapeview greater than 5 acres in size. .................... 161 Figure 6-12. The attribute table for the ‘GVOpSpPoly’ shapes data layer..................... 161 Figure 6-13. The Table-Calculus/Table calculator for shapes module settings for

calculating “ACRES”.............................................................................................. 162 Figure 6-14. Grid Calculator settings for overlaying gravel/paved roads with open space

land use in Grapeview............................................................................................. 163 Figure 6-15. Display of ‘GVOpSpRoads’ grid data layer. Site 4 does not have a road

contact. .................................................................................................................... 163 Figure 6-16. Settings used for the Shapes-Tools/Shapes Buffer module. ....................... 164 Figure 6-17. Settings for the Shapes-Polygons/Polygon Intersection module execution.

................................................................................................................................. 165 Figure 6-18. Zoomed in portions of the ‘GVOpSpEDGE’ output data layer................. 166 Figure 6-19. The settings used for the Grid-Gridding/Shapes to Grid vector to raster

conversion. .............................................................................................................. 166 Figure 6-20. The Grid Calculator settings for creating a grid data layer for land use

classes along the site borders. ................................................................................. 167 Figure 6-21. The ‘Zonal Grid Statistics’ module settings............................................... 168 Figure 6-22. The table for land use adjacency for each of the sites................................ 169 Figure 6-23. Grid Calculator settings for creating a grid layer containing less than 3

degree slopes........................................................................................................... 170 Figure 6-24. The Zonal Grid Statistics module settings. ................................................ 171 Figure 6-25. Acres and percent of total site acreage with slopes less than 3 degrees. ... 172 Figure 6-26. The settings for the Shapes-Polygons/Polygon Centroid module.............. 173 Figure 6-27. A zoomed in view of the centroid (red dot) in site #9. .............................. 173 Figure 6-28. The observer point shapes data layer displayed with the DEM grid data

layer......................................................................................................................... 174

Page 13: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

xiii

Figure 6-29. The settings for the Terrain Analysis-Lighting, Visibility/Visibility (single point) [interactive] module. .................................................................................... 175

Figure 6-30. An example of the settings for the Grid-Tools/Grid Buffer module.......... 177 Figure 6-31. The Grid Calculator settings for creating the foreground, midground,

background grid data layer for observer point 1..................................................... 178 Figure 6-32. The ‘Vzones01’ grid data layer displaying the three distance zones for

observer point 1....................................................................................................... 178 Figure 6-33. The viewshed grid data layer for observation point number 1................... 179 Figure 6-34. The Grid Calculator settings used to produce a seen area grid data layer

showing foreground, middle-ground, and background areas.................................. 179 Figure 6-35. The output grid data layer showing foreground, middle-ground, and

background areas for the viewshed for observation point number 1. ..................... 180 Figure 6-36. The visual impact tables............................................................................. 180 Figure 6-37. Weights assigned to the sites based on applying the criteria. .................... 183 Figure 6-38. The Grid – Gridding/Shapes to Grid module settings page for creating the

grid data layer for criteria #4. ................................................................................. 183 Figure 6-39. Using the Grid Calculator to display a composite score for all criteria for

each site................................................................................................................... 184 Figure 6-40. The site grid data layer displaying the average weight for each site. ........ 185 Figure 7-1. The full Olympic Peninsula Landsat scene (on left) and Mason County sub-

scene on right. ......................................................................................................... 188 Figure 7-2. Comparing information for the full scene and sub-scene. ........................... 188 Figure 7-3. The full central Arizona Landsat scene (on left) and sub-scene on right..... 189 Figure 7-4. Descriptive information for the full scene and sub-scene............................ 189 Figure 7-5. Basic descriptive information for a grid data layer containing spectral data for

band 3 of a Landsat TM sub-scene. ........................................................................ 191 Figure 7-6. The histogram for spectral reflectance values for band 3 (grid data layer

‘MCL720020922_3’).............................................................................................. 192 Figure 7-7. A portion of the tabular version of the histogram in Figure 7-6. ................. 193 Figure 7-8. Functions available in the ‘Classification’ sub-menu. ................................. 194 Figure 7-9. Comparing corresponding zoomed in areas on the input and output following

applying the ‘Create Normalised Classification’ option to a grid data layer.......... 195 Figure 7-10. The ‘Create Lookup Table’ window. ......................................................... 195 Figure 7-11. Comparing zoomed in portions of input and output grid data layer after

using the ‘Create Lookup Table’ option. ................................................................ 196 Figure 7-12. The ‘[CAP] Colors’ window...................................................................... 196 Figure 7-13. A portion of the lookup table created using an entry for the ‘Count’

parameter of 100. .................................................................................................... 197 Figure 7-14. Comparing zoomed in portions of the before and after grid data layers using

a grayscale palette option with 20 classes............................................................... 198 Figure 7-15. The lookup table created using an entry for the ‘Count’ parameter of 20. 198 Figure 7-16. Adding color to the grayscale lookup table................................................ 199 Figure 7-17. Comparing the original grid data layer with the one using the modified

lookup table............................................................................................................. 199 Figure 7-18. The “bright-dark” shade choice on the left and “dark-bright” on the right

using band 4 of a Landsat TM sub-scene................................................................ 201

Page 14: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

xiv

Figure 7-19. Example settings for “RGB Overlay”. ....................................................... 202 Figure 7-20. Example composite display using the “RGB Overlay” choice.................. 202 Figure 7-21. The settings page for the User Defined Filter (3 x 3) module. .................. 203 Figure 7-22. The ‘Filter Matrix’ parameter with values to calculate mean for the User

Defined Filter (3 x 3) module. ................................................................................ 204 Figure 7-23. Comparing zoomed in areas of the input and output grid data layers........ 204 Figure 7-24. Visual comparison of the input and output grid data layers....................... 205 Figure 7-25. The Grid – Filter/Simple Filter module settings for a 3 x 3 “mean” kernel.

................................................................................................................................. 205 Figure 7-26. Settings used for the example of the Grid – Filter/Gaussian Filter module.

................................................................................................................................. 206 Figure 7-27. Visual comparison of the input and output grid data layers....................... 207 Figure 7-28. The “Standard kernel 1”, “Standard kernel 2” and “Standard kernel 3”

options in the Laplacian Filter module. ................................................................. 207 Figure 7-29. Settings for the Grid – Filters/Laplacian Filter module............................ 208 Figure 7-30. Comparing the input grid data layer and two output grid data layers........ 209 Figure 7-31. The “Sobel Detection” directional filters. .................................................. 210 Figure 7-32. The settings used for the Gaussian Filter module. .................................... 210 Figure 7-33. The values used for the ‘Filter Matrix’ for the first directional kernel. ..... 211 Figure 7-34. The Grid – Calculus/Grid Calculator module settings.............................. 211 Figure 7-35. Viewing the output from applying the Sobel Edge Technique. ................. 212 Figure 7-36. Majority Filter module settings page......................................................... 213 Figure 7-37. Comparing the input and output grid data layers related to the Majority

Filter module execution.......................................................................................... 214 Figure 7-38. Comparing data values for the input and output grid data layers related to the

Majority Filter module execution........................................................................... 214 Figure 7-39. Two kernels for different illumination directions. ..................................... 215 Figure 7-40. Comparing the outputs using the two kernels. ........................................... 215 Figure 7-41. Spectral Reflectance Curves and TM+ Band Spectral Ranges. ................. 216 Figure 7-42. The settings page for the Grid Calculator module. ................................... 216 Figure 7-43. The Grid Calculator settings for the ratio TM1/TM2 image..................... 217 Figure 7-44. Comparing two TM1/TM2 ratioed images. ............................................... 218 Figure 7-45. Spectral values for bands 1 and 2 and the ratio image TM1/TM2............. 219 Figure 7-46. Comparing two TM3/TM4 ratio images. ................................................... 220 Figure 7-47. Spectral values for bands 3 and 4 and the ratio image TM3/TM4............. 221 Figure 7-48. Comparing two TM5/TM2 ratio images. ................................................... 222 Figure 7-49. Spectral values for bands 5 and 2 and the ratio image TM5/TM2............. 222 Figure 7-50. Comparing two TM3/TM7 ratio images. ................................................... 224 Figure 7-51. Spectral values for bands 3 and 7 and the ratio image TM3/TM7............. 224 Figure 7-52. The Shapes – Tools/Create New Shapes Layer module settings. .............. 225 Figure 7-53. The Shapes – Grid/Get Grid Data for Shapes module settings page. ....... 226 Figure 7-54. Summary of spectral reflectance and ratio image values in the Mason

County sub-scene. ................................................................................................... 227 Figure 7-55. Summary of spectral reflectance and ratio image values in the Arizona sub-

scene........................................................................................................................ 227 Figure 7-56. Settings page for module RGB Composite................................................. 228

Page 15: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

xv

Figure 7-57. Zoomed in areas on the true color composites for Mason County and Arizona.................................................................................................................... 231

Figure 7-58. Zoomed in areas on the false color infrared composites for Mason County and Arizona............................................................................................................. 231

Figure 7-59. The Grid Calculator setup parameters for creating a grid data layer for the Normalized Difference Vegetation Index (NDVI). ................................................ 233

Figure 7-60. A zoomed in portion of the sample grid data layer outputs for the NDVI. 234 Figure 7-61. Sample point NDVI values. ....................................................................... 235 Figure 7-62. The Grid Calculator setup parameters for creating a grid data layer for the

Ratio vegetation index (RATIO). ........................................................................... 236 Figure 7-63. The sample grid data layer output for the RATIO. .................................... 236 Figure 7-64. Sample point RATIO values. ..................................................................... 237 Figure 7-65. The Grid Calculator setup parameters for creating a grid data layer for the

Ratio Vegetation Index. .......................................................................................... 238 Figure 7-66. The sample grid data layer output for the RVI. ......................................... 239 Figure 7-67. Sample point RVI values. .......................................................................... 239 Figure 7-68. The Grid Calculator setup parameters for creating a grid data layer for the

Transformed Vegetation Index (TVI)..................................................................... 240 Figure 7-69. The sample grid data layer output for the TVI........................................... 241 Figure 7-70. Sample point TVI values............................................................................ 242 Figure 7-71. The Grid Calculator setup parameters for creating a grid data layer for the

Corrected Transformed Vegetation Index (CTVI). ................................................ 242 Figure 7-72. The sample grid data layer output for the CTVI. ....................................... 243 Figure 7-73. Sample point CTVI values. ........................................................................ 243 Figure 7-74. The Grid Calculator setup parameters for creating a grid data layer for the

Normalized Ratio Vegetation Index (NRVI). ......................................................... 244 Figure 7-75. The sample grid data layer output for the NRVI........................................ 245 Figure 7-76. Sample point NRVI values......................................................................... 245 Figure 7-77. Band 3 and 4 spectral and vegetation index values for sample points in the

Mason County sub-scene. ....................................................................................... 246 Figure 7-78. Band 3 and 4 spectral and vegetation index values for sample points in the

Arizona sub-scene................................................................................................... 247 Figure 7-79. Settings page for the module Cluster Analysis for Grids........................... 249 Figure 7-80. The ‘Grids’ window displaying a list of grid data layers available for the

active project selected in the ‘Grid system’ parameter. .......................................... 249 Figure 7-81. Example of statistics output from the Cluster Analysis for Grids module. 250 Figure 7-82. Settings for the Cluster Analysis for Grids module. .................................. 252 Figure 7-83. The “pass” and “change” display............................................................... 253 Figure 7-84. Output from the Cluster Analysis for Grids module.................................. 254 Figure 7-85. The settings page for the module Supervised Classification. .................... 256 Figure 7-86. The ‘Grids’ window displaying a list of grid data layers available for the

selected grid system. ............................................................................................... 257 Figure 7-87. Example of ‘<<Class Information’ table output from the Supervised

Classification module. ............................................................................................ 260 Figure 7-88. Settings for the Supervised Classification module example. ..................... 262 Figure 7-89. The ‘Classification’ output from the Supervised Classification module. .. 263

Page 16: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

xvi

Figure 7-90. The ‘Create New Shapes Layer’ settings page. ......................................... 264 Figure 7-91. The ‘Attribute’ window for the Create New Shapes Layer module example.

................................................................................................................................. 265 Figure 7-92. The ‘L7trainsites’ polygon shapes layer map and ‘Description’. .............. 265 Figure 7-93. The Map View window used for on-screen digitizing............................... 266 Figure 7-94. Zoomed in area for on-screen digitizing. ................................................... 267 Figure 7-95. Pop-up list of vector edit options. .............................................................. 267 Figure 7-96. The points and line segments defining a polygon for a clear-cut land cover

training site.............................................................................................................. 268 Figure 7-97. Edit functions available for selected points and parts................................ 269 Figure 7-98. Pop-up list of options. ................................................................................ 269 Figure 7-99. The ‘Edit Shapes’ dialog box..................................................................... 270 Figure 7-100. The ‘Attributes’ tab in the ‘Object Properties’ window........................... 270 Figure 8-1 The Import LAS Files module settings page. ................................................ 275 Figure 8-2 The imported .las file ‘pslc02000019’ listed as a SAGA Point Cloud data type.

................................................................................................................................. 276 Figure 8-3. The ‘Description’ tab display for the ‘pslc02000019’ Point Cloud layer.... 277 Figure 8-4. The ‘pslc02000019’ Point Cloud view window........................................... 278 Figure 8-5. The settings page for the Cluster Analysis for Point Clouds module. ......... 279 Figure 8-6. The ‘Choose the attributes to use for clustering:’ input settings window.... 281 Figure 8-7. The Point Cloud layer for Autzen Stadium.................................................. 282 Figure 8-8. The ‘Cluster Analysis for Point Clouds’ settings page. ............................... 283 Figure 8-9. The ‘Choose the attributes to use for clustering:’ settings page. ................. 284 Figure 8-10. Cluster Analysis for Point Clouds module output for the ‘AutzenStad’ Point

Cloud layer.............................................................................................................. 285 Figure 8-11. The ‘Cluster Analysis PC_AutzenStad’ output statistical table................. 285 Figure 8-12. The ‘Drop Point Cloud Attribute’ module settings page. .......................... 286 Figure 8-13. Comparing the descriptions for the ‘SubPugetSound1’ Point Cloud layer

before (on the left) and after module execution (on the right)................................ 287 Figure 8-14. Settings page for the Point Cloud Attribute Calculator module................ 288 Figure 8-15. Settings for the Point Cloud Attribute Calculator example. ...................... 289 Figure 8-16. The ‘Settings’ tab area for the ‘Skokomish2_METERS’ Point Cloud data

layer......................................................................................................................... 290 Figure 8-17. The ‘Point Cloud Cutter’ settings page...................................................... 291 Figure 8-18. A subset of the ‘Skokomish1’ Point Cloud layer....................................... 292 Figure 8-19. The settings page for the Shapes – Point Clouds /Point Cloud Reclassifier /

Subset Extractor module. ........................................................................................ 293 Figure 8-20. The ‘Special Cases’ section of the Shapes – Point Clouds /Point Cloud

Reclassifier / Subset Extractor module................................................................... 295 Figure 8-21. Settings to extract a subset of Point Cloud layer for returns 2 and greater.297 Figure 8-22. Comparing the Point Cloud with all points to the Point Cloud having only

the second pulse return............................................................................................ 298 Figure 8-23. The Shapes – Point Clouds/Point Cloud Thinning (simple) module settings

page. ........................................................................................................................ 299 Figure 8-24. The ‘Point Cloud from Grid Points’ settings page..................................... 300 Figure 8-25. The ‘Point cloud from Shapes’ settings page............................................. 301

Page 17: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

xvii

Figure 8-27. Output from the Shapes – Point Clouds /Point Cloud from Shapes module.................................................................................................................................. 303

Figure 8-28. The ‘Point Cloud to Grid’ settings page. ................................................... 304 Figure 8-29. The altitude or ‘z’ grid data layer output using a ‘Cellsize’ of 15. ............ 305 Figure 8-30. The ‘Point Cloud to Shapes’ settings page. ............................................... 306 Figure 8-31. Output from the Shapes – Point Clouds /Point Cloud to Shapes module. . 307 Figure 8-32. The Shapes – Point Clouds /Transform Point Cloud module settings page.

................................................................................................................................. 308 Figure 8-33. Using the Point Cloud Viewer tool to view the ‘AutzenStad’ Point Cloud

file. .......................................................................................................................... 309 Figure 8-34. The Point Cloud Viewer sidebar. ............................................................... 311 Figure 8-35. The ‘Advanced Settings’ page for the Point Cloud Viewer tool. .............. 312 Figure 8-36. Stereo anaglyph of Autzen Stadium, University of Oregon. ..................... 313

Page 18: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

1

Chapter 1 – Introduction to Volume 2 Volume 2 of the SAGA User Guide for Version 2.0 provides “How To” information on many SAGA modules, functions, and GIS applications. This volume originally appeared as Chapter 7 in User Guide 2.0 and was titled “Some SAGA How To’s”. This original chapter has been expanded and now appears as Volume 2 in this new User Guide. Including this introductory chapter, there are 8 chapters in Volume 2. Each chapter emphasizes either a particular group of SAGA modules or a particular application area. Chapter 2 is the exception to this emphasis. The first two sections of Chapter 2 use a couple of basic functions (listing data layers, tables, etc. and how to rename a layer) to introduce new users to the SAGA graphic user interface functionality. The remaining sections continue with this goal using a variety of SAGA modules that are applied to meet many different spatial analysis session requirements. For example, the Grid – Calculus/Grid Calculator module provides a significant amount of very general but extremely significant capability for manipulating single and multiple grid data layers using mathematical equations. Readers of these sections will gain a very practical understanding of the SAGA graphical user interface along with insight on applying SAGA modules to address spatial analysis issues of a simple to moderate level of complexity. The examples discussed in Volume 2 chapters are hypothetical. At the beginning of each chapter, the main topics for the chapter are listed along with the SAGA modules that are used. If a module is merely referenced in the discussion, it is not included in the list. The procedures used and described in these examples provide explanation of how to use SAGA functions and modules to meet analysis or display objectives. SAGA functions and modules represent a tremendous amount of capability for addressing spatial analysis. This also means that there often will be more than one module or set of SAGA procedures that can be applied to a specific GIS problem. Some approaches will be more efficient than others; some more complex than others; etc. Please keep this in mind as you absorb the information in these chapters. As you learn more about SAGA you will discover how to more effectively apply the SAGA toolbox of functions and modules. Description: Chapter 2 – Some SAGA Basics As noted above, this chapter includes discussion of a couple basic functions and ends with a topic of moderate complexity that combines a series of modules using an example of view-shed analysis. The topics covered, along with the modules applied are listed below. List of Data Layers, Tables and Maps In Work Session Rename a Grid or Shapes Data Layer The SAGA Grid Calculator Module Grid – Calculus/Grid Calculator Re-Classifying Grid Data Values

Page 19: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

2

Grid – Calculus/Grid Calculator Grid – Tools /Change Grid Values Grid – Tools/Reclassify Grid Values Creating a Vector Layer of a Grid Data Layer Shapes - Grid/Vectorising Grid Classes View-Shed Analysis Shapes – Tools/New layer from selected shapes Shapes – Grid/Clip Grid with Polygon Terrain Analysis – Lighting, Visibility/Visibility (single point) [Interactive] Grid – Tools /Buffers/Grid Proximity Buffer Grid – Tools/Reclassify Grid Values You can see from the above list that a few very basic functions are discussed including how to rename a grid or shapes data layer, how to re-classify grid data values, etc. A workhorse module in SAGA is the Grid – Calculus/Grid Calculator module. This module is introduced in this chapter and it used in many of the examples throughout the Volume 2 chapters. Another important SAGA function is vector to raster conversion. The Shapes – Grid/Vectorising Grid Classes module is used for this purpose. View-Shed Analysis is the final topic of the chapter. The example in this section integrates the use of five SAGA modules including the one specifically used for delineating a view-shed. Description: Chapter 3 – SAGA Buffer Modules There are four SAGA modules specifically designed to create buffers around data layer features. These modules are: Shapes – Tools/Shapes Buffer Grid – Tools/Grid Buffer Grid – Tools/Grid Proximity Buffer Grid – Tools/Threshold Buffer Three of the four modules operate in the grid or raster environment and one works with vector or shapes data layers. The SAGA vector to raster and raster to vector conversions provide the tools to move back and forth between the two processing environments depending on your analysis requirements and data; for example, vector to raster conversion can be handled using the Grid – Gridding/Shapes to Grid module, the Geostatistics – Kriging and Grid – Spline Interpolation library modules; raster to vector conversion using the Shapes – Grid/Vectorizing Grid Classes, Grid Values to points, and Contour Lines from Grid modules. These conversion tools may be a factor in how you use the buffer modules. Chapter 3 explores applications involving each of the four SAGA buffer modules. The examples are hypothetical and illustrate the application of a module to meet a particular

Page 20: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

3

objective requiring delineation of a buffer or zone. Other SAGA modules are used as necessary to achieve the example objectives. There are four sections in the chapter, one for each module. Several application examples will be described and discussed in each section. The sections are listed below along with the names of any other modules used in that section. Shapes – Tools/Shapes Buffer. Shapes – Grid/Clip Grid with Polygon Geostatistics – Grids/Zonal Grid Statistics Table – Calculator/Table Calculus Shapes – Tools/New layer from selected shapes Shapes – Points/Count Points in Polygons Shapes – Points/Clip Points with Polygons Grid – Tools/Grid Buffer. Grid – Calculus/Grid Calculator Grid – Tools/Grid Proximity Buffer. Grid – Calculus/Grid Calculator Geostatistics – Grids/Zonal Grid Statistics Table – Calculus/Table Calculator Grid – Tools/Reclassify Grid Values Shapes – Tools/Query builder for shapes Grid – Tools/Threshold Buffer Examples in this chapter include using Shapes – Tools/Shapes Buffer along with other SAGA modules to calculate the number of acres in forestry land use within the road right-of-ways for a county road maintenance department. A second example using this module involves the creation of a contact list of landowners that could be potentially impacted by noise during a marina improvement project. The Grid – Tools/Grid Buffer module section includes two examples. The first one involves identifying and mapping areas of road that are within 105 meters of water bodies. The second one uses the module to help in preparing a budget for three road surface types for maintenance. Two examples are included for the Grid – Tools/Grid Proximity Buffer module. The first example involves producing a table of acres, by land use type within 200’ of streams in Mason County, Washington. The second one has the objective to produce tabular data displaying the potential levels of impact from commercial timber harvesting based on distance from roads and slope. Description: Chapter 4 – Creating Data Layers from DEMs in SAGA SAGA has a development history based in hydrology and geomorphology. This chapter introduces some very basic capabilities utilizing digital elevation models.

Page 21: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

4

The three sections in this chapter are listed below along with the names of modules used in that section. Creating Slope and Aspect Maps from a DEM Terrain Analysis – Morphometry/Local Morphometry Grid – Calculus/Grid Calculator Developing Terrain Form Grid Data Layers Terrain Analysis – Morphometry/Surface Specific Points Grid – Calculus/Grid Calculator Creating Contour Shapes Data Layers Shapes – Grid/Contour Lines from Grid Description: Chapter 5 – Generating a Watershed Basins Layer This chapter continues with providing examples related to hydrology and geomorphology. Several of the Terrain Analysis library modules are applied to develop a “Watershed Basins” grid data layer. Terrain Analysis/Sink Removal Terrain Analysis – Hydrology/Parallel Processing Terrain analysis – Channels/Channel Network Terrain analysis – Channels/Watershed Basins This process involves four stages. First, the Terrain Analysis/Sink Removal module is used to preprocess a digital elevation model grid data layer. Depressions (pits or sinks) in the digital elevation model (DEM) are “leveled off”, i.e., filled, relative to surrounding terrain. Catchment areas are then delineated using the Terrain Analysis – Hydrology/Parallel Processing module. The input for the module is the preprocessed DEM. The output is a grid data layer containing catchment areas. This grid data layer is used as input to the module for defining stream channels. The Terrain analysis – Channels/Channel Network module produces three outputs related to the stream network. A grid data layer and a line shape data layer are produced that delineate the stream network in both raster and vector formats. A grid data layer showing channel direction is another output. The module uses two inputs; one is the preprocessed DEM with filled pits created with the Sink Removal module. The second input is the catchment area grid data layer. It is used for the ‘Initiation Grid’ parameter. A watershed basin grid data layer is produced with the Terrain analysis – Channels/Watershed Basins module. The DEM output from the Sink Removal module is input along with the grid data layer for the stream network produced with the Channel Network module.

Page 22: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

5

Description: Chapter 6 – Evaluating Proposed Community Park Sites SAGA includes tools and functions that support a wide spectrum of GIS applications. This chapter incorporates a set of SAGA modules in a hypothetical application for selection of a potential developed recreation site. The sections included in this chapter are listed here, along with SAGA modules used in the section. Criterion 1: Identifying the boundary for Grapeview. Shapes Tools/New layer from selected shapes Shapes-Polygon/Polygon Intersection Grid-Gridding/Shapes to Grid Criterion 2: Identifying Open Space land use in Mason County and Grapeview. Grid Calculus/Grid Calculator Criterion 3: Open Space parcels must be a minimum size of 5 contiguous acres. Grid-Filter/Filter Clumps Table-Calculus/Table calculator for shapes Criterion 4: Open Space land parcels with road access. Grid Calculus/Grid Calculator Criterion 5: The park parcel cannot be adjacent to these land uses: industry, commercial, mineral extraction, and utilities; Criterion 6: The park parcel may be adjacent to these land uses: agriculture, commercial recreation, public, rural and residential; Criterion 7: The park is most suitable adjacent to these land uses: open space, forest, and water. Table-Calculus/Table calculator for shapes Shapes-Tools/Shapes Buffer Shapes-Polygons/Polygon Intersection Grid-Gridding/Shapes to Grid Grid Calculus/Grid Calculator Geostatistics-Grids/Zonal Grid Criterion 8: The largest amount of ground surface with slopes between 0 and 3 degrees. Grid Calculus/Grid Calculator Geostatistics-Grids/Zonal Grid Statistics Criterion 9: The viewing of these land use classes in the foreground and middle-ground will be minimized: industry, commercial, mineral extraction, utilities. This criterion will be used to compare parcel choices. Shapes-Polygons/Polygon Centroid Terrain Analysis-Lighting, Visibility/Visibility (single point) [interactive] Grid-Tools/Grid Buffer Grid Calculus/Grid Calculator

Page 23: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

6

Here is the hypothetical situation. The unincorporated hamlet of Grapeview, Washington desires to initiate an independent analysis to establish a developed recreation site for use by local residents and visitors to the area. This first part of the analysis is to find out if there are any properties within the hamlet that meet the community park committee criteria for a site. The general land use map for the County has 13 categories of land use. The category of most interest to Grapeview citizens is the one for “Open Space”. They believe there might be some opportunities for the establishment of a developed recreation area using land allocated to the open space land use category in the County Comprehensive Plan. Description: Chapter 7 – Using SAGA With Digital Satellite Images This chapter focuses on SAGA functions that support display and analysis of digital satellite imagery. There are core functions related to the display of grid data layers that lend themselves also to the display of digital satellite imagery. Several of the module libraries contain modules developed for use with remotely sensed data. In addition, there are modules developed as utility tools that can effectively be used with image data. This chapter will expose you to six specific areas related to the display and processing of digital imagery, and more specifically, digital satellite imagery. This does not mean the discussion does not have relevance with non-image grid data layers, it just means the focus in this chapter will be on the use of SAGA modules with digital satellite imagery. Contrast enhancements Contrast enhancements are techniques used to change the way the information contained in an image displays. The goal is to alter image contrast or use color to emphasize a particular characteristic or information category of interest. Filters Filters are used to selectively emphasize or de-emphasize information in an image. Grid – Filter/User Defined Filter (3 x 3) Grid – Filter/Simple Filter Grid – Filter/Gaussian Filter Grid – Filters/Laplacian Filter Grid Calculus/Grid Calculator Grid – Filters/Majority Filter Ratio Images A ratio image is an image created by dividing the image pixel values of one satellite band by the corresponding image pixel values of another satellite band in the same scene. In SAGA, image bands become grid data layers and pixels become grid cells. Grid – Calculus/ Grid Calculator Shapes – Tools/Create New Shapes Layer Shapes – Grid/Get Grid Data for Shapes

Page 24: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

7

Composite Images You can create a composite image by assigning combinations of spectral ranges or bands to the primary display colors red, green, and blue (RGB). Basically, creating a color composite is an enhancement involving multiple bands rather than a single band. Grid – Visualisation/RGB Composite Vegetation Indices Vegetation indices are used with multi-spectral imagery to estimate the likelihood or probability that vegetation was actively growing at a particular location when vegetation reflectance values were collected. Grid – Calculus/Grid Calculator Image Classification Image classification is the process of converting continuous reflectance values into data categories. This process is commonly associated with multi-spectral satellite digital imagery but can also be applied to non-image grid data layers. Imagery - Classification/Cluster Analysis for Grids Imagery - Classification/Supervised Classification Shapes-Tools/Create New Shapes Layer Examples in this chapter involve two Landsat-7 scenes. One covers the Olympic Peninsula in the Pacific Northwest state of Washington. This is mostly a temperate marine coastal climate but includes a rain forest ecosystem. The second scene is of central east Arizona. This area is characterized by elevations from below 2000’ to over 9000’ with corresponding altitudinal vegetation changes and climate. Many examples are presented for visually adjusting the display of the satellite data. In addition, you are introduced to creating a variety of different vegetation index grid data layers as well as applying supervised and non-supervised classification procedures for land cover interpretation. Description: Chapter 8 – The SAGA Point Cloud (.spc) Data Type SAGA version 2.0.4 introduced a new data type called the Saga Point Cloud (.spc) data type. Support for the use of the data type is available in a set of new modules. These modules are: Import/Export – Shapes/Import Point Cloud from File Import/Export – Shapes/Import Point Cloud from Text File Import/Export – Shapes/Import Stereo Lithography File (STL) Import/Export – LAS/Import LAS Files Shapes – Point Clouds/Cluster Analysis for Point Clouds Shapes – Point Clouds/Drop Point Cloud Attribute Shapes – Point Clouds/Point Cloud Attribute Calculator Shapes – Point Clouds /Point Cloud Cutter Shapes – Point Clouds /Point Cloud Cutter [interactive]

Page 25: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

8

Shapes – Point Clouds /Point Cloud Reclassifier / Subset Extractor Shapes – Point Clouds/Point Cloud Thinning (simple) Shapes – Point Clouds /Point Cloud from Grid Points Shapes – Point Clouds /Point Cloud from Shapes Shapes – Point Clouds /Point Cloud to Grid Shapes – Point Clouds /Point Cloud to Shapes Shapes – Point Clouds /Transform Point Cloud Shapes - Point Cloud Viewer/Point Cloud Viewer Supporting the processing and analysis of Point Cloud data is newly integrated into SAGA. This chapter introduces many of the modules supporting this data type. Description: Volume 1 The chapters in volume 1 provide a lot of basic, core information about SAGA, the SAGA graphical user interface, the Workspace, etc. Chapter 2 in Volume 1 provides an introduction to the graphical user interface. Chapters 3 and 4 explore the module and data tab environments in the Workspace area. Chapters 5, 6, and 7 describe the parameter settings for grid, shapes, and Point Cloud layers. Chapter 8 presents information about the ‘Maps’ tab area of the Workspace and Chapter 9 introduces you to how SAGA handles tables. The basic level of information provided in Volume 1 is not repeated in Volume 2. You may need to refer back to areas in Volume 1 when a particular data layer setting, e.g., is not described in detail. There are areas in Volume 2 where references to a Volume 1 chapter are provided.

Page 26: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

9

Chapter 2 - Some SAGA Basics The first two sections of this chapter use a couple of basic functions (listing data layers, tables, etc. and how to rename a layer) to introduce new users to the SAGA graphic user interface functionality. The remaining sections continue with this goal using a variety of SAGA modules that are applied to meet many different spatial analysis session requirements. For example, the Grid – Calculus/Grid Calculator module provides a significant amount of very general but extremely powerful capability for manipulating single and multiple grid data layers using mathematical equations. Readers of these sections will gain a very practical understanding of the SAGA graphical user interface along with insight on applying SAGA modules to address spatial analysis issues of a simple to moderate level of complexity. The chapter is made up of six sections. The sections are listed below along with the names of modules used in that section. List of Data Layers, Tables and Maps In Work Session Rename a Grid or Shapes Data Layer The SAGA Grid Calculator Module Grid – Calculus/Grid Calculator Re-Classifying Grid Data Values Grid – Calculus/Grid Calculator Grid – Tools /Change Grid Values Grid – Tools/Reclassify Grid Values Creating a Vector Layer of a Grid Data Layer Shapes - Grid/Vectorising Grid Classes View-Shed Analysis Shapes – Tools/New layer from selected shapes Shapes – Grid/Clip Grid with Polygon Terrain Analysis – Lighting, Visibility/Visibility (single point) [Interactive] Grid – Tools /Buffers/Grid Proximity Buffer Grid – Tools/Reclassify Grid Values Grid – Tools/Change Cell Values (interactive) Grid – Calculus/Grid Calculator Geostatistics – Grids/Zonal Grid Statistics Many of the procedures discussed related to these modules are shared by other SAGA modules. List of Data Layers, Tables and Maps In Work Session The Workspace must be visible if you want to view a list of data layers, tables, and maps available for the current work session. If the Workspace is not visible when you start a work session, there are two ways to make it visible.

Page 27: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

10

When you click on the Window title on the Menu Bar, a drop-down menu displays. The first option on the menu is ‘Show Workspace’. If the Workspace window is already visible, a check displays to the left of the option. If it is not visible, when you choose the option a check will appear and the Workspace window displays somewhere within the SAGA display along one of the borders. The location it is displayed in the SAGA window depends on how other SAGA windows, if any, are being displayed.

The Workspace can also be displayed by clicking on the icon on the toolbar. Clicking on the icon will act in the same way as if you clicked on the ‘Show Workspace’ option in the Menu Bar ‘Window’ drop-down menu. At the bottom of the Workspace window are three tabs. Each of these tabs will select a different area of the Workspace window to display. This approach for viewing a list of data layers and tables will use the ‘Data’ tab. The view in the ‘Data’ and ‘Maps’ tab areas defaults to the ‘Tree’ tab mode. The other mode is the ‘Thumbnails’ mode. The ‘Maps’ tab is used for displaying a list of available maps. Figure 2-1 displays an example of what the Workspace looks like when you click on the ‘Data’ tab. The content of the display will vary depending on what has been loaded.

Page 28: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

11

Figure 2-1. An example of the ‘Data’ tab area list in the workspace.

The list in the ‘Data’ tab area has four data type sections: Grids, PointCloud, Shapes and Tables, in that order. If a grid data layer is not loaded, the “Grids” section will not appear in the list; the same holds true for the other three main data types. The “Grids” portion of the example list is sub-divided based on loaded grid systems. A grid system becomes loaded if a grid data layer that is part of the grid system is loaded via the File: Grid: Load Grid command from the Menu Bar or loaded as part of a Project.

Page 29: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

12

In the example in Figure 2-1, there are two grid systems. Each has a unique set of parameters. The first system is described by the information: 104.355; 539x 585y; 460552.807768x 5213286.940169y Every grid data layer that is a part of this grid system shares the spatial attributes listed in the grid system information line. In this example, each grid cell is 104.355 meters on a side. A grid matrix enclosing the geographic area of coverage is 539 cells wide (number of columns) and 585 cells high (number of rows). The west (x) and south (y) coordinates are for the southwest corner of the geographic area. The coordinates are in meters. The second grid system is: 5; 432x 764y; 1062730.918394x 738556.906977y You can see that this system uses a different cell size and covers a different geographic area. Many SAGA grid data layer modules, commands and tools applied to two or more grid data layers can only be applied to grid data layers that are part of the same grid system. Immediately below the “Grids” portion of the list is the section for point cloud data layers. If any point cloud data type layers are loaded for the work session, this is where their names will be displayed. Below the “PointCloud” section of the list is the area for shapes data layers. The “Shapes” portion of the list is sub-divided based on the type of vector objects: line, multipoint, point, and polygon. If a shapes data layer is not loaded for one of the vector feature types, the vector category will not appear in the list. In Figure 2-1, you can observe that eight shape data layers are available; two line layers, one point shape data layer, and five polygon layers. The last section is for listing loaded table files. There are two table files listed in this section in this example. A vertical scroll bar appears on the right side of this window if the list is longer than what can be displayed in the current Workspace window size. A horizontal scroll bar is used when more width is needed for displaying longer horizontal entries. The two viewing modes for the ‘Data’ and ‘Maps’ tab areas are chosen using the ‘Tree’ and ‘Thumbnails’ tabs. The ‘Tree’ viewing mode is the default. That is the view mode displayed in Figure 2-1. In the ‘Thumbnails’ view mode the data layers are displayed as thumbnails. The shapes data layers are displayed starting at the top of the ‘Data’ window, in this view, followed by the grid layers and last are any point cloud files. Tables will not be listed in the ‘Thumbnails’ viewing mode.

Page 30: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

13

A list of maps can be viewed by clicking on the ‘Maps’ tab at the bottom of the Workspace window. Figure 2-2 shows an example of a maps list.

Figure 2-2. The ‘Maps’ tab area list in the Workspace window.

This example list shows that there are three available maps. The default name first assigned for a map is based on the first data layer displayed for the map view window. A map is created every time you display a data layer in a map view window rather than add it to an existing map view window. Each map section identifies the data layer or layers that make up the map. Maps ’01. aRIdemM’ and ’01. MCrrlines’, in Figure 2-2, each consist of a single data layer. The data layer for the first one is a grid data layer and the one for second is a line shape data layer. You can tell by the icons that are displayed to the left of the layer names. The first map in the list, ’01. MCdem30’, is made up of two data layers. It includes a polygon shape data layer (data layer ’01. MCwaterbasins’) and an elevation grid data layer (data layer ‘01. MCdem30’). Rename a Grid or Shapes Data Layer There are two different names used to refer to a data layer. One is the name that SAGA uses as a reference for the data layer. The second one is the storage file name for the data layer; i.e., the file name used by the host computer system. The name that SAGA uses to refer to a grid or shape data layer is a parameter in the data layer parameter settings. The data layer parameters are descriptors that are part of the project environment. These parameters can be viewed in the ‘Object Properties’ windows. If the ‘Object Properties’ window is not displayed, you can view it by going to the ‘Window’ title on the Menu Bar. When you click on ‘Window’ a drop-down menu displays with three options; the middle one is “Show Object Properties”. Click on that one, a check will appear, and the ‘Object Properties’ window displays somewhere in the SAGA display window. The parameters for a specific data layer become available for viewing when it is the active layer. A layer becomes active when you choose the data layer name (if chosen it

Page 31: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

14

will be highlighted) in the list of data layers that appears in the ‘Data’ tab area (click on the ‘Data’ tab to view that area) Workspace window. You can see the data layer parameters for the active data layer by clicking on the ‘Settings’ tab at the bottom of the ‘Object Properties’ window. Figure 2-3 shows a portion of the parameters page for a digital elevation model (DEM) data layer.

Figure 2-3. The parameters page for a DEM data layer.

The text that appears in the value field to the right of the ‘Name’ parameter in the ‘Settings’ tab area of the ‘Object Properties’ window for a data layer is the reference that SAGA uses for the data layer in the work session. When you view the list of data layers

Page 32: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

15

in the ‘Data’ tab area of the Workspace window, this is the name that represents the data layer. Alternatively, if you choose the ‘Thumbnails’ view tab for the display mode in the ‘Data’ tab area, when you move the mouse pointer over a data layer thumbnail, this is the name that will pop up. This is also the name that is associated with the data layer when the data layer is a member of a specific project. This name is stored as part of the data layer environment for the project definition (projects are discussed in more detail in Volume 1, Chapter 2). When a data layer is first loaded into a work session using one of the ‘Load’ commands in the Menu Bar File drop-down menu, the name for the storage file used by the host operating system is entered into the ‘Name’ parameter value field as the default. You can change the name for the ‘Name’ parameter value field by clicking in the value field to the right of the ‘Name’ label with your mouse pointer. When the current name is highlighted, enter a new name from the keyboard. After you click on the ‘Apply’ button at the bottom of the window, SAGA uses the name to refer to the data layer for the current work session. After you change the name in the value field, if you look at the list in the ‘Data’ tab area of the Workspace you will see that the name was updated there, also. If you have a project loaded at this time, or decide to save the current work session as a new project, the names and other parameters associated with the data layers are saved as part of the project environment and definition. A data layer can be saved as part of more than one project. This means that a stored data layer file can have different names referenced to it for different projects. When you change the name that appears in the ‘Name’ parameter value field, you are not changing the name for the storage file containing the data layer data. Once you have made a data layer active (i.e., by moving the mouse pointer over the name in the list and clicking the mouse button so the name is highlighted), the name used for the storage file can be looked at by clicking on the ‘Description’ tab at the bottom of the ‘Object Properties’ window.

Page 33: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

16

Figure 2-4. Viewing the storage file name in the ‘Description’ area of the ‘Object Properties’ window.

Figure 2-4 displays the ‘Description’ area information for the digital elevation model for Mason County. Just below the word “Grid” is the “Name” parameter. “Elevations” is being used as the reference in SAGA for this data layer. Below the “Name” parameter is the word “File”. To the right of “File” is a directory path. The last part of this path is the storage name for this file: MCdem30.sgrd. SAGA supports one way to change the actual storage file name. If you right-click with your mouse pointer on the name of a data layer in the ‘Data’ tab area, there are two options on the pop-up list that appears, related to saving the data layer file. The options are ‘Save Grid’ or ‘Save Grid As…’ if it is a grid layer, ‘Save Shapes’ or ‘Save Shapes As…’ if it is a shape data layer and ‘Save Point Cloud’ or ‘Save Point Cloud As…’ if it is a point cloud layer. The ‘Save Grid’, ‘Save Shapes’, and ‘Save Point Cloud’ options are only available following an edit session where you have changed data values for the data layer. At other times, these options will be grayed out and cannot be selected. The ‘Save Grid As…’, ‘Save Shapes As…’ and ‘Save Point Cloud…’ options are always available. If you have changed data values for a data layer, and choose the appropriate ‘Save …’ option, the current data layer storage file name will be used to save the layer. When you choose the ‘Save … As…’ commands, however, you are provided the opportunity to enter a new, different name. A copy of the file is created using the name you specify and

Page 34: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

17

the file copy is saved. When you click the ‘Save’ button, the copy of the data layer file is saved using the name you entered. The SAGA Grid Calculator The versatile SAGA ‘Grid Calculator’ is available as the module Modules/Grid - Calculus/Grid Calculator. It supports mathematical and trigonometric manipulations involving one or more grid map layers. Typical traditional GIS functions supported with the Grid Calculator include ADD, SUBTRACT, MULTIPLY, DIVIDE. In addition, there is a full range of trigonometric commands and some Boolean functions. Before introducing you to some specific functions, let’s look at the module parameter settings page. A parameter settings page is common to all SAGA modules. The inputs and outputs all follow a similar format. When you execute the Modules/Grid - Calculus/Grid Calculator the first thing you see is the ‘Grid Calculator’ parameter settings page in Figure 2-5. This one has four parameters. The ‘Grid system’ parameter is where you choose the grid system the input grid data layer(s) are a part. The default is “[not set]”. The ‘>>Grids’ parameter is for choosing one or more input grid data layers. The default is “No objects”. If the module is to execute successfully, one or more grid data layers must be chosen for input. The ‘<<Result’ parameter supports a single grid data layer as output. The default for this parameter is “[create]”. The name the module uses for the output grid data layer will be the formula. The last parameter, ‘Formula’, is the instruction, in the form of an equation, for how the input grid data layer(s) will be manipulated by the Grid Calculator.

Page 35: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

18

Figure 2-5. The Grid Calculator parameter settings page.

When you click in the value field to the right of the ‘Grid system’ parameter, a small triangle appears on the far right in the value field and a pop-up list of grid systems available in the work session displays. The importance of choosing the right grid system is that only grid data layers that share the spatial characteristics of the chosen grid system will be available for choosing as ‘>>Grids’ input. One or more input grid data layers can be chosen as input. The first time you click with the mouse pointer in the value field to the right of the ‘>>Grids’ label, an ellipsis appears in the field. When you click on the ellipsis symbol a list of loaded grid data layers displays in the ‘Grids’ dialog window. The grid data layers in the list are the ones that share the spatial characteristics of the grid system chosen for the ‘Grid system’ parameter. You can choose one or more grid data layers from the list for use with the calculator formula. Figure 2-6 shows an example of how the pop-up list can appear.

Page 36: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

19

Figure 2-6. The ‘Grids’ input window for the Grid Calculator module.

The list on the left side is all of the grid data layers that are currently loaded for the grid system chosen in the ‘Grid system’ value field. Data layers that are going to be used in a calculation have to be moved to the list on the right side. There are two steps involved. You move a layer from the left column to the right column by first highlighting the layer name, clicking on it with the mouse pointer. You can select more than one layer by holding down the keyboard CTRL or SHIFT keys with additional mouse clicks. Next

you click on the button. This button will move the chosen layer or layers into the list in the right column. You can also move data layers back and forth between the two lists by double-clicking with the mouse pointer positioned on the file you want to move. You must pay attention to the order that grid data layers appear in the list on the right. When you refer to a grid data layer in the ‘Formula’ parameter value field, a single text character is used to reference the grid data layers based on their position in the list. For example, if you have four grid map layers in your ‘Input’ list, they will be referred to by “a”, “b”, “c”, and “d”. The letters are assigned to the grid data layers according to their order in the list in the right column, from top to bottom. You can use letters up to “z”. Notice that the bottom two buttons in the middle of the ‘Grids’ window are labeled ‘Up’ and ‘Down’. These buttons allow you to move a highlighted grid data layer in the list, on the right, up or down in the list. When you move a layer up or down in the list, the alphabetic reference letter for it correspondingly changes. The ‘<<Result’ parameter value field will display “[create]”as a default. Generally, it is a good idea to use the “[create]”option. You can, however, choose an existing grid data layer for this parameter. The output from the module will overwrite the data in the layer and the layer ‘Name’ parameter value will be replaced with the ‘Formula’ parameter for the module execution. Here is an example of how to execute an “ADD” function.

Page 37: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

20

“ADD” – A simple addition of two or more data layers to create a composite. U.S. Bureau of Census census tracts are often used as the geographic representation of and source of socio-economic data. In this case, I have a grid data layer for population having an income level below the poverty level by census tract and another layer representing population above the poverty income level. By adding the two grid data layers together, the result will be a grid data layer for total population by census tract. Figure 2-7 displays the two input grids. The one on top is for population below the poverty income level and the lower one is population above the poverty income level. The census tract starting in the southwest corner of the study area (medium orange on the left and dark orange on the right) has a population below the poverty income level of 567 and a population above the level of 4222. I can verify that the value for this census tract in a grid data layer resulting from the addition of these two data layers will be 4789.

Page 38: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

21

Figure 2-7. The two population grid data layers in Map Layout view windows.

The ‘Grid Calculator’ parameters page is displayed in Figure 2-8 for the ‘ADD’ example.

Page 39: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

22

Figure 2-8. The ‘Grid Calculator’ settings page used for the ‘ADD’ example.

The ‘Grid Calculator’ settings page shows that two grid data layers are being used. The value field to the right of the ‘>>Grids’ label displays “2 objects (MCnonPovPop.dgm, MCpoverty.dgm)”. The objects are the two input grid data layers. The formula entry is “a+b”; adding layer “a” (the population above the poverty level) with “b” (the population below the poverty level). The ‘<<Result’ parameter has been left with the default “[create]“. The module is executed by clicking on the ‘Okay’ button. Figure 2-9 shows the result.

Page 40: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

23

Figure 2-9. The composite grid data layer for total population.

When I query the census tract in the southwest corner of the output grid data layer I find that the value is 4789. The upper graphic in Figure 2-9 displays a zoomed in area of the border between two census tracts with the actual stored data values visible. You can see that the data value for the orange colored area is 4789. This is the correct value for total population for this area. I rename the output grid data layer ‘MCpopulation’. Changing the equation in the value field to the right of the ‘Formula’ parameter will execute several additional standard GIS functions associated with grid data layers. “SUBTRACT”, formula “a-b”, subtracting one grid data layer from another.

Page 41: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

24

“MULTIPLY”, formula “a*b”, multiplying one grid data layer by another. “DIVIDE”, formula “a/b”, dividing one grid data layer from another. These are some simple basic functions that are supported with the Grid Calculator module. Here is how you can view a list of all the available functions for the Grid Calculator in the SAGA ‘Object Properties’ window for the module. Make sure that the Workspace and ‘Object Properties’ windows are displayed. First, click on the ‘Modules’ tab at the bottom of the Workspace window. Using your mouse pointer, select with a single click the module Grid – Calculus/Grid Calculator on the list. This makes the module “active”. Next, click on the ‘Description’ tab at the bottom of the ‘Object Properties’ window. The ‘Description’ section of the window displays descriptive information for the “active” object, in this case the module Grid Calculator. Here is a discussion on using the Grid Calculator module to create a new grid data layer from a grid data layer data category. My objective is to create a new grid data layer representing topographic “channels” by capturing the channels data class from an existing grid data layer made up of seven topographic data classes. First, let’s discuss the use of the formula field in the Grid Calculator. In the previous section of this chapter, I introduced you to using this module for simple standard mathematical commands: add, subtract, multiply, and divide. I also noted that the module could be used with trigonometric functions. The formula field can also be used with several Boolean functions as follows: gt(x,y): returns 1 (true) if x is greater than y, otherwise 0 (false) lt(x,y): returns 1 (true) if x is lower than y, otherwise 0 (false) eq(x,y): returns 1 (true) if x equals y, otherwise 0 (false) and x and y can either be a reference to a grid (a letter) or a numerical value. Ifelse(condition, x,y) returns x if the condition evaluates to true (1) or y if it evaluates to false (0). The condition is usually made up of one of the three commands listed above. I will use the “ifelse” function to produce a grid data layer for the landform class called channels that is coded with –7 data values on the terrain form grid data layer (‘MC1AllTer’ ). The terrain form grid data layer has 7 categories of topographic features coded 9, -9, 1, 2, -2, 7, and -7. The equation I will use to create the channel terrain form grid data layer is: ifelse(eq(a,-7),a,0) Here is the text interpretation of this formula.

Page 42: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

25

The input layers are referred to by alphabetical characters according to their position in the module ‘>>Grids’ parameter list. The ‘MC1AllTer’ layer is the single entry for the parameter, thus, it will be referred to by the letter “a”. The logical condition being evaluated is equality. In the formula the logical condition is “eq”. The equal condition being checked is for the data value of the grid cell in layer “a” compared to the number “-7”. If the data value for the grid cell on the input layer is equal to the value “-7”, then the condition is true. The condition to be checked is represented by “(a,-7)” in the formula above. The rest of the “ifelse” statement reads as follows: if the condition is true, then put the cell value of grid “a” in the corresponding cell of the output layer. If the condition is false, i.e., the value for the cell does not equal the value “-7”, then enter a “0” in the corresponding cell in the output layer. These actions are represented by “,a,0”. Using this formula allows me to easily create a new grid data layer representing channels from a grid data layer containing data values for several different topographic landforms. I start the process by executing the Grid - Calculus/Grid Calculator module. The parameters page for the Grid Calculator is displayed (Figure 2-10).

Figure 2-10. The initial Grid Calculator parameter settings page.

The first parameter in the list is ‘Grid system’. The grid system that I choose for this parameter must be the one that the grid data layer ‘MC1AllTer’ is a part. There can be more than one grid system loaded for a work session. I choose the ‘Grid system’ by clicking in the value field to the right of the ‘Grid system’ parameter. A small triangle appears in the value field and a pop-up list of the grid systems loaded for this work session displays. I click with the mouse on the appropriate grid system definition.

Page 43: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

26

The ‘>>Grids’ parameter is where I choose the input grid data layer. As discussed earlier, more than one grid data layer can be chosen for input. In this example, there is only one data layer needed. When I click in the value field to the right of the ‘>> Grids’ label, an ellipsis symbol appears in the field. When I click on the ellipsis symbol the ‘Grids’ window will appear (Figure 2-11).

Figure 2-11. The ‘Grids’ input window.

The list on the left side is all of the grid data layers that are currently loaded in the SAGA work session that share the spatial characteristics of grid system identified for the ‘Grid system’ parameter. You move a grid data layer from the list to the right column by clicking on the layer name with the mouse pointer so the name is highlighted. If more than one grid data layer is needed as input, I could make these selections by pressing the keyboard CTRL or SHIFT keys and additional mouse clicks before clicking on the move

button. Next I click on the button. This moves the selected layer into the list in the right column. I will only be using one grid data layer (‘MC1AllTer’). It appears first in the list. I choose it and move it to the right column. There is a shortcut for moving layers from one side of the list to the other. If you double-click on the layer name it will move to the other side of the list. I press the ‘Okay’ button and return to the ‘Grid Calculator’ settings window. I will leave the ‘<<Result’ parameter with the default, “[create]”. I enter this equation in the formula data field: “ifelse(eq(a,-7),a,0)”. Figure 2-12 shows what the settings page looks like.

Figure 2-12. The Grid Calculator parameter settings window used with a Boolean formula.

Page 44: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

27

I click the ‘Okay’ button at the top right of the window and the calculator executes creating a new grid data layer as output. I save the output data layer with a name explaining the data layer content. In this instance, the –7 is the data value for the ‘channel’ landform. So I save the data layer as ‘MC1channels’. Re-Classifying Grid Data Values This section of the chapter explores two SAGA modules specifically designed for recoding or reclassifying grid data layer values. The two modules discussed in this section are Change Grid Values and Reclassify Grid Values. The Grid Calculator module also supports basic reclassification and was discussed in the previous section as well as in chapters throughout this volume. Using the Change Grid Values Module The recoding examples I will use here involve recoding slope and aspect grid data layers. These layers, in my Mason County database, are made up of continuous data values. The original data values were in radians for both slope and aspect. Using the Grid - Calculus/Grid Calculator the radian values were converted to degrees. This was accomplished by multiplying the radian value in each cell by 57.2958. These two data layers, however, are input to some models evaluating mass movement susceptibility. The requirement in the susceptibility models is for the data to be in categories or in discrete form. This is because a series of subjective weightings are related to the discrete classes. Figure 2-13 displays the two grid data layers prior to this recoding process. The slope layer is on the left and the aspect layer on the right.

Figure 2-13. The slope and aspect grid data layers prior to recoding.

Page 45: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

28

The existing slope continuous data will be recoded into 7 discrete classes. This classification system is one developed by the U.S. Department of Agriculture Natural Resource Conservation Service. The classes are as follows: Existing Slope Values New Slope Data (Degrees) (Degrees) Classes Code 0.0 1.72 0-3% 1 1.72 4.58 3-8% 2 4.58 8.53 8-15% 3 8.53 16.7 15-30% 4 16.7 26.56 30-50% 5 26.56 33.02 50-65% 6 33.02 90.0 65%+ 7 The existing aspect continuous data will be recoded into 8 discrete classes. These classes are: Existing Aspect Values (Degrees) (Degrees) Data From To Code 0.0 45.0 1 45.0 90.0 2 90.0 135.0 3 135.0 180.0 4 180.0 225.0 5 225.0 270.0 6 270.0 315.0 7 315.0 360.0 8 I am going to use the Grid - Tools/Change Grid Values module to recode these two grid data layers. The ‘ Change Grid Values’ settings page is displayed in Figure 2-14.

Page 46: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

29

Figure 2-14. The Change Grid Values module parameter settings page.

I will first recode the slope degrees grid data layer into seven discrete classes (1 through 7) based on percent slope. I choose the ‘Grid system’ by clicking with the mouse pointer in the value field to the right of the ‘Grid system’ label. When the list of grid systems loaded for the current work session displays, I choose the grid system that the slope grid data layer is a part. Next, I need to choose the grid data layer that is to be recoded. Again, I click in the value field and a small triangle is displayed along with a pop-up list of grid data layers associated with the grid system chosen above. I scroll down toward the bottom of the list and find the slope degrees data layer (‘MC1SlopeDEG’). When I click on the data layer its’ name is entered into the value field. The entry in the ‘<Changed Grid’ parameter value field needs to be changed from “[not set]” to “[create]”. I do this by choosing the “[create]” entry from the pop-up list of layers. A lookup table is used for recoding the existing grid data values to a set of classes. The lookup table rows define new data classes using one of three conditions. The first condition is used when single values are being recoded to a new single value. In this case, the “low value” identifies the grid cell value being replaced. Another field (Replace with) in the table contains a new value to replace with. The other two conditions use lower and upper data value boundaries. The grid data layer cell values falling between the lower and higher values of the classes are re-assigned to

Page 47: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

30

the new value representing the class. This means that for each new class, a single value is assigned to a range of data values on the existing data layer. The three conditions are: Grid value equals low value; Low value < grid value < high value; and Low value <= grid value <= high value. The reference to grid value in the above options is the new grid value that will be assigned. The “low value” and “high value” refer to the grid cell values being replaced. The last condition option is the one I will use for both of these data layers. I want the lower class boundary to be equal to or greater than the low value number and less than or equal to the higher number. The ‘Lookup Table’ is where the recoding parameters are set. As you see in Figure 2-15, it is a row and column format. By clicking on buttons you can add, insert or delete rows and you can move around in the table using arrow keys, the tab key, or the mouse. You can see the buttons for these options on the right side of the graphic in Figure 2-15. Figure 2-15 shows the ‘Lookup Table’ for the slope recode.

Figure 2-15. The ‘Lookup Table’ for the slope recode.

If the same recoding process is going to be used again, the table can be saved with the ‘Save’ button. After clicking on the ‘Okay’ button on the ‘Lookup Table’ dialog window, I click on the ‘Okay’ button on the settings page and the recoding is executed. The graphic in Figure 2-16 shows a zoomed in portion of the original slope grid data layer, in degrees, on the left and the same cells for the new (recoded) slope class grid data layer on the right. You can check corresponding cell values using the lookup table and see that the recoding worked fine.

Page 48: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

31

Figure 2-16. Comparing the original slope data layer with the recoded data layer.

The second example of this recoding is with the degree version of the slope aspect data layer. I again initiate the process by executing the Grid - Tools/Change Grid Values module. The ‘Grid system’ parameter will be the same as used for the slope recode. The input grid data layer is the ‘MC1aspectDEG’ layer for the Mason County, Washington database. After clicking with the mouse pointer in the value field to the right of the ‘>>Grid’ label (displaying the small triangle in the field after the first click) I choose the layer from the pop-up list of the grid system grid data layers. Since I will be generating a new grid data layer, when I click in the value field to the right of the ‘<Changed Grid’ parameter I choose “[create]”. I will use the third option again for the ‘Replace Condition’ choice; Low value <= grid value <= high value. Figure 2-17 shows the ‘Lookup Table’ for the aspect recode.

Page 49: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

32

Figure 2-17. The ‘Lookup Table’ for the aspect recoding.

Like the slope data layer, this is continuous data being recoded to discrete classes. Once the recoding information has been entered into the table, I click on the ‘Okay’ button. Next, I click on the ‘Okay’ button toward the bottom of the settings page and the recoding is executed. Figure 2-18 shows the same cells for the grid data layer ‘MC1AspectDEG’ on the left and the new layer with the aspect classes one through eight on the right. You can see that the recoding worked fine.

Figure 2-18. Comparing the original aspect data layer with the recoded data layer.

This completes two examples using the Change Grid Values module to recode grid data layer values. Using the Reclassify Grid Values Module The Grid – Tools/Reclassify Grid Values module serves the same purpose as the Change Grid Values module for recoding grid data layer data values. Unlike the Change Grid

Page 50: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

33

Values module, where the only method supported is the use of a lookup table, the Reclassify Grid Values module makes recoding a little easier and more convenient by directly supporting recoding a single value, a range of values, using a simple table, and using an user supplied lookup table in the same module. Figure 2-19 displays the ‘Reclassify Grid Values’ parameter settings page.

Figure 2-19. The parameter settings page for the Reclassify Grid Values module.

Page 51: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

34

This first example will use the ‘MCschoolDist’ grid data layer. This data layer identifies the various school districts in Mason County. School District #5 is to be changed to School District #12. All of the other school district numbers remain the same. The first parameter entry is for the ‘Grid system’. When I click with the mouse pointer in the value field to the right of the ‘Grid system’ label, a small triangle is displayed in the field and a drop-down list of grid systems available in the current work session displays. I choose the one that my input layer ‘MCschoolDist’ is a part. Next, to the right of the ‘>>Grid’ parameter, I click in the field with the mouse pointer. A list of the data layers loaded for the chosen grid system displays. I click on the data layer named ‘MCschoolDist’. The data layer name replaces the default entry “[not set]”. I will leave the default entry “[create]” in the value field to the right of the ‘<<Reclassified Grid’ parameter. This is the output parameter for the module. The next section is a major one and it is called ‘Options’. This is where you specify which reclassifying method you want to use. Each of the reclassifying methods has an input section. You enter data in the section for the method you choose for the ‘Method’ parameter. Data contained in any other sections will be ignored and will not affect the module results. The value field to the right of the ‘Method’ parameter is where you choose which of the four methods you want to use. When you move the mouse pointer into the value field and click the mouse button, a pop-up list displays the four choices: single, range, simple table and user supplied table. The default entry is “single”. In this example I am going to use the default “single” as I only want to change one data value on the grid data layer ‘MCschoolDist’ and leave the rest alone. The first section below the ‘Method’ parameter is called ‘Method Single’. It includes three parameters. The first one is the ‘old value’ parameter. In the value field to the right I enter in the data value in the grid data layer I want to change. I enter in “5”. The next parameter is called ‘new value’. I want to change all occurrences of 5 to12. I enter the number “12” in the value field to the right of the ‘new value’ parameter. The third parameter is for identifying an operator. The choices are =, <, <=, >=, and >. The default is to use the “=” operator. That works for this example. The other examples can be used for other situations. For example, if I wanted to change all of the existing data values less than 5 (i.e., in the example between 1 and 4), I would use the “<” operator; or, all of the data values less than or equal to 5 (i.e., between 1 and including 5), I would use the “<=” operator. You can see that there are other recoding options using the “single” method that are much broader than recoding a single value. It might be better to view “single” as meaning a “single” condition. Now that I have entered data for the several parameters I am using, I click on the ‘Okay’ button and the module executes. When it finishes I hear a beep (I have the “Beep when

Page 52: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

35

finished” option checked in the ‘Settings’ tab area of the ‘Object Properties’ for the “Modules Library” label). I check the list of grid data layers in the ‘Data’ tab area of the Workspace window, and at the bottom of the grid data layers is a new one called ‘Reclassified Grid’. I double-click on it and open it up in a map view window.

Figure 2-20. Comparing the original ‘MCschoolDist’ data values to the ‘Reclassified Grid’ values.

Using the mouse pointer I move to the school district coded as 5 to make sure it was reclassified as 12. In Figure 2-20 you can see the actual grid data values in the ‘MCschoolDist’ (on the left) and ‘Reclassified Grid’ data layers. The reclassification process worked fine. It appears that none of the other data values were affected. The example I will use for the “range” method is the census tracts grid data layer for Mason County. The layer is displayed in Figure 2-21.

Page 53: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

36

Figure 2-21. The Mason County census tract grid data layer.

The data range for the census tracts is from 9601 to 9615. The objective here is to recode census tracts 9603 through 9610 to 9600. These are the census tracts in the in non-blue and green shades occurring in the eastern half of the county. When I execute the Reclassify Grid Values module, the ‘Reclassify Grid Values’ parameter settings page is displayed. I choose the entry for ‘Grid system’ by clicking in the value field to the right of the ‘Grid system’ parameter. A list of the loaded grid systems for the current work session displays. I choose the grid system that includes the ‘MCcensustracts’ grid data layer. Next, to the right of the ‘>>Grid’ parameter, I click in the value field and a small triangle appears in the field and a list of data layers that share the spatial attributes of the grid system chosen above appears. I click on the data layer named ‘MCcensustracts’. The data layer name replaces the default entry “[not set]”. I will leave the default entry “[create]” in the value field to the right of the ‘<<Reclassified Grid’ parameter. This is the output parameter for the module. As mentioned earlier, the value field to the right of the ‘Method’ parameter is where you choose which of the four reclassifying methods you want to use. This time I choose “range” from the pop-up list of three options. I am going to select the range of data values from 9603 through 9610 for recoding. The second section below the ‘Method’ parameter is titled ‘Method range’. There are four parameters. The first one is for entering the minimum value. I enter 9603 in the value field to the right of the ‘minimum value’ parameter. In the value field to the right of the ‘maximum value’ parameter I enter 9610. These two parameters identify the range of data values I wish to recode.

Page 54: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

37

The third parameter is for entering a new value for all grid cells having any value in the data value range identified above. I am going to assign the new value of 9600. The fourth parameter is for identifying an operator. The choices are <= and <. The default is to use the “<=” operator. That works for this example. Now that I have entered data for the several parameters I am using, I click on the ‘Okay’ button and the module executes. When it finishes I hear a beep. Figure 2-22 displays the original ‘MCcensustracts’ grid data layer on the left and the recoded version where census tracts 9603 through 9610 have been combined into one data value. The census tracts recoded to 9600 appear in red.

Figure 2-22. Using the “range” method to combine several data values.

The module supports two methods using reclassification tables. The first one is chosen with the “simple table” in the value field to the right of the ‘Method’ parameter. Unlike when a lookup table is used for color classifying the data values for a grid data layer, using the “simple table” or “user supplied table” methods to reclassify grid values actually change the grid data values. The objective of this data recode is to develop a grid data layer that will be used in a wildlife habitat model. This model involves a series of grid data layers including vegetation, slope aspect, roads, streams, and elevation. The elevation input layer is the one this recode process is going to develop. Elevation data is contained in a digital elevation model (DEM) grid data layer. This data layer has data values ranging from sea level to 6430’. The wildlife habitat model requires a data layer where elevations below 1000 feet are assigned a “weight” of 1, 1000’ to 3000’ a weight of 100, 3000’ to 5000’ a weight of 200, and 5000 to 6430 a weight of 300. When I execute the Reclassify Grid Values module, the ‘Reclassify Grid Values’ parameter settings page is displayed (see Figure 2-19). I choose the ‘Grid system’ by

Page 55: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

38

clicking with the mouse pointer in the value field to the right of the ‘Grid system’ label. A list of the loaded grid systems for the work session displays. I choose the grid system the ‘MCdem30’ grid data layer is a part. The next parameter is for choosing the input grid data layer. To the right of the ‘>>Grid’ parameter, I click with the mouse pointer in the value field. From the drop-down list of grid data layers displayed, I click on the data layer named ‘MCdem30’. The data layer name replaces the default entry “[not set]”. I will leave the default entry “[create]” in the value field to the right of the ‘<<Reclassified Grid’ parameter. This is the output parameter for the module. As mentioned earlier, the value field to the right of the ‘Method’ parameter is where you choose which of the four methods you want to use. This time I choose “simple table” from the pop-up list of four options. The third section below the ‘Method’ parameter is titled ‘Method simple table’. There are two parameters. The first one, ‘Lookup Table’, is for developing a table, assigning new values to data ranges. The default entry for the ‘Lookup Table’ parameter is “Table (columns: 3; rows: 2)”. The existing, default table, must be modified to fit my reclassifying requirements. When I click with the mouse pointer in the value field to the right of the ‘Lookup Table’ label, an ellipsis symbol appears at the right side of the field. When I click on the ellipsis symbol, the ‘Lookup Table’ in Figure 2-23 displays.

Figure 2-23. A blank ‘Lookup Table’ for entering data class values.

Page 56: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

39

Figure 2-24 displays the ‘Lookup Table’ after I entered the data values defining the new data value classes using the weighting scheme to support the wildlife habitat model.

Figure 2-24. The ‘Lookup Table’ with new data classes defined based on elevation criteria.

The second parameter is for specifying the operator to be applied to the data ranges (the minimum and maximum class ranges in the table). When you click in the value field to the right of the ‘operator’ parameter, a list of four choices is displayed. They are min <= value < max, min <= value <= max, min < value <= max, and min < value < max. The default is “min <= value <max”. I will use the default. Now that I have entered data for the several parameters I am using, I click on the ‘Okay’ button and the module executes. When it finishes I hear a beep (I have the “Beep when finished” option checked in the ‘Settings’ tab area of the ‘Object Properties’ for the “Modules Library” label). Figure 2-25 displays the original ‘MCdem30’ grid data layer on the left and the recoded version where the data values represent weights for elevation classes that will be used as input to a wildlife habitat model.

Page 57: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

40

Figure 2-25. Using the “table” method to create input to a wildlife habitat model.

Figure 2-26 displays the color lookup table used for displaying the values for the weighted elevation data classes.

Figure 2-26. The color lookup table for the elevation input to a wildlife habitat model.

The last method is also a table-based approach. It is selected by choosing the “user supplied table” option in the ‘Method’ parameter value field. As the name suggests, the user supplies a table file containing fields serving the same functions as the minimum, maximum, and new fields described for the ‘Lookup Table’ earlier. This method is similar to the “simple table” method but has the advantage that the table can contain more fields of data (numeric or text) as long as three fields can serve as minimum, maximum, and new fields. The three fields are specified in the ‘Method user supplied table’ section of the ‘Reclassify Grid Values’ parameters page for the module.

Page 58: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

41

The table the user wants to use must be loaded prior to executing this module. If it is not already loaded, the user supplied table can be loaded using the ‘Load Table’ command found in the ‘Table’ option on the File drop-down menu on the Menu Bar. Also, a table can be loaded by right-clicking with the mouse on the “Tables” text that appears in the ‘Data’ tab area of the Workspace if another table has already been loaded for the work session. The user supplied table is selected in the module by clicking in the value field to the right of the ‘>Lookup Table’ parameter in the ‘Method user supplied table’ section of the ‘Reclassify Grid Values’ parameters page. When you click in the value field, a drop-down list of the tables loaded for the work session displays. You choose the table from the list. Once the table is chosen, the field headings for the table columns become available as options to choose for the minimum value, maximum value, and new value parameters. When you click in the value field to the right of these parameters, a drop-down list of the field names (or column headings) displays. You choose the field name or column you want to supply the values for the parameter. Once you make your choices, when you click on the ‘Okay’ button, SAGA applies the criteria in the table, and reclassifies the grid data layer. The module does not provide any tools for editing the “user supplied table”. The tools available for editing tables on the Table sub-menu on the Menu Bar would be available for this purpose. These tools are discussed in Volume 1, Chapter 9. The last section of the ‘Reclassify Grid Values’ parameter settings page is named “Special cases”. These options provide additional recoding functionality that can be applied for any of the four reclassify methods. The ‘no data values’ parameter allows you to change the existing “no data” value for the grid data layer to another, specified value, at the same time you are using one of the reclassification methods. First, you click on the check box to the right of the ‘no data values’ parameter. Next you enter a new “no data” value in the value field to the right of the ‘no data values >> value’ parameter. When you execute the reclassification by clicking on the ‘Okay’ button, the reclassification process you specify will be applied as well as the recoding of the “no data” value to the new value you specify. When you use the look-up method, the new “no data” value must be one not referenced in the table. The ‘other values’ parameter allows you to apply a recode or reclassification to all data values in the grid data layer that do not meet the recoding criteria specified for the method. For example, I have a range of data values for the grid data layer from 1 through 8. I choose the “range” method and specify a criteria for recoding values 3, 4, 5, and 6 to a new value of 13, using the <= operator. The normal result would retain the values 1, 2, 7, and 8 and my values 3 through 6 would change to 13. However, if I click on the check box to the right of the ‘other values’ parameter in the ‘Special cases’ section, enter a numeric value in the value field to the right of the ‘other values >> value’ parameter, the

Page 59: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

42

1, 2, 7, and 8 will be recoded to the new value entered in ‘other values >> value’ value field. Creating a Vector Layer from a Grid Data Layer This is an example of creating a vector data layer from an existing grid data layer. This process is often called raster to vector conversion. The data values for the grid data layer are discrete data classes as compared to continuous data. I will create a new shapes data layer with watershed polygons based on the cell values of a watershed grid data layer values. The SAGA module used for this is called Shapes - Grid/Vectorising Grid Classes. Figure 2-27 displays the ‘Vectorising Grid Classes’ parameter settings page.

Figure 2-27. The Vectorising Grid Classes parameter settings page.

The ‘Grid system’ chosen must be the one that the input grid data layer is a part. When I click in the value field to the right of the ‘Grid system’ parameter, I choose the appropriate grid system from the list of systems available for the work session. After choosing the grid system, the single input grid data layer is chosen by clicking in the value field to the right of the ‘>>Input Grid’ parameter. A pop-up list of current grid data layers displays and I choose the watershed basins grid data layer (MCwaterbasins). The default setting for the ‘<<Shapes’ parameter will work fine. Leaving it as “[create]” will cause a new shapes data layer to be created. The ‘Output as…’ parameter has two choices: Lines or Polygons. Watershed basins are polygons so I choose the “Polygons” option. Once the parameters are set I click on the ‘Okay’ button and the new shapes data layer for watershed basins is created.

Page 60: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

43

I can verify that a new data layer has been created by clicking on the ‘Data’ tab at the bottom of the Workspace window. The upper portion of the data layer list is for grid data layers. By scrolling toward the bottom of the layer list I see the section for shapes data layers. The shapes section of the list can be divided into three subsections; one for polygons, one for lines, and one for points. The sections used will depend on whether a vector data layer of that feature type is available for the work session. The default name for the polygon shapes data layer created based on the water basins grid data layer, is derived from the name of the input grid data layer, “MCwaterbasins”. When I double-click on the new vector layer, I am asked if I want it displayed as a new map or added to an existing map (i.e., if there are any existing maps). I identify the new map option. I intend to use the new shapes layer as an overlay for grid data layers and have to adjust the layer colors. Display parameters for data layers, either grid or vector, can be adjusted by using the ‘Settings’ tab area of the ‘Object Properties’ window for the layer. If the ‘Object Properties’ window is not displayed, you can access it by clicking on the Window title in the Menu Bar. Select ‘Show Object Properties’ from the drop-down list of three options. In my current display environment, the ‘Object Properties’ window is displayed at the bottom right. In order for the settings of the layer to be displayed in the ‘Object Properties’ ‘Settings’ tab area, the layer must be the active layer. I click on the ‘Data’ tab at the bottom of the Workspace window. I scroll down toward the bottom of the data layer list to the “Shapes” section. I locate the name for the new shapes data layer, move the mouse pointer over the name and click on it, and it is highlighted and becomes the active layer. The settings for the layer are now displayed in the ‘Settings’ tab area of the ‘Object Properties’ window. Figure 2-28 shows the default display parameters for the newly created shapes polygon data layer for water basins. The parameters that I am going to adjust are ‘Fill Style’ and ‘Outline Color’.

Page 61: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

44

Figure 2-28. The parameter settings page for the ‘MCwaterbasins’ shape data layer.

Figure 2-29 shows what the watershed basins shapes data layer looks like in a map view window.

Page 62: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

45

Figure 2-29. The ‘MCwaterbasins’ shapes data layer default display.

In the figure above, you can see that there is a green background to the polygon boundaries. One of the controls related to this background is the ‘Fill Style’ parameter. The default setting for this parameter is “Opaque”. The other choices are viewed by clicking in the value field to the right of the ‘Fill Style’ label. I do not want the background color to display, so I choose “Transparent” from the list of options. I can quickly see how this changes the map window by clicking on the ‘Apply’ tab toward the bottom of the ‘Object Properties’ window. The polygon boundaries are a dark green color. I can verify this by looking at the color selected for the ‘Outline Color’ parameter. I intend to overlay the water basin polygons on the DEM grid data layer. The display colors for the grid data layer are all fairly dark so I would like my polygon boundaries to be a light color, like white. Clicking in the value field to the right of the ‘Outline Color’ label, displays a scrollable drop-down list of colors. See Figure 2-30. The second from the bottom color in the list is white. I select it and click on the ‘Apply’ button at the bottom of the ‘Object Properties’ window.

Page 63: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

46

Figure 2-30. Choosing a shapes data layer polygon boundary color.

Because the transparent ‘Fill Style’ was selected and the background of the shapes data layer map view window is white, the polygons seem to disappear. However, it is just because I am using white for the boundary color. When I overlay the white polygon boundaries on a DEM, for example, the watershed basins will stand out nicely (Figure 2-31).

Page 64: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

47

Figure 2-31. The watershed basin shapes data layer as an overlay on the DEM grid data layer.

Viewshed Analysis Viewshed analysis is the calculation of the spatial area that is seen from an observation point on or above the landscape. This spatial area is referred to as a viewshed. A viewshed can also be the spatial area viewed from a series of observation points rather than a single one. Sometimes, viewshed analysis is referred to as seen area analysis. There are many reasons for using this kind of analysis. For example, a viewshed could be created for developed recreation campgrounds. What can campers see from the campground? Can they see the water tower two miles north of the campground? Will they be able to see the proposed power line on a nearby valley side-slope when it is constructed? Can they see the timber harvest (clear-cut) across the valley? What is the visual impact difference between two proposed cell tower locations? Is the scenic quality of a recreation trail changed by a proposed local highway modification? Viewshed analysis can be used for determining visual impact from proposed or existing linear features such as roads, railroads, transmission lines, gas pipelines, etc. Recreation managers can use this type of analysis for assessing visual impacts to dispersed recreation features and developed campgrounds. Line of sight analysis can help determine potential locations for communication towers. You can see that there are many applications for viewshed analysis. Viewshed analysis requires a minimum of three inputs. One, there must be a terrain or elevation model. The elevation model depicts elevation above sea level for each grid cell in the grid system area. Second, one or more observation points or viewing locations must be identified. These are the locations from which the viewsheds will be calculated. The last input is the height of the observer above the terrain. A height of 5’ might be used for a person. A tower height might use 100’. These are the basic inputs. Generally, in the United States, the most readily available elevation model will be a digital elevation model (DEM) produced by the U.S. Geological Survey. Ideally, the objectives of the analysis would drive the level of detail required of the DEM; practically,

Page 65: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

48

the choices are restricted by data availability and funds. Most DEM’s available in the U.S. are based on existing 1:24000 and 1:250000 scale topographic maps. Alternatives to using what is readily available include using photogrammetric soft- or hard-copy techniques to create a digital terrain model at the required level of detail. Another alternative is to create a digital elevation layer using a map digitizing process. This process would include initially digitizing a contour separation for a topographic sheet and using GIS functions to process the contour or vector data into a grid format. A desirable input, but infrequently available or cost-prohibitive to generate, is height of vegetation and cultural features for the analysis area. This height data would be used to adjust the DEM elevations. The viewshed analysis would then take into consideration the blocking affect of vegetation and buildings. Since vegetation grows or can be removed and structures can also be removed or modified, the downside is that the analysis becomes a static analysis, good for one point in time. On the other hand, without including the height of vegetation and cultural structures, you can consider the analysis as reflecting a worst-case scenario. Without this type of height data, proper evaluation of the viewshed analysis output necessitates an on-the-ground field survey of the viewshed analysis results. Beginning in the early 1990’s, a new aerial (fixed-wing or helicopter) remote sensing technique called LIDAR emerged in the commercial environment. This is a method that allows for surface elevation and vegetation height to be collected, at a very high density of geo-referenced readings, simultaneously. SAGA can be used in viewshed analysis. In this hypothetical example, I want to identify areas that can be seen from the Bear Gulch Campground within the watersheds that include the north end of Lake Cushman and the terrain to the north. The campground is located near the intersection of National Forest roads 24 and 2451 at the north end of Lake Cushman. The objective is to identify areas that the campground flagpole can be seen from. The top of the flagpole is about 50 feet above the terrain. Before proceeding with my viewshed analysis, I want to create a digital elevation model (DEM) for the watershed basins to the north of Lake Cushman. I can use several SAGA modules with the watershed basins grid data layer to create a grid data layer for only the target watersheds. I can then use that grid data layer as a mask on the Mason County DEM grid data layer to create one with only my watersheds of interest. Another way, possibly easier, is to use the shapes data layer of the county watershed basins. Figure 2-32 is a map view window displaying the Mason County DEM grid data layer with the watershed basins and water areas superimposed. The basin boundaries are portrayed in white.

Page 66: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

49

Figure 2-32. The Mason County DEM and watershed basins.

Lake Cushman is filled in yellow with a red outline. I clicked on the polygon boundary

for Lake Cushman using the ‘Action’ tool ( ) from the toolbar. The selected polygon gets highlighted in the yellow and red colors. The four watershed basins to the north (and including the northwest portion of the lake) are the ones I am going to use. I am going to choose them with the ‘Action’ tool and use the selected polygons to define the geographic area on the DEM grid data layer for a new DEM data layer. The first step is to make sure the ‘MCwatersheds’ map is the active shapes data layer. When I click with the ‘Action’ tool on the map view window, within a polygon boundary, it will be a watershed basin polygon that will be chosen. I use the ‘Zoom’

( ) tool to enlarge the northwest portion of map 7. Next, I choose the ‘Action’ tool and click in one of the basin polygons. Pressing the CTRL key, I click on each of the three other polygons. The result is displayed in Figure 2-33.

Page 67: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

50

Figure 2-33. The selected watershed basins.

I create a new shapes data layer from the selected watershed basins using the Shapes – Tools/New layer from selected shapes module. The parameter window for the module is displayed in Figure 2-34.

Figure 2-34. The ‘New layer from selected shapes’ parameter window.

There is only one input required and that is the name of the shapes data layer with the selected features. You can see in the figure that the name of the data layer in the value field is ‘MCwatersheds’. I click the ‘Okay’ button and the new shapes data layer

Page 68: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

51

containing four features, i.e., four watershed basins is created (Figure 2-35). I rename the output from the New layer from selected shapes module ‘WSviewbasins’.

Figure 2-35. A new shapes data layer based on selected watershed basins.

The last step in creating a DEM for the viewshed analysis is to execute the Shapes - Grid/Clip Grid with Polygon module. This module will use the four watershed boundaries in the new ‘WSviewbasins’ shapes data layer to select the corresponding grid cell data from the Mason County DEM grid data layer. Figure 2-36 displays the ‘Clip Grid with Polygon’ parameters window. I have already chosen the ‘Grid system’ in the value field and the ‘>>Input’ for the Mason County DEM grid data layer (‘Msdem30’). The shapes data layer for the four watershed basins is entered in the value field to the right of the ‘>>Polygons’ label.

Page 69: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

52

Figure 2-36. The ‘Clip Grid with Polygon’ parameters window.

After I click on the ‘Okay’ button, the DEM grid data layer for the four watershed basins is created (Figure 2-37).

Figure 2-37. The DEM grid data layer for the four watershed basins.

The map view window in Figure 2-37 also displays the watershed basin boundaries from the ‘WSviewbasins’ polygon shape data layer (in black), forest service roads from the ‘WSbasin-roads’ line shape data layer (in red), and Lake Cushman in a medium blue. I name the new grid data layer ‘WSBasinDEM’. The Bear Gulch Campground is located at the north end of Lake Cushman. Figure 2-38 is a zoomed in (enlarged) view of that area. I have placed a plus symbol centered on where the observer for the viewing analysis will be located.

Page 70: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

53

Figure 2-38. The observer location (the black plus symbol).

I will use the Terrain Analysis – Lighting, Visibility/Visibility (single point) [Interactive] module for calculating a viewshed for the observation point. When I select the module from the menu, the ‘Visibility (single point)’ parameters window is displayed (Figure 2-39).

Figure 2-39. The Visibility (single point) module parameters window.

The first parameter in the list is ‘Grid system’. A single mouse click in the value field to the right of the ‘Grid system’ label causes a small triangle to be displayed and along with a list of grid systems loaded for the current work session. I choose the grid system that the DEM grid data layer is a part. The next entry is to choose the grid data layer for ‘>>Elevation’. When I click in the value field to the right of the ‘>>Elevation’ parameter, a pop-up list of the grid data

Page 71: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

54

layers making up the chosen grid system displays. I choose the DEM grid data layer ‘WSBasinDEM’. The ‘Height’ parameter in the ‘Options’ section is where I identify the height or altitude of the observer above the terrain. I am going to enter the height of the flagpole. It is 50 feet. So I type in “50” for the ‘Height’ parameter. The last parameter in the list is called ‘Unit’. There are four options to select from: Visibility, Shade, Distance, and Size. I choose the “Visibility” option. Figure 2-40 shows the entries I will use for the Visibility (single point) parameters page.

Figure 2-40. The entries for the Visibility (single point) module parameter settings page.

When I click the ‘Okay’ button, the execution starts. This is an interactive module. The module execution will continue until I explicitly terminate it with a second choosing of the module. If you look at the ‘Modules’ drop-down list of options from the Menu Bar you will notice that a check is displayed adjacent to the Visibility (single point) [Interactive] option at the bottom of the list. You can also see it is checked if you click to see a list of the modules for Terrain Analysis. The module will continue execution until the user terminates it by clicking again on the command (at that point the check will disappear) where it appears at the bottom of the Modules drop-down menu and in the Terrain Analysis – Lighting, Visibility pop-up list of modules. If you have the module selected for display in the ‘Object Properties’ window, you can also stop execution by clicking a second time on the ‘Execute’ button at the bottom of the ‘Settings’ tab display. This is an important task. If you attempt to execute some other command while this one is executing, SAGA will display a message indicating that you cannot execute a new module while another module is still in execution mode. In the worst case, there is a possibility the software will crash.

Page 72: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

55

Almost immediately after clicking on the ‘Okay’ button, a new grid data layer will appear in the Workspace ‘Data’ tab area of the Workspace window. The default name for it is ‘Visibility’. This is the data layer where SAGA will display and place the results of the visibility analysis. Even though it is currently blank, I click on it and open it up as a new map. The new map will be blank at this time. The map view window is displayed on the right in Figure 2-41. The map view window on the left in Figure 2-41 is for the enlarged portion of the DEM where the observer point is located. The module is waiting for me to click on the observation point on the DEM.

Figure 2-41. The enlarged DEM displaying the observer location and the ‘Visibility’ grid data layers.

The ‘Action’ tool ( ) on the toolbar is used to capture the observer point coordinates for the viewshed analysis. When I click on the observation point, the visibility data layer is updated. The cells that an observer, at the observation point (from a height 50 feet above the observation point), can see, receive a value of 1 while cells not seen are set at 0. Figure 2-42 shows what the updated ‘Visibility’ grid data layer looks like. Because the default color is black, I have changed it for the map view window. The “seen” areas are dark blue and the areas not seen are white. I have also overlain the same shapes data for watershed basin boundaries and forest service roads used in Figures 2-37 and 2-38.

Page 73: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

56

Figure 2-42. The ‘Visibility’ grid data layer updated.

I can terminate the execution of the module by clicking on the check mark beside the module name at the bottom of the Modules drop-down menu. My other option is that I can select another point as long as the module is running. The map view will update instantly based on the new point. This is a powerful capability provided by many interactive modules. In this example, I terminate the execution and rename the output ‘Visibility’ grid data layer ‘WSview50’. I would like to get a better perspective of the area seen from the observer point. I will use the same map view definition in Figure 2-42 along with the ‘WSbasinDEM’ to create a couple three-dimensional perspective views. They are displayed in Figure 2-43. The visible areas appear as blotches of blue on the terrain.

Figure 2-43. Two perspectives for the Bear Gulch Camp flagpole seen area.

Page 74: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

57

I developed these views using the ‘3D-View’ tool. I executed it by clicking on the icon on the toolbar. The ‘3D-View’ tool is discussed in Volume 1, Chapter 8. I made some initial changes to the default parameters on the properties page and then used the mouse to interactively control how the perspective appears. I also set the ‘Transparency’ parameter in the ‘Settings’ tab area of the ‘Object Properties’ window for the ‘WSview50’ grid data layer. I set the transparency percent value in the value field to “30”. The ‘3D-View’ properties page in Figure 2-44 displays the parameter values for the perspective on the left in Figure 2-43.

Figure 2-44. The ‘3D-View’ properties page.

This analysis involved only a single observer and only at a single height above the terrain. If the objective was to delineate a viewshed or seen area for one of the forest service roads, a series of observation points on the road could be used with an observer height of 7’, for example. The series of visibility grid data layers could then be added

Page 75: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

58

together using the Grid – Calculus/Grid Calculator module to create a single viewshed map. Quite often, a viewshed delineation is done as part of a visual management program for a recreation site. In this case, the Bear Gulch Campground is a federal recreation site. There is a visual management system used for managing visual impacts related to recreation sites. I want to identify how much of the seen area is in the foreground, mid-ground, and background “visual” zones surrounding the campground. The foreground is a zone 402 meters wide; the mid-ground extends from 402 to 4828 meters; and the background out to 9656 meters. I am going to use the SAGA module Grid/Tools/Buffers/Grid Proximity Buffer. When I execute the module, the parameter window in Figure 2-45 is displayed.

Figure 2-45. The ‘Grid Proximity Buffer’ parameters window.

The single data layer input is for a ‘Source Grid’. I have created a grid data layer that identifies the Bear Gulch Campground location with a single cell containing a value of 1. All other cells contain zeroes. This grid data layer could be created using several approaches. I chose to create a new grid data layer populated by no-data values (-99999) using the Grid – Tools/Create Constant Grid module. Next, I created a map view window displaying the ‘WSbasinDEM’ and the ‘new’ constant grid layer. I know where the Bear Gulch Campground is located on the DEM layer. The Grid – Tools/Change Cell Values (interactive) module provides the capability to replace an existing grid cell data value

Page 76: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

59

with a new value using the ‘Action Tool’ from the Tool Bar. When the ‘Change Cell Values’ settings page for the Change Cell Values (interactive) module displays, I enter “1” for the ‘New Value’ parameter and click the ‘Okay’ button. Next, I choose the ‘Action Tool’ and move it to the cell where the campground is located. I press the left mouse button and the cell value is changed from -99999 to 1. I then exit from the interactive module and rename and save the ‘new’ grid data layer as ‘Basin-Campground’. Another approach, using a point shapes data layer as a starting stage, could have been used. In this case, I would create a point shapes data layer containing a single point object at the location of interest with an attribute field containing a value of 1 for the point. An on-screen digitizing process would be used to input this point object. On-screen digitizing with SAGA is described in a couple locations in the User Guide (Volume 1, Chapter 6, pg. 221 and Volume 2, Chapter 7, pg. 266). Next I would use the Grid – Gridding/Shapes to Grid module to rasterize the point shapes layer. The point shapes layer and the attribute field containing the value to use would be chosen as inputs to the module. I would choose “grid” for the ‘Target Grid’ parameter. Following module execution, when asked to specify a ‘Grid system’ as reference, the grid system which my grid data layers are a part would be chosen. The output grid would be created using the grid system parameters. Now, back to the Grid Proximity Buffer module. When I click in the value field to the right of the ‘Grid system’ label, I choose the grid system that my campground grid data layer is a part from the list of loaded grid systems for the work session. Next, I click in the value field to the right of the ‘Source Grid’ and choose the data layer ‘Basin-Campground’ from the list. The three remaining entries in the ‘Data Objects’ section relate to outputs. The default is for them to be set with “[create]”. I will do that even though the only one I am concerned with will be the one for a buffer grid. There are two parameters in the ‘Options’ section: Buffer distance and Equidistance. The value you enter in the value field for the ‘Buffer distance’ is the distance out from the feature that you want to search (in map units). In this example, I want to search a maximum of 9656 meters so I enter 9656. (Note: in this example, the grid system uses a metric coordinate base and the elevations are in feet). The foreground zone that I need to delineate is 402 meters wide. The mid-ground zone extends from 402 out to 4828 meters. So the equidistance parameter value I will enter is 402. This means the module will identify a series of 402 meter wide zones, out to 9656 meters; a total of 24 zones. I will have to combine the distance zones into the visual impact zones. After entering these parameters, I click on the ‘Okay’ button. The three new grid data layers are created. The one I am interested in is named ‘Buffer Grid’. I need to apply my watershed mask using the Grid Calculator to the ‘Buffer Grid’ layer. This will output a layer containing only ‘Buffer Grid’ data values within the watershed boundaries. This involves two grid data layers: the ‘Buffer Grid’ and ‘BasinMask’. The ‘BasinMask’ grid data layer contains “1” values for grid cells within the four watershed

Page 77: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

60

boundaries. On the Grid Calculator settings page, I chose the two layers so that the ‘BasinMask’ would be referenced as layer “a” in the ‘Formula’ parameter and ‘Buffer Grid’ as layer “b”. The formula I used was “ifelse(eq(a,1),b,0)”. It instructs SAGA to first check the cell value on the ‘BasinMask’ layer. If it is a “1” it means the cell is within the watershed boundaries. Place the corresponding cell value from the ‘Buffer Grid’ into the output grid data layer. In this way, the ‘BasinMask’ was used to mask out all of the ‘Buffer Grid’ data outside of the watershed boundaries. Applying the mask results with the grid data layer displayed in Figure 2-46. I have added to the map view window in the figure, a shapes layer for Lake Cushman (dark blue) and a roads layer with roads displayed in yellow.

Figure 2-46. The distance buffers for the Bear Gulch Campground.

Next, I want to reclassify the delineated zones into three, representing foreground, mid-ground, and background visual zones. Figure 2-47 displays the parameter window for the Reclassify Grid Values module with my entries for the value fields.

Page 78: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

61

Figure 2-47. The ‘Reclassify Grid Values’ parameters page.

The lookup table I used is in Figure 2-48.

Page 79: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

62

Figure 2-48. The lookup table for reclassifying the buffer zones into foreground, mid-ground and background.

The visual zone grid data layer is displayed on the left in Figure 2-49. The small area of foreground zone is in gray; the middleground zone in yellow; and the background in red.

Figure 2-49. The visual zone grid data layer.

The last step is to identify the areas in the three visual zones that are in the seen area for the Bear Gulch Campground flag-pole. This grid data layer is displayed on the right in Figure 2-49. Notice that the roads are displayed in dark blue. The same colors for the zones used on the left are used on the right. I used the Geostatistics – Grids/Zonal Grid Statistics module to find out how many grid cells of the viewshed were in each visual zone. This involved two inputs. The ‘Basin-VisualZones2’ grid data layer identifies the three visual zones. When I execute the Zonal

Page 80: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

63

Grid Statistics module, the ‘Basin-VisualZones2’ grid data layer will be chosen for the ‘>>Zone Grid’ parameter and the viewshed layer, ‘WSview50’, will be chosen for the optional ‘>Categorical Grids’ parameter. The output table, ‘<<Zonal Statistics’, will list the number of grid cells of the viewshed that fall within each of the three visual zones. Using the area of a grid cell, I calculated how many acres of viewshed were in each zone: 113 acres in foreground, 312 acres in middle ground, and 272 acres in background.

Page 81: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

64

Chapter 3 - SAGA Buffer Modules Introduction SAGA includes four modules designed to create buffers around data layer features. These modules are:

Shapes – Tools/Shapes Buffer Grid – Tools/Grid Buffer Grid – Tools/Grid Proximity Buffer Grid – Tools/Threshold Buffer

Three of the four modules operate in the grid or raster environment and one works with vector or shapes data layers. The SAGA vector to raster and raster to vector conversions provide the tools to move back and forth between the two processing environments depending on your analysis requirements and data; for example, vector to raster conversion can be handled using the Grid – Gridding/Shapes to Grid module, the Geostatistics – Kriging and Grid – Spline Interpolation library modules; raster to vector conversion using the Shapes – Grid/Vectorizing Grid Classes, Grid Values to points, and Contour Lines from Grid modules. This chapter explores applications involving each of the four SAGA buffer modules. The examples are hypothetical and will illustrate the application of a module to meet a particular objective requiring delineation of a buffer or zone. Other SAGA modules will be used as necessary to support the example objectives. The chapter is made up of four sections; one for each module. Several application examples will be described and discussed in each section. The sections are listed below along with the names of any other modules used in that section.

Shapes – Tools/Shapes Buffer Shapes – Grid/Clip Grid with Polygon Geostatistics – Grids/Zonal Grid Statistics Table – Calculator/Table Calculus Shapes – Tools/New layer from selected shapes Shapes – Points/Count Points in Polygons Shapes – Points/Clip Points with Polygons Grid – Tools/Grid Buffer Grid – Calculus/Grid Calculator Grid – Tools/Grid Proximity Buffer Grid – Calculus/Grid Calculator Geostatistics – Grids/Zonal Grid Statistics Table – Calculus/Table Calculator Grid – Tools/Reclassify Grid Values Shapes – Tools/Query builder for shapes Grid – Tools/Threshold Buffer

Page 82: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

65

The Shapes – Tools/Shapes Buffer Module The Shapes – Tools/Shapes Buffer module is used to delineate distance zones surrounding a point, a linear feature, or around polygon boundaries on a shapes data layer. The settings page for the Shapes Buffer module is displayed in Figure 3-1.

Figure 3-1. Settings page for module Shapes Buffer.

The input shapes data layer is chosen in the ‘>>Shapes’ parameter value field. In order for the input shapes data layer to be chosen, the layer must be loaded in the current work session. If it is not loaded, you can use the ‘Shapes/Load Shapes’ command in the Menu Bar ‘File’ drop down menu to load it. When you click in the value field to the right of the ‘>>Shapes’ parameter, a list of available shapes data layers displays. Clicking on the shapes data layer name will choose it for the value field. Shapes data layers have a linked table called an attribute table that provides characteristics for the layer objects. One or more of the attribute fields may contain data that can be used as buffer distances or zone widths related to the layer objects. The ‘Buffer Distance (Attribute)’ parameter is used to choose such an attribute to provide this data for analysis. This is an optional parameter. In the absence of a buffer distance attribute or choosing not to use one, other module options will provide the required data. The ‘<<Buffer’ parameter is used to specify the module output. The output for the module is a polygon shapes data layer made up of polygon objects representing buffer zones for the features of the input shapes data layer. The ‘Options’ section in the settings page has several options. The first one, ‘Buffer Distance’, has two choices: “fixed value” and “attribute field”. When you use the “fixed value” option, the module will use the entry in the value field to the right of the ‘Buffer

Page 83: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

66

Distance (Fixed)’ parameter for calculating the buffer around the input data layer objects. When the ‘attribute field’ option is chosen, the module will use the numeric data values provided by the chosen attribute for the ‘Buffer Distance (Attribute)’ parameter. This means that you can vary the buffer width depending on the attribute values for the objects. The ‘Scaling Factor for Attribute Value’ is used with the ‘Buffer Distance (Attribute)’ parameter. It is a multiplier that is applied to the numeric value stored for the chosen attribute for each object for the ‘Buffer Distance (Attribute)’ parameter. Thus, if the attribute value for an object is 10 and the ‘Scaling Factor for Attribute Value’ is 5, the buffer width for the object will be 5 times 10 or 50 (map units). The output buffer can be subdivided into equal width zones using the value field to the right of the ‘Number of Buffer Zones’. For example, if you are using a “fixed value” buffer of 100 feet and you enter a 5 for the ‘Number of Buffer Zones’ parameter, the module will produce a buffer with 5 zones within it, each one 20 map units in width. Example 1 The Mason County road maintenance department has decided to use GIS to calculate the number of acres in forestry land use within their road right-of-ways. The department is preparing a long-range maintenance plan. The major land use in the county is forestry and right-of-way maintenance cost is higher in forested areas than in other land uses. The first road maintenance district they are going to try this approach with is Grapeview. The transportation shapes data layer for Grapeview is called ‘MasonFD3roads’. The attribute table linked with this line shapes data layer includes an attribute named ‘BUFFER’. A portion of the attribute table is displayed in Figure 3-2.

Figure 3-2. A portion of the ‘MasonFD3roads’ attribute table.

The values in the ‘BUFFER’ field identify the right-of-way (ROW) width for each road in the maintenance district. Dirt roads have a ROW of 35’, gravel roads 45’ and paved

Page 84: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

67

roads 60’. The Shapes Buffer module will be executed with the settings displayed in Figure 3-3.

Figure 3-3. The settings used to create ROW zones (buffers) adjacent to roads.

The input shapes data layer ‘MasonFD3roads’ is chosen for the ‘>>Shapes’ parameter. An attribute stored in the linked attribute table will be used to provide the module the data values for buffer width. The buffer width varies by surface type. As discussed earlier, this attribute is named ‘BUFFER’ in the attribute table. The module is directed to use the information in the ‘Buffer Distance Attribute’ parameter by the choice of the “attribute field” option for the ‘Buffer Distance’ parameter. The other parameters in the ‘Options’ section will be ignored. The output is named, by default, ‘MasonFD3roads [Buffer]’. I renamed the output ‘MasonFD3ROWs’.

Figure 3-4. The new ‘MasonFD3ROWs’ polygon shapes data layer.

Page 85: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

68

The ‘MasonFD3ROWs’ polygon shapes data layer contains a single polygon object. The object consists of multiple parts. The full extent of the new layer is displayed on the left in Figure 3-4. A zoomed in area appears on the right. The ROW edges are displayed in black and the ROW is filled with pale yellow. I have overlain the roads in the zoomed in map view. Paved roads are in red, gravel are blue, and brown is used for dirt. The next step is to use the ROW polygons to identify and quantify the amount of forestry land use within the ROW widths. There is not a general land use shapes data layer available for the road maintenance districts. But there is a general land use grid data layer. There is a module that uses a polygon shapes data layer to “clip” a grid data layer creating a grid data layer with data for the geographic area covered by the polygon object(s) on the input shapes data layer. This should work for my objective but I need to do some preprocessing with the general land use grid data layer that is available. The grid data layer available for general land use has a cell size of 90’. The road ROW’s are all less than 90’. Ideally, I would like a spatial resolution that is less than the smallest ROW width. SAGA has a module that is used to resample the larger cell size to a smaller resolution more compatible with my requirements. I can use the Grid – Tools/Resampling module to convert the ‘MasonFD3genLU’ grid data layer from a 90’ cell size resolution to a 30’ cell size resolution. After executing the Resampling module, I rename the output grid data layer ‘MFD3genLU30’ to distinguish it from the larger cell size version. The Shapes – Grid/Clip Grid with Polygon module will be used to create a grid data layer containing only the land use classes within the ROW (the buffer generated from the Shapes Buffer module). I can use the Zonal Grid Statistics module to generate a table showing area of land use within the ROW. Figure 3-5 displays the settings I use for execution of the Shapes – Grid/Clip Grid with Polygon module.

Page 86: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

69

Figure 3-5. Settings for the Shapes – Grid/Clip Grid with Polygon module.

The grid data layer for land use within the maintenance district is ‘MFD3genLU30’ and is chosen for the ‘>>Input’ parameter. The ‘Grid system’ chosen is the one the land use layer is a part. The polygon shapes data layer representing the ROWs is chosen for the ‘>>Polygons’ parameter. Remember this shapes data layer was generated using the ‘BUFFER’ attribute to create a single polygon for the road ROW. The output is a new grid data layer, in a new grid system, capturing land use class data within the road ROW for all roads in the Grapeview road maintenance district. I rename the output grid data layer ‘ROWlu30’. The Geostatistics – Grids/Zonal Grid Statistics module can be used to tabulate the number of cells for each class or category on a categorical grid data layer. That is one of modules basic functions in addition to several much more sophisticated tabulations. Figure 3-6 displays the settings used for the Zonal Grid Statistics module to produce its default output ‘Result Table’.

Page 87: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

70

Figure 3-6. The settings for the Geostatistics – Grids/Zonal Grid Statistics module execution.

As noted above, I renamed the output from the Shapes – Grid/Clip Grid with Polygon module ‘ROWlu30’. This grid data layer was chosen for the ‘>>Zone Grid’ parameter in the settings. There are other optional inputs that could be used for more complex statistic summaries. This one is a simple one. The output from this module is a table called ‘Zonal Statistics’. The ‘Zonal Statistics’ table lists number of cells in each land use class (0 through 12) within the ROW polygon. The Table – Calculator/Table Calculus module can be used to divide the cell count by the number of cells making up an acre to determine the number of acres per land use class. It takes 48.4 cells to make up an acre. A new column is generated in the ‘Zonal Statistics’ table that contains the result of dividing the number of cells by 48.4 to create an ‘Acres’ column. Figure 3-7 displays the ‘Zonal Statistics’ table with the ‘Acres’ column created.

Page 88: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

71

Figure 3-7. The ‘Result Table’ with the ‘Acres’ column included.

LU Class 9 in the table is the land use class for forestry. The table shows that about 45 acres of forestry land use are within the roads ROW in the maintenance district. As noted earlier, the “Acres” column in the ‘Zonal Statistics’ table was generated using the Table – Calculus/Table Calculator module. In the Table Calculator module, the table fields or columns are referred to by an alpha representation of their position going from left to right. The first column is referred to by “a”, the second by “b”, etc. Thus, based on the original table, the equation “b/48.4” was used to calculate acres. The values in the “Count” column represent the number of grid cells for that category. It takes 48.4 grid cells to make an acre. The equation says to divide the value in column “b” (the ‘Count’ column) by the value 48.4. The output from the equation was placed in a new table column named “Acres”. Notice in the title bar containing the name of the table, in Figure 3-7, that the new table output by the Table Calculator is ‘Result Table [b/48.4]’. The equation has been concatenated to the default table name. Example 2 The Reach Harbor Marina has applied for a permit for marina improvements including the addition of new pilings. Pile driver equipment is quite noisy and can be disruptive. The County has requested the Marina to develop a contact list of landowners that could be potentially impacted by the noise. The County wants an address list based on distance zones around the improvement site. They want a list for people within ½ mile, from ½ mile to 1 mile, from 1 mile to 1-1/2 miles, and from 1-1/2 to 2 miles. Each of the distance zones is ½ mile wide. The County has provided a point shapes data layer that contains all the addresses in the county as point objects. The first task is to identify the point that identifies the location of the marina project.

Page 89: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

72

The ‘MasonAddresses’ point shapes data layer was displayed in a map view window. Using the ‘Action’ tool from the Tool Bar, the point representing the address of the marina was located, selected, and highlighted. The Shapes – Tools/New layer from selected shapes module was then executed, using the ‘MasonAddresses’ point shapes data layer (with the point selected) as input. The output from the Shapes – Tools/New layer from selected shapes module is a new point shapes data layer that I renamed ‘PointSource’. The Shapes – Tools/Shapes Buffer module is executed to create a polygon shapes data layer with the 4 one-half mile concentric zones centered on the marina project. The settings page for this execution is displayed in Figure 3-8.

Figure 3-8. The settings for the Shapes – Tools/Shapes Buffer module to create the distance zones.

The input for the ‘>>Shapes’ parameter is the point shapes data layer containing the single point representing the location of the marina project. The intent is to define four one-half mile wide zones going out to two miles from the marina. The “fix value” option is chosen for the ‘Buffer Distance’ parameter since the ‘Buffer Distance (Fixed)’ and the ‘Number of Buffer Zones’ parameters will provide the inputs. Two miles is 10560’. This is the value entered for the ‘Buffer Distance (Fixed)’ parameter. The number of zones is 4 (i.e., 4 one-half mile wide zones within the two miles). The number 4 is entered for the ‘Number of Buffer Zones’ parameter.

Page 90: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

73

Figure 3-9 displays the output polygon shapes data layer. The output was renamed to ‘PointDistZones’.

Figure 3-9. The output polygon shapes data layer from the Shapes Buffer module.

The map view window in Figure 3-9 displays the one-half mile distance zone boundaries in black. The orange circle outlines are address points (the circle size is exaggerated at this display scale). The center is the point representing the marina project. I used the Shapes – Points/Count Points in Polygons module to add the expected number of addresses for each of the four zones into the attribute table linked to the ‘PointDistZones’ shapes data layer. The attribute table is displayed in Figure 3-10.

Figure 3-10. The attribute table for the ‘PointDistZones’ polygon shapes data layer.

The first ½ mile distance zone is ID 2, Zone 25. The Points field indicates it has 216 addresses in it. Zone 50 is the second ½ mile zone, zone 75 the third, and zone 100 the last.

Page 91: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

74

The Shapes – Points/Clip Points with Polygons module is used to create a table for each of the distance zones with the potential impact addresses. Figure 3-11 displays the settings used for this execution.

Figure 3-11. The settings used with the Clip Points with Polygons module.

The input point shapes data layer is the county layer with the address points (‘MasonAddresses’). The polygon shapes data layer input, ‘PointDistZones’, is the layer containing the four polygons, one for each of the one-half mile wide distance zones. The “ZONE” attribute is chosen for addition to the attribute table for the output point shapes data layer. The “ZONE” attribute is the one identifying each zone: 25, 50, 75, and 100. Figure 3-12 displays the output. The output is a new point shapes data layer for each distance zone. The ‘PointDistZones’ polygon shapes data layer is overlain on each of the four output layers.

Page 92: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

75

Figure 3-12. The new point shapes data layers for each distance zone. Zone 25 is upper left and zone 100 is lower right.

Figure 3-13 shows a portion of the attribute table linked to the layer for zone 100.

Figure 3-13. A portion of the attribute table for zone 100.

Page 93: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

76

The attribute table in Figure 3-13 contains 209 records. The records include the address for each point as well as other data related to the property. The main objective is to identify the addresses of properties that can be potentially impacted by noise from the project. This has been accomplished. The Grid – Tools/Grid Buffer Module The Grid – Tools/Grid Buffer module is the first of three buffer creation modules that work with grid data layers. The settings page for the module is displayed in Figure 3-14.

Figure 3-14. Settings page for module Grid Buffer.

The input ‘>>Features Grid’ parameter is where you choose the grid data layer that contains the features the buffer will be created around. The entry for the ‘Grid system’ parameter must be the grid system the input grid data layer is a part. Depending on the options selected, the input grid data layer could also be used for identifying a variable width buffer using the data values portraying the features. The output for the module is a grid data layer displaying the buffers created for the features on the input grid data layer. The default entry for the value field to the right of the ‘<<Buffer Grid’ label is “[create]”. This will create a new grid instead of overwriting an existing one. Two options are available on the Grid Buffer settings page. These are the ‘Distance’ and ‘Buffer Distance’ settings. The numeric entry for the ‘Distance’ parameter is a value in the grid data layer map units, i.e., feet, meters, etc. This value defines the buffer width if the “Fixed” choice is chosen for the ‘Buffer Distance’ parameter.

Page 94: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

77

The ‘Buffer Distance’ parameter has two choices: “Fixed” or “Cell Value”. The “Fixed” choice will use the number entered in the value field to the right of the ‘Distance’ label as the buffer width. The “Cell Value” choice allows for variable buffer widths. The “Cell Value” choice assumes that the ‘Features Grid’ grid data layer contains cell values that specify a buffer width in map units. For example, if the data value range for the ‘Features Grid’ is 150 through 300, the module will use the value stored in the grid cell to delineate buffer zones 150 to 300 map units around features, depending on the features grid cell values. This supports the delineation of variable width buffers. Example 1 A research group at a nearby university has been funded to identify and map areas in Mason County where sections of road are within 105 meters of water bodies. The Grid - Tools/Grid Buffer module will be used to delineate a 105-meter wide buffer around water bodies in the county. The grid data layer containing water bodies is named ‘MClakes’. The Grid – Calculus/Grid Calculator module can overlay the output grid data layer from the Grid Buffer module with the county transportation layer (‘Mcroads10’). The output from this overlay will contain data values unique for roads within buffer areas. The settings page for the Grid - Tools/Grid Buffer module used to create a 105-meter wide buffer around water bodies is displayed in Figure 3-15.

Figure 3-15. The Grid - Tools/Grid Buffer settings used to create buffers around water bodies.

The ‘MClakes’ grid data layer is chosen as the input grid data layer for the ‘>>Features Grid’. The need is to delineate a buffer with a fixed width of 105 meters. The width is entered in the ‘Distance’ parameter value field. The “Fixed” option is chosen for the ‘Buffer Distance’ parameter. The output grid data layer is renamed ‘MClakesBuffers’ and displayed on the right in Figure 3-16.

Page 95: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

78

Figure 3-16. The ‘MClakes’ layer (on the left) and the Grid Buffer output on the right.

The two map view windows in Figure 3-16 are showing zoomed in portions of the input ‘MClakes’ grid data layer (on the left) and the output grid data layer produced by the Grid - Tools/Grid Buffer module. The buffer around the water bodies is displayed in red. I will use the Grid Calculator to create a composite grid for the buffer grid layer for lakes and the roads data layer. Figure 3-17 displays the Grid Calculator parameter settings page settings for creating the composite of the two grid data layers before I click on the ‘Okay’ button.

Figure 3-17. The Grid Calculator parameter settings page.

The composite grid data layer (named ‘MCbuffersRoads’) created by the Grid Calculator contains six data values. The ‘MCRoads10’ grid data layer has two data classes: 0 for no roads and 10 for road. The ‘MClakesBuffers’ data layer contained three values: 0 for no lakes or buffers, 1 for buffer, and 2 for lakes. The data classes in the composite grid data layer are: 0 = No road, lake or buffer 1 = Lakes buffer

Page 96: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

79

2 = Lakes 10 = Roads 11 = Road in Buffer 12 = Road in lakes The data value ‘11’ identifies the cells where roads and lake buffers coincide. These are the cells the research group is interested. You might notice that the grid data value 12 represents roads and lakes but no buffer. Some of these cells are where bridges and causeways exist. Some might also indicate a data error in the roads mapping. I am going to use the Grid Calculator module to create a new grid layer containing only the cells having a data value of 11. Figure 3-18 displays the Grid Calculator parameter settings page that will create this new grid data layer.

Figure 3-18. The Grid Calculator parameter settings page for creating a new grid data layer.

The formula checks the combined lakes buffer and roads grid layer for the data value 11. All cells having the value 11 are retained in a new grid layer recoded with the value “1”. Figure 3-19, on the left shows this new grid data layer with the shapes data file for roads as an overlay. The roads are in white and the cells where the lakes buffer and a road coincide are in red. The right portion of this graphic is an enlargement of the area around Lake Cushman.

Page 97: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

80

Figure 3-19. The grid layer identifying road areas of interest.

The buffer/road grid cells identified for the research group are in red. They do not show up very well in the map view window on the left, but you can see in the enlarged map view window on the right, the red cells showing up adjacent to Lake Cushman. Example 2 The Grapeview Road Maintenance District is preparing the budget for next year. Management activities vary by surface type. The three surface types in the district are pavement, gravel, and dirt. Activities take place within ROW management zones. This zone is 120’ either side of paved roads, 90’ for gravel, and 60’ for dirt. Activities include planting vegetation, brush cutting, removal of “danger” trees, etc. They have requested a map of their district that displays the ROW widths for all district roads. A grid data layer exists, named ‘MFDrdsROW’, that contains all roads for the district. The data values identify the width of the zone on either side of the road, by road type. The data values are 60, 90, and 120. Roads with a ROW of 60 are coded with the data value 60, etc. This data layer is displayed in Figure 3-20. This data layer identifies the ROW widths but the actual widths are not depicted.

Page 98: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

81

Figure 3-20. Zoomed in area of the ‘MFDrdsROW’ grid data layer.

The Grid - Tools/Grid Buffer module will be used to create the road ROW map requested by the maintenance district. Figure 3-21 displays the settings page for creating the road ROW grid data layer.

Figure 3-21. Settings page for creating the road ROW grid data layer.

Page 99: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

82

The buffer created by this module does have variable width but there is no differentiation within the buffer cells for the ROW class. All buffer cells are coded with 1’s. I can use the Grid – Calculus/Grid Calculator to create an individual grid data layer for each ROW class. Then I can use the Grid – Tools/Grid Buffer module to create a buffer for each ROW class. The Grid Calculator can be used to recode the 1’s to 60’s, 90’s, and 120’s and then add them together into the same grid data layer for a final map. The final map is displayed in Figure 3-22.

Figure 3-22. The Grapeview Road Maintenance District ROW map.

Here is a summary of the process I used. Three new grid data layers were created, one for each road ROW class. Figure 3-23 displays the Grid Calculator settings used for creating the grid data layer containing the data for the 120’ ROW width road.

Page 100: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

83

Figure 3-23. The Grid Calculator settings for creating a new grid data layer containing the data for the 120’ ROW width road.

The equation checks for the value 120 on the input grid data layer (‘MFDrdsROW.sgrd’). If the value is found, it is output to the corresponding cell on the output grid data layer. If it is not found, a zero is stored in the cell on the output layer. This module was executed three times to create the three new layers: Rd60, Rd90, and Rd120. Next the Grid Buffer module was used. The Grid – Tools/Grid Buffer module was executed once with each new layer. The settings used for one of the three output layers are displayed in Figure 3-24.

Page 101: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

84

Figure 3-24. The Grid – Tools/Grid Buffer settings for the 60’ wide ROW buffer layer.

The ‘RD60’ layer is the input for the ‘>>Features Grid’ parameter. The data values for the road width in the input layer will be used to define the ROW width on the output grid data layer. The “Cell value” option for the ‘Buffer Distance’ parameter instructs the module to use those values. This module was executed three times to create three new layers: ROW60, ROW90, and ROW120. Thus, the ‘ROW60’ layer contains the buffer for dirt roads with a 60’ ROW; ‘ROW90 contains the buffer for gravel roads, etc. The output grid data layer contained the feature grid cells coded with 2’s and the buffer with 1’s. The Reclassify module was used to reclassify cells with both data values into the actual ROW width value. See the “Re-Classifying Grid Data Values” section in Chapter 2 for more information related to the Reclassify module. This resulted with three buffer layers, one for each ROW width. The data values on the layers represented the actual ROW width, i.e., 60, 90, or 120. A problem emerged in that the buffers had overlap between the three buffer layers. Figure 3-25 displays an example of this problem.

Page 102: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

85

Figure 3-25. Example of the buffer “overlap” problem.

This happens because the buffer command was applied on road segments. Where roads intersect or join at junctions, the buffers will overlap. The map view window in Figure 3-25 illustrates this problem. I used the Grid – Calculus/Grid Calculator to eliminate the overlaps and to add the three grid layers together to make a composite layer containing all three buffers. Figure 3-26 displays a zoomed in area of the map.

Page 103: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

86

Figure 3-26. A zoomed in portion of the Grapeview Road Maintenance District ROW map.

The zoomed in portion of the map allows you to see more detail. The line shapes data layer for the roads is overlain using red for the roads. The boundary for the district is the thin black line. The Grid – Tools/Grid Proximity Buffer Module The Grid – Tools/Grid Proximity Buffer module delineates a buffer from features using a ‘Buffer distance’ parameter value as the buffer width. Grid cells on the input ‘>>Source Grid’ containing valid data values are considered to be features. The buffer calculations only evaluate grid cells on the ‘>>Source Grid’ containing valid data values. Grid cells containing “no data” values are not features. The Grid Proximity Buffer module delineates a buffer around features on a ‘>>Source Grid’. The value entered for the ‘Buffer distance’ parameter defines the width of the buffer. A buffer will be delineated around isolated single feature grid cells, on either side of linear features, and around contiguous groups of grid cells on the ‘>>Source Grid’. The module outputs three grid data layers. The output layers include a ‘Distance Grid’, an ‘Allocation Grid’, and a ‘Buffer Grid’.

Page 104: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

87

Grid cells on the ‘Distance Grid’ output contain values representing the distance, in map units, the cell is from the nearest feature grid cell. The output value type for the ‘Distance Grid’ is floating-point. The ‘Buffer Grid’ is a reclassification of the ‘Distance Grid’ output using a user specified equidistance to create a set of discrete distance buffers from source features. The buffer zones are coded with the maximum distance value of the corresponding buffer interval. The output value type for the ‘Buffer Grid’ is integer. The third output for the module is called the ‘Allocation Grid’. In this case, the buffer grid cells contain data values using the feature data value they are closest. The output value type for the ‘Allocation Grid’ is integer. Example 1 Non-point source pollution is an issue in Mason County as well as in surrounding counties. One of the recently formed study groups has requested a table displaying acres by land use within 200’ either side of Mason County streams. The Grid – Tools/Grid Proximity Buffer module can be used to create this output. Figure 3-27 displays on the left the full extent view of the Mason County stream network. The right side displays a zoomed in area. The name of this grid layer is ‘MasonStrmGT6GR’.

Figure 3-27. The stream network for Mason County.

Figure 3-28 displays the grid data layer for general land use in Mason County, full extent display on left and a zoomed in area on the right. The name of this grid layer is ‘MasonGenLU’.

Page 105: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

88

Figure 3-28. The Mason County general land use grid data layer.

The ‘<<Buffer Grid’ output layer that is output from by the Grid – Tools/Grid Proximity Buffer module will be used for defining the 200’ stream buffer. The settings for the Grid – Tools/Grid Proximity Buffer module are displayed in Figure 3-29.

Figure 3-29. The Grid – Tools/Grid Proximity Buffer module settings page used to create the ‘<<Buffer Grid’ layer.

The input for the ‘>>Source Grid’ is the stream grid data layer (‘MasonStrmGT6GR’). I entered 200 for the value for the ‘Buffer distance’. The three output grid data layers are mandatory outputs. However, the only output I will use from this execution is the

Page 106: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

89

‘<<Buffer Grid’. After clicking the ‘Okay’ button, the module executes and outputs the layers. The ‘Buffer Grid’ output layer contains two data values: 200 and 0. The buffer cells are coded with “200” and the streams with “0”. I must change the zeroes to “200” values because I am going to use the buffer area, including the stream, as a zone. I will use the Grid – Tools/Reclassify Grid Values module to change the zeroes to “200”. See Chapter 2 for more information related to the Reclassify module. After reclassifying the zeroes I rename the output ‘Buffer Grid’ to ‘MasonStrmBuf’. Figure 3-30 displays a portion of the ‘MasonStrmBuf’ grid data layer.

Figure 3-30. The grid data layer containing 200’ buffers adjacent to streams.

The map view window in Figure 3-30 is an enlarged portion of the full extent map. The stream buffer is clearly visible. The line shapes data layer for streams has been overlain on the buffer. I now can create a table of acres of land use within the buffer. I will use the Geostatistics – Grids/Zonal Grid Statistics to create a table that identifies the number of grid cells for each land class within the buffer. Then I will use the Table – Calculus/Table Calculator to convert the number of cells to acres for each class. Figure 3-31 displays the settings I use with the Geostatistics – Grids/Zonal Grid Statistics module. Using the ‘MasonStrmBuf’ and ‘MasonGenLU’ layers as input, this module outputs a ‘Zonal Statistics’ table that contains the number of cells for each of the land use classes within the buffer. The ‘MasonStrmBuf’ layer is chosen for the ‘>>Zone Grid’ parameter and the ‘MasonGenLU’ layer for the ‘Categorical Grids’ parameter. These settings will create Unique Condition Units (UCU) for both grids. The output table will report the statistics for each combination of ‘MasonStrmBuf’ and ‘MasonGenLU’ categories.

Page 107: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

90

Figure 3-31. The settings I used with the Geostatistics – Grids/Zonal Grid Statistics module.

The output ‘Zonal Statistics’ is displayed on the left in Figure 3-32. On the right is the same table with two additional columns added. The “LU Class” column was added and provides the text names for the data values (i.e., land use classes) on the ‘MasonGenLU’ layer. The “Acres” column was generated using the Table – Calculus/Table Calculator module. In the Table Calculator module, the table fields or columns are referred to by an alpha representation of their position going from left to right. The first column is referred to by “a”, the second by “b”, etc. Thus, based on the original table displayed on the left, the equation “c/5.3777” was used to calculate acres. The values in the “Count” column represent the number of grid cells for that category. It takes 5.3777 grid cells to make an acre. The equation says to divide the value in column “c” (the ‘Count’ column) by the value 5.3777. The output from the equation was placed in a new table column named “Acres”.

Page 108: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

91

Figure 3-32. The ‘Zonal Statistics’ table listing acres by land use within the streams 200’ buffer.

Example 2 A coalition of environmental groups is taking steps to become familiar with the commercial timber industry in Mason County. One of their first steps is to get a perspective on relative environmental impacts resulting from timber harvesting. A study group met and developed a preliminary table identifying relative environmental impacts from timber harvesting using distance from road and slope factors. Figure 3-33 displays a table they created.

Figure 3-33. Relative environmental impacts due to timber harvesting.

Distance zones are in feet from a gravel or dirt road. Slope classes are in degrees. The single integer values reflect a relative environmental impact with 1 being lowest level of impact and 8 highest. The study group considered many factors in determining these relative values. These factors included soils, hydrology, wildlife, and slope stability. Activities associated with timber harvest included mechanized harvesting, cable yarding, skyline, road construction, and landings. The study group would like two tables to review. One table would identify how many acres in the forestry land use class for the county are in each distance zone by slope class. The second table should show for each distance zone the number of acres in each impact category. Grid data layers exist in a SAGA dataset for land use and slopes in Mason County. The grid system uses a 90’ cell size that should work all right for this preliminary exploration.

Page 109: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

92

The name of the county land use grid data layer is ‘MasonGenLU’. The slope gradient map is ‘MasonSlpDeg’. I will create a layer that contains only the forestry land use category. The slope gradient data can be recoded into the four slope classes to match their criteria. A line shapes data layer exists for roads (‘MasonTrans’). This layer includes paved, gravel, and dirt roads in the county. I can use a query with the shapes layer to create a new grid data layer containing only gravel and dirt roads. This layer can be used with the forestry land use layer to identify those roads within the forestry land use. The Grid – Calculator/Grid Calculus module will create a grid data layer that only contains the forestry land use. The data value on the ‘MasonGenLU’ layer used for the forestry land use is “9”. Figure 3-34 displays the settings I used with the Grid – Calculator/Grid Calculus module to create this new layer.

Figure 3-34. The Grid – Calculator/Grid Calculus module settings used to create a forestry land use layer.

The ‘MasonGenLU’ grid data layer is chosen as the input for the ‘>>Grids’ parameter. The formula “ifelse(eq(a,9),9,0)” checks cell values on the input layer to see if they equal the forestry land use class value of 9. If they do, a 9 is saved to the corresponding cell on the output grid data layer; if not true, then a 0 is saved. The grid data layer output is displayed in Figure 3-35.

Page 110: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

93

Figure 3-35. The forest land use map for Mason County.

The red areas in the map displayed in Figure 3-35 are the areas of forest land use. This output layer has been renamed ‘MasonForestLU’. The ‘MasonSlpDeg’ data layer contains continuous data for slope gradient. I will use the Grid – Tools/Reclassify Grid Values module to create an output grid data layer containing four slope classes: 0° to 9°, 9° to 22.5°, 22.5° to 36°, and greater than 36°. I select the “simple table” option and build the table displayed in Figure 3-36.

Figure 3-36. The slope gradient reclassify table.

Page 111: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

94

Notice the values that will be used for the four classes are 1 through 4. The settings for the Reclassify Grid Values module to create the new slope class grid data layer are displayed in Figure 3-37.

Figure 3-37. The Grid – Tools/Reclassify Grid Values module settings for the new slope class grid data layer.

The output grid data layer was renamed ‘MasonSlpClasses’. It is displayed in Figure 3-38.

Page 112: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

95

Figure 3-38. The ‘MasonSlpClasses’ grid data layer.

The attribute table linked to the ‘MasonTrans’ line shapes data layer identifies road surface in the “SURF” attribute with a text string. The Shapes – Tools/Search in attributes table module supports text searching. It will take two executions of the module, one to search for the text “DIRT” and a second one searching for “GRAVEL”. The results of the second search will be appended to the results of the first search. At the same time the records meeting the search in the attribute table are highlighted, the corresponding objects in the layer are also selected and highlighted in the map view window. Once the two road types are selected I will use the Shapes – Tools/New layer from selected shapes module to create a new line shapes data layer. When the layer exists I can convert it from its vector format to raster or grid. The Shapes – Tools/Search in attributes table module was executed twice. The first time to find all the roads that were “DIRT” and the second time those that are “GRAVEL”. The first time I set the ‘Method’ parameter to “New selection” (see Figure 3-39).

Page 113: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

96

Figure 3-39. The ‘Query builder for shapes’ settings for the first execution of the module.

For the second execution I changed the ‘Method’ parameter and chose “Add to current selection”. This means the results of the first execution are not lost and the results of the two executions are combined together.

Figure 3-40. A portion of the ‘MasonTrans’ attribute table on the left and the selected roads on the right.

The grayed records in the attribute table in the figure (Figure 3-40) are for roads meeting the two queries. This is a small portion of the larger table but you can see that the selected records have “GRAVEL” or “DIRT” for the “SURF” field. The display of the roads shapes data layer on the right displays selected roads in red and non-selected roads in green. The Shapes – Tools/New layer from selected shapes module is used to create a new line shapes data layer containing only the selected roads on the ‘MasonTrans’ layer. I rename the new layer output from the Shapes – Tools/New layer from selected shapes module ‘MasonDirtGraRds’. The vector to raster conversion of this layer to a new grid

Page 114: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

97

data layer (to be named ‘MasonDirtGraRdsGr’) is done with the Grid – Gridding/Shapes to Grid module. A new grid data layer is needed that contains only those roads that are within the forest land use areas. The Grid – Calculus/Grid Calculator is used to create this new layer. The two input layers were ‘MasonForestLU’ (first in the list) and ‘MasonDirtGraRdsGr’ (second in the list). The equation used for the ‘Formula’ parameter was “ifelse(eq(a,9),b,0)”. The data value used on the ‘MasonForestLU’ grid data layer for forest land use is “9”. I rename the output ‘MasonForRds’. The Grid – Tools/Grid Proximity Buffer module is used to create a buffer 6000’ wide around all dirt and gravel roads that are in forest land use areas. Although the module outputs by default three buffer related grid layers, the only one I am interested in is the ‘Distance Grid’. This is the one where the data values stored in the grid cells are the distances the cells are from the nearest cell on the ‘Source Grid’. Figure 3-41 displays the settings page for the execution of the Grid – Tools/Grid Proximity Buffer module.

Figure 3-41. The Grid – Tools/Grid Proximity Buffer module settings page.

The buffer area produced by these settings overlaps into land use areas outside of the forestry land use class. Before I use the Grid – Tools/Reclassify Grid Values module to reclassify the ‘Distance Grid’ into the distance zones, I need to create a new grid data layer with buffer areas outside of the forestry land use erased. I used the Grid – Calculus/Grid Calculator module for this task. Now I can apply the Grid – Tools/Reclassify Grid Values module to produce a layer containing the needed distance zones.

Page 115: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

98

The “simple” table used to recode the ‘Distance Grid’ is displayed in Figure 3-42.

Figure 3-42. The “simple” table used to produce the distance zone grid data layer.

The “simple” table method is used to reclassify the continuous data of the ‘Distance Grid’ grid data layer into five distance zones. I rename the output ‘MasonForRdDist’. I use the Geostatistics – Grids/Zonal Grid Statistics module to produce a table showing the area for each slope class within the distance zones. In the ‘Zone Grid Statistics’ settings window, I enter the grid data layer ‘MasonForRdDist’ for the ‘>>Zone Grid’ parameter. The ‘MasonSlpClasses’ grid data layer is chosen for the ‘>Categorical Grids’ parameter. The area for each of the four categories on the ‘MasonSlpClasses’ within each distance zone on the ‘MasonForRdDist’ layer will be calculated and output in a ‘Zonal Statistics’ table.

Page 116: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

99

Figure 3-43. The output ‘Zonal Statistics [c/5.3777]’.

The output ‘Zonal Statistics [c/5.3777]’ table is displayed in Figure 3-43. The “Acres” column was added to the table using the Table – Calculus/Table Calculator module. The equation used in the Table – Calculus/Table Calculator to create the “Acres” column was “c/5.3777”. The fields or columns are referred to by an alpha representation of their position going from left to right. The first column is referred to by ‘a’, the second by ‘b’, etc. Thus, this formula says to create a new field or column by dividing the value in column ‘c’ (the ‘Count’ column) by the value 5.3777. The ‘Count’ column identifies the number of grid cells for that land use class in the buffer. It takes 5.3777 cells to make an acre. It is more convenient to save the ‘Zonal Statistics’ table as a dBase file, open it with an older version of Excel spreadsheet (a version prior to Office 2007 as newer versions no longer support importing dBase files), and develop the two tables asked for by the study group. Alternatives to Excel exist, for example, Open Office Calc. Figure 3-44 displays the table for acres by distance zone by slope class and Figure 3-45 the acres by relative environmental impact categories.

Page 117: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

100

Figure 3-44. Acres by distance zone by slope class.

Figure 3-45. Acres by relative environmental impact categories.

After reviewing the results, the study group has identified some weaknesses in their impact weighting scheme. They decide to continue using this approach and take advantage of the GIS tools SAGA provides. The Grid – Tools/Threshold Buffer Module The SAGA Grid – Tools/Threshold Buffer module is used to delineate land areas contiguous to point, linear features, or polygon boundaries based on decision criteria applied to descriptive values.

Figure 3-46. Settings page for module Threshold Buffer.

Page 118: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

101

The ‘>>Features Grid’ cell data values should be categorical data for point, line, or polygon features that will serve as the buffer location source. The grid data layer for module input must be part of the grid system chosen for the ‘Grid system’ parameter. This is the case for all of the mandatory and optional input grid data layer parameters for this module. The grid data layer chosen for the ‘>>Value Grid’ parameter provides numeric values that can be used as a buffer attribute decision criteria depending on the options selected. An optional ‘>Threshold Grid’ grid data layer can be chosen as an alternative to using the ‘Threshold’ settings parameter. This optional layer provides threshold numeric values that will be applied as criteria in combination with the ‘Value Grid’. If you use the ‘>Threshold Grid’ parameter, any value entered in the value field to the right of the ‘Threshold’ option will be ignored. If you use the default entry, “[not set]” for the ‘>Threshold Grid’, this parameter will be ignored and the value in the value field for the option ‘Threshold’ will be used. The Grid – Tools/Threshold Buffer module grid output will contain numeric data values, in contiguous grid cells, meeting the threshold approach selected. There are two inter-related options available on the Threshold Buffer settings page. They are the ‘Threshold’ and ‘Threshold Type’ settings. Threshold and Threshold Type The ‘Threshold’ parameter is for entering a number that represents a threshold criterion. When you are using a ‘>>Value Grid’ as the source for criteria values, and the ‘Threshold Type’ option is “Absolute”, the number you enter for the ‘Threshold’ parameter will be applied as a “less than” criteria value. Starting from a feature cell on the ‘Feature Grid’, the module will check adjacent cells on the ‘>>Value Grid’ to see if they have numeric values less than the ‘Threshold’ parameter. If the value meets the test, the cell is identified as a buffer cell. If there are contiguous cells that meet the test, the buffer expands. Once no contiguous cells meet the test, the buffer expansion stops. Note that contiguous means side-to-side or diagonal contact. When you are using a ‘>>Value Grid’ to provide the criteria values, and the ‘Threshold Type’ option is “Relative to cell value”, the number you enter for the ‘Threshold’ parameter will be used to define a numeric range of acceptable values based on ‘>>Value Grid’ values relative to the value on the ‘>>Value Grid’ for the corresponding ‘Feature Grid’ cell. As an example, a ‘Feature Grid’ cell has a value of 5 and the corresponding cell value on the ‘>>Value Grid’ has a value of 20 and the ‘Threshold’ entry is 6. If an adjacent ‘>>Value Grid’ cell has a value of 19 it will be identified as a buffer cell. This is because the acceptance range, based on the ‘Threshold’ entry of 6, is for ‘>>Value Grid’ cell values from 14 through 26. The ‘>>Feature Grid’ cell corresponding to the ‘Value Grid’ cell value plus or minus 6 defines the acceptance range. The range is not based on the

Page 119: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

102

numeric value stored on the ‘>>Feature Grid’. If the ‘Value Grid’ cell had a value of 27 or 13, the test would fail and the cell would not be a buffer cell. The initial identified buffer cell will in turn spawn the same test to be applied for grid cells adjacent or contiguous to it. The buffer will expand until no contiguous cells meet the test. Example 1 This example involves grid data layers for the Lake Cushman, Washington area. It is a relatively small area in the Olympic Mountains on the Olympic Peninsula. The goal is to delineate a buffer area adjacent to the streams. The buffer will be based on slopes less than 10 degrees. The numeric value 10 will be entered for the ‘Threshold’ parameter and the ‘Threshold Type’ option of “Absolute” will be selected.

Figure 3-47. Settings for the Threshold Buffer module for the first example.

The settings page in Figure 3-47 shows that the streams data layer (‘LCchannelnet’) is chosen as the ‘>>Features Grid’ and the slopes layer (‘LCslopeDEG’) as the ‘>>Values Grid’. The ‘>Threshold Grid’ is not used. The ‘Threshold’ parameter value “10” will serve as a “less than” criteria and is applied to the ‘LCslopeDEG’ grid data layer chosen as the ‘>>Value Grid’.

Page 120: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

103

Figure 3-48. Module output on the left and less than 10 degree slope map on the right.

The threshold buffer output, on the left in Figure 3-48, displays the area meeting the buffer criteria in red. The streams show up in black. The map on the right displays less than 10 degree slopes in red. The narrow black line is the line shapes data layer for streams overlain. Comparing the two maps, you can see that areas of less than 10 degree slopes that were not adjacent to streams, do not show up on the buffer output. Also, it would appear that the stream area not adjacent to less than 10 degree slopes might be in a slightly steep sided valley. The DEM for this area verifies that this is the physical situation.

Figure 3-49. Threshold Buffer module output for Example 1.

Figure 3-49 displays, on the left, the output from execution of the Threshold Buffer. In addition, the slopes grid data layer, ‘LCslopeDEG’, is displayed on the right. The same zoomed in area is showing for each so that the actual grid cell data values can be viewed.

Page 121: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

104

Discussion The ‘Buffer Grid’ output on the left (Figure 3-49) displays grid cells with values of 0 (gray), 1 (red), or 2 (black). Cells with a value of 2 identify features from the ‘Features Grid’ data layer. The data value 2 is used regardless of what data value the features are coded with on the grid data layer being used for the ‘Features Grid’. Cells with a value of 1 are cells meeting the threshold criterion for being a buffer. The cells with 0’s did not meet the criteria. Slopes, in degrees, are the data values for the data layer on the right in Figure 3-49. You can see on the ‘Buffer Grid’ that five cells have been identified as meeting the buffer criteria. Looking at the slope values for the five cells, you see that the numeric values for slope are less than 10. The block of four buffer cells in the center in the graphic on the left, have slope values of 7.81, 9.46, .61, and 1.60. The cell touching the upper left corner of the block of four, has a slope value of 6.31. The buffer could not expand beyond these five cells because all of the contiguous cells contained slope values of greater than 10. Example 2 This example uses the streams data layer (‘LCchannelnet’) as the ‘>>Features Grid’ and the elevation layer (‘LCdem30’) as the ‘>>Values Grid’. The ‘>Threshold Grid’ is not used. The objective is to produce a map showing areas contiguous to streams that differ by less than 5 feet in elevation from adjacent grid cells. Thus, the buffer will include contiguous cells with elevation differences less than 5 feet. The buffer ends when an elevation difference of greater than 5 feet is contiguous. The numeric value 5 will be entered for the ‘Threshold’ parameter; the ‘Threshold Type’ option of “Relative to cell value” will be selected. A second execution of the module will use the same parameters except the ‘Threshold’ parameter will be changed to 10. This will allow a comparison of the two outputs.

Page 122: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

105

Figure 3-50. Settings for the Threshold Buffer module using the “Relative from cell value” option.

The ‘LCchannelnet’ grid data layer contains stream features and is selected for the ‘>>Features Grid’ input parameter. Elevations are contained on the ‘LCdem30’ grid. It is selected for the ‘>>Value Grid’. The output ‘<<Buffer Grid’ is using the default “[create]”. As noted above, the ‘Threshold’ option is using a 5, representing 5 feet. The ‘Threshold Type’ is set to “Relative from cell value”.

Page 123: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

106

Figure 3-51. Comparing the module ‘Buffer Grid’ output with the module input for the ‘Values Grid’ parameter.

Output from the first execution of Threshold Buffer using a ‘Threshold’ parameter of 5 is displayed in the upper left of Figure 3-51. Output from a second execution of the module, using a ‘Threshold’ parameter of 10, is displayed in the upper right of the figure. The map at the bottom of the figure is the elevation data for the output area. Discussion Figure 3-52 displays the same zoomed in area on all three of the grid data layers in Figure 3-51.

Page 124: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

107

Figure 3-52. A zoomed in view of the two ‘Buffer Grids’ and the DEM grid data layer.

This discussion will focus on the ‘Buffer Grid’ output showing the block of three buffer cells (on the left above) and the block of four on the right. You can see that the elevation values (on the ‘LCdem30’ layer at the bottom) for the three feature cells (these are the cells with the ‘2’ values on the two ‘Buffer Grid’ outputs) are 3850, 3920, and 3958. The ‘Threshold’ parameter for the graphic on the upper left is 5 (feet) and the ‘Threshold Type’ is “Relative to cell value”. This means that the buffer will “grow” if contiguous cells on the ‘Values Grid’ have data values ranging between 3845 and 3855 for the cell with a value of 3850; 3915 and 3925 for the cell with a value of 3920; and 3953 and 3963 for the cell with a value of 3958. The cells immediately above these three feature cells have data values of 3849, 3924, and 3952. The first and second cells meet the criteria, the third does not since it has an elevation below the criteria range. Notice that the buffer cell at the upper left, with an elevation value of 3923 has been identified as a buffer cell. The value is 3923 and does not meet the range criteria based on the buffer cell below it but it does meet the criterion based on the buffer cell it is contiguous on the diagonal. The upper right ‘Buffer Grid’ displays the output after I changed the ‘Threshold’ parameter to 10. You can see that a fourth cell now meets the buffer criterion. When the

Page 125: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

108

‘Threshold’ was 5, this cell was not identified as a buffer cell. As noted earlier, its value of 3952 was below the criterion. However, changing the criteria to 10 means that values between 3948 and 3968 would meet the buffer criteria (compared to the 5’ criteria values of 3953 and 3963). Example 3 This is an example using a threshold grid. The objective is to identify areas that could be affected by predicted flood levels. The threshold grid contains numeric data for streams that identifies a potential flood level. For example, a ‘3’ will indicate a potential for being 3 feet higher during a predicted “flood”.

Figure 3-53. Settings for the Threshold Buffer module using an input ‘>Threshold Grid’ and the “Relative from cell value” option.

The stream network for the Lake Cushman area is chosen for the ‘>>Features Grid’. The DEM for the area will provide the elevations. The ‘LCchannelnet’ grid data layer identifies both features (by their location, not by data value) and their flood stage values. Because a grid data layer has been chosen for the ‘>Threshold Grid’ parameter, the ‘Threshold’ parameter will not be used for this execution.

Page 126: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

109

Figure 3-54. A zoomed in areas of the ‘LCchannelnet’ layer (upper left), the output ‘Buffer’ layer (upper right), and the ‘Value grid’ DEM layer.

Output from the execution of the Threshold Buffer using a ‘Threshold grid’ and a ‘Threshold type’ of “Relative from cell value” is displayed in the upper right in Figure 3-54. We can see the values for the zoomed in portions of the three grid data layers in Figure 3-54. The threshold grid displays the data value ‘3’ for a flood stage potential for the seven cells of the stream visible. The buffer grid shows that three cells adjacent to the stream will flood. The “Relative from cell value” option sets an elevation range that serves as the “flood” cell criteria. In this case, we are dealing with a single data value, 3. The elevations for the seven stream cells are 1546, 1554, 1559, 1536, 1514, 1508, and 1481 going from left to right. Based on a plus or minus 3 range for each of these elevations, we see that the range criteria for each cell, from left to right, is 1543-1549, 1551-1557, 1556-1562, 1533-1540, 1511-1517, 1505-1511, and 1378-1484. This means that any cell, adjacent to any of the stream cells, that have an elevation within the range criteria for the stream cell, will be identified as a “flood” cell.

Page 127: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

110

The third cell from the left, having an elevation value of 1559, is adjacent to cells that meet the range criteria, having elevation values of 1559 and 1561. The third river cell from the right, having an elevation value of 1514, is adjacent to a cell within the range criteria. The cell has an elevation value of 1513. The range criteria are also applied to cells adjacent to the ones meeting the river cell elevation range criteria. There are no contiguous cells to the “flood” cells that meet the range criteria, therefore, the “flood” area does not expand.

Page 128: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

111

Chapter 4 – Creating Data Layers from DEMs in SAGA Introduction This chapter is made up of three sections. The sections are listed below along with the names of any modules used in that section.

Creating Slope and Aspect Maps from a DEM Terrain Analysis – Morphometry/Local Morphometry Grid – Calculus/Grid Calculator Developing Terrain From Grid Data Layers Terrain Analysis – Morphometry/Surface Specific Points Grid – Calculus/Grid Calculator Creating Contour Shapes Data Layers Shapes – Grid/Contour Lines from Grid

Creating Slope and Aspect Maps From a DEM The SAGA Terrain Analysis - Morphometry/Local Morphometry module can be used for creating slope and aspect grid data layers using an input digital elevation model grid data layer. When I choose the Local Morphometry module, the parameter settings page in Figure 4-1 appears.

Figure 4-1. The Local Morphometry module parameters page.

The entry for the ‘Grid system’ parameter must be the grid system the input grid data layer for the ‘>>Elevation’ parameter is a part. In order to be chosen, the grid system must be loaded in the current work session. When you click with the mouse pointer in the

Page 129: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

112

value field to the right of the ‘Grid system’ parameter, a list of loaded grid systems for the current work session displays. Moving the mouse pointer over a list entry highlights the entry. Clicking the mouse button while the entry is highlighted chooses the grid system. The default for this parameter is “[not set]”. As you can tell by the familiar ‘>>’ symbols, only one input is needed and it should be an elevation grid data layer. When I click in the value field to the right of the ‘>>Elevation’ parameter, a small triangle appears followed by a pop-up list of loaded grid data layers for the grid system chosen for the ‘Grid system’ parameter. I choose the DEM grid data layer ‘MCdem30’ that contains elevations. If the DEM grid data layer had not been loaded, the Grid: Load Grid command in the Menu Bar ‘File’ drop down menu can be used to load it. The rest of this parameter section lists a set of output grid data layers that can be created from the DEM grid data layer. The first two in the list are ‘Slope’ and ‘Aspect’. They are mandatory outputs. You can see that in the value fields to the right of these labels the default entry is “[create]”. I will leave the defaults as the entries. The last three outputs in the list are set to the default “[not set]”. Whether these are chosen for output depends on whether further terrain analysis is planned that requires them as input. I will require them later so I am going to change the default entry from “[not set]” to “[create]”. In the ‘Options’ section, the ‘Method’ parameter allows me to choose a method from a pop-up list of seven for performing the morphometric analysis. Note that the method chosen will affect slope and aspect calculations as well as the three curvature outputs: curvature, plan curvature, and profile curvature. The seven methods are: Maximum Slope (Travis et al. 1975) Maximum Triangle Slope (Tarboton 1997) Least Squares Fit Plane (Costa-Cabral & Burgess 1996) Fit 2.Degree Polynom (Bauer, Rohdenburg, Bork 1985) Fit 2.Degree Polynom (Heerdegen & Beran 1982) Fit 2.Degree Polynom (Zevenbergen & Thorne 1987) Fit 3.Degree Polynom (Haralick 1983) SAGA defaults to “Fit 2.Degree Polynom (Zevenbergen & Thorne 1987)”. The first two approaches relate to flow routing algorithms as well as morphometrical analysis. Since their emphasis is on flow routing, they do not generate local morphometry using a bi-dimensional function and may be less suitable for calculating curvature outputs (curvature, plan curvature, and profile curvature). The “Maximum Slope” method, for example, calculates slope and aspect to the lowest neighboring cell to which the steepest

Page 130: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

113

gradient is detected. This equals the single-flow direction method D8 and should be used to calculate channel slope. I will use the default method for calculating slope and aspect. Figure 4-2 shows the parameter settings I will use.

Figure 4-2. The parameter settings page for creating Slope and Aspect grid data layers with the Local Morphometry module.

I execute the module by clicking the ‘Okay’ button. The output grid data layers will be named with default data layer names: Slope, Aspect, Curvature, Plan Curvature, and Profile Curvature. When I click on the ‘Data’ tab at the bottom of the Workspace window, I see the new data layers at the bottom of the list of grid data layers for the grid system. The new data layers will display as thumbnails when I click on the ‘Thumbnails’ tab beneath the ‘Data’ tab. I need to take a close look at the data. I open the map view windows for the slope and aspect grid data layers by double-clicking on their names in the list. I follow the SAGA process for creating map view windows for the layers. Figure 4-3 displays these two windows.

Page 131: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

114

Figure 4-3. Slope and Aspect grid data layers created with the Local Morphometry module.

I highlight and make active the ‘Slope’ grid data by clicking on the layer name in the ‘Data’ tab area list in the Workspace window. When I move the mouse pointer across the ‘Slope’ map view window, the grid cell slope values are displayed along the bottom of the application window in the “Z” field. I do the same cursory data value check for the ‘Aspect’ grid data layer; first highlighting the ‘Aspect’ grid data layer name in the ‘Data’ list. The range of values for each data layer appears correct. It is important to make sure that the grid data layer name you want to view data values for is the one you make active because, regardless of which grid data layer is displayed in a map view, the one active in the ‘Data’ tab area list is the one whose data values will be displayed in the “Z” field. Reviewing the histograms for each grid data layer is another check. How to create a histogram is explained in Volume 1, Chapter 4.

Figure 4-4. Reviewing the data histograms for the ‘Slope’ and ‘Aspect’ grid data layers.

The histograms look okay. The value range for slope is from 0 to 67.055 and aspect from 0 to 360. When I check the tabular values for the histograms (by converting the graphic histogram to a table using the Menu Bar Histogram ‘Convert To Table’ command) for the range of data values for each of the layers, however, the values are not in the same range

Page 132: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

115

as the values displayed in the grid data layer view windows or in their graphic histograms (see Figure 4-5).

Figure 4-5. Reviewing the data tables for the ‘Slope’ and ‘Aspect’ grid data layers.

The data value range for the tabular display of slope data is from 0 to 1.170338 and for aspect from 0 to 6.285185. I now check the parameter settings pages for the two layers. Making sure the ‘Object Properties’ window is displayed and the ‘Settings’ tab area showing, I click on the grid data layer name for one of the layers in the ‘Data’ tab area list of grid data layers. The parameters for the layer are displayed in the ‘Object Properties’ window. I do the same for the second data layer. The upper portion of the parameter settings pages for the two grid data layers is displayed in Figure 4-6. Toward the top of the ‘Parameters’ page, in the ‘General’ section, is a parameter called ‘Z-Factor’. I can see, for both data layers, the value field to the right of the ‘Z-Factor’ contains “57.2958” as an entry.

Figure 4-6. The Z-Factor parameters for the new Slope and Aspect grid data layers.

The actual data stored for these two data layers is radians and not degrees as displayed in the view windows. The values I see displayed when I move the mouse pointer across the grid cells are the data values in the grid cells (radians) multiplied by the Z-Factor 57.2958; the conversion factor for converting radians to angular degree value. This means that the actual grid cell data values are in radians and not in degrees.

Page 133: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

116

I believe there will be times when some of the spatial analysis tasks I am interested will require radian input for slope and/or aspect and other times when slope and/or aspect will be required in degrees. Therefore, I am going to save versions of both, i.e., radians and degrees. First, I will save the new data layers with their radian data. I edit the ‘Name’ parameter in the ‘Object Properties’ for each of the two grid data layers. I name the slope grid data layer ‘MC1SlopeRAD’ and the ‘Aspect’ grid data layer ‘MC1AspectRAD’. Now I save the two grid data layers. Up until now, they have been temporary, un-saved working files. I right-click with the mouse on the ‘MC1SlopeRAD’ data layer name in the ‘Data’ tab area of the Workspace window. When the pop-up list of options appears, I click on ‘Save Grid As …’. When the ‘Save Grid’ dialog window appears I browse to the folder where I am saving data layers. I enter the same name I used in the ‘Object Properties’ window (‘MC1SlopeRAD’) and click the ‘Save’ button. I use the same naming approach for the ‘Aspect’ grid data layer. I am going to use the Grid-Calculus/Grid Calculator module to convert the slope and aspect values stored in the grid data layers from radians to degrees. I choose the Grid Calculator module. The ‘Grid Calculator’ settings page (Figure 4-7) displays.

Figure 4-7. The initial Grid Calculator settings page.

When I click in the value field to the right of the ‘Grid system’ label, a small triangle appears in the field and a pop-up list of grid systems loaded in this work session displays. I choose the grid system that the slope and aspect grid data layers are a part. Clicking in the value field to the right of the ‘>>Grids’ label causes an ellipsis symbol to appear in the field. When I click on the ellipsis symbol, a pop-up list of grid data layers available for the chosen grid system displays. On the list, I choose the ‘MC1slopeRAD’ grid data layer. In the formula value field, this data layer will be referred to as “a” since it is the first grid data layer in the list (as well as the only one). In the formula data field I

Page 134: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

117

enter the equation “a*57.2958” (the value could also be highlighted and copied with CTRL-C from the settings tab area of the ‘Object Properties’ for the layer and pasted here with CTRL-V). This means that each of the grid cell values in the grid data layer will be multiplied by the value “57.2958” with the result being stored in the corresponding cell of the new output grid data layer.

Figure 4-8. The Grid Calculator settings page with a formula for converting Radians to Degrees.

Figure 4-8 shows the settings page before I click the ‘Okay’ button. SAGA names the new data layer using the equation entered for the ‘Formula’ parameter ‘a*57.2958’ by default. I use the re-naming process described earlier to enter a name that includes the text “DEG”. I now have two slope maps; one with data in radians and one with values in degrees (which, of course, has to be saved to disk storage). I follow the same procedures for creating an aspect data layer in degrees. Before exiting this work session, I go through a renaming process for the other three grid data layers created by the Local Morphometry module. Developing Terrain Form Grid Data Layers The module Terrain Analysis - Morphometry /Surface Specific Points can be used to produce a landform grid data layer. The landform of a specific cell is based on its elevation and/or slope compared to the elevation and/or slope of the 8 adjacent cells, and depending on the computation method chosen. When I execute this module, the ‘Surface Specific Points’ settings page displays (Figure 4-9).

Page 135: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

118

Figure 4-9. The parameter settings page for the Surface Specific Points module.

I choose an entry for ‘Grid system’ by clicking with the mouse pointer in the value field to the right of the ‘Grid system’ parameter. A list of grid systems loaded for the work session displays. I choose the grid system that the DEM grid data layer (‘MCdem30’) is a part. This is the DEM that will be chosen as input for the ‘>>Elevation’ parameter. A single input is required for elevation. I click in the value field to the right of the ‘>>Elevation’ parameter and a small triangle appears in the field along with a pop-up list of loaded grid data layers for the grid system. I choose the ‘MCdem30’ DEM grid data layer from the list. By default, the module output, the ‘<<Result’ parameter value field, is set to “[create]”. Most of the time you will use the default entry. However, you can choose an existing grid data layer that is part of the grid system chosen for the ‘Grid System’ parameter. If you do this, the content of the chosen grid data layer will be overwritten with the output from this module. When you click the mouse pointer in the value field, a small triangle will appear on the right side along with a pop-up list of loaded grid data layers. Clicking on one of the layers in the list will choose the layer and enter its’ name in the value field. You would only choose a grid data layer from the list if you desired its’ content to be overwritten by the output from this module. The ‘Options’ section on the module settings page has one parameter: Method. There are four choices available for ‘Method’. Clicking in the value field displays a drop-down menu with the four choices: ‘Mark Highest Neighbour’, ‘Opposite Neighbours’, ‘Flow Direction’, ‘Flow Direction (up and down)’and ‘Peucker & Douglas’. The Peucker and Douglas method is a very sophisticated approach for identifying landforms and I choose this option.

Page 136: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

119

This method considers the slope gradients to all lower and higher neighbors for the cell being processed. For example, if all the surrounding neighbor cells have higher elevations than the cell being processed, the cell is determined to be a pit. Vice versa, if all the surrounding cells are lower in elevation, then the cell being processed is a peak. If half of the surrounding cells are lower in elevation and half are higher in elevation, then the cell being processed is on a hill-slope. The cell being processed is identified as a ridge cell if only one of the neighboring cells is higher, and, conversely, a channel when only one neighbor cell is lower. When slope gradients are considered, a hill-slope cell can be further characterized between a convex or concave hill-slope position. The differentiation to plan hill-slopes is performed by using a threshold. Saddles can be delineated based on the number of changes between the lower and higher neighboring cells. The output terrain forms grid data layer will contain the following values: Peak 9 Ridge 7 Convex Hill-Slope 2 Saddle 1 Plan Hill-Slope 0 Concave Hill-Slope -2 Channel -7 Pit -9 The default threshold to distinguish plan from convex/concave hill-slope positions is “2”. I will use this value. Once I have my settings entered, I click on the ‘Okay’ button and the module executes and produces the output grid data layer of landforms.

Page 137: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

120

Figure 4-10. The terrain form grid data layer.

The default name for the output grid data layer is ‘Result’. I re-name the output grid data layer ‘MC1AllTer’. The terrain form grid data layer that results (Figure 4-10) appears visually complex. One approach that might make it a little easier to interpret is to create an individual grid data layer for each of the seven landforms. I am going to use the Grid - Calculus/Grid Calculator module to create these separate landform grid data layers. I will use the “ifelse” function to create individual grid data layers for the landform classes. As noted above, the terrain form grid data layer has 7 categories of terrain forms coded 9, -9, 1, 2, -2, 7, and -7. The basic equation I will use to create each individual terrain form grid data layer is: Ifelse(eq(a,n),a,0) Here is the interpretation of this formula. The input layer is “a”. As you will see below, there will be only one input layer. In the equation, this single input layer will be referred to as “a”. The logical condition being evaluated is for equality. In the formula the logical condition is ”eq”.

Page 138: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

121

The equal condition being checked is the data value of the grid cell in layer “a” compared to the number ”n”. If the value for the cell on the input layer is equal to the value ”n”, ”n” representing a data value, then the condition is true. This is represented by ”(a,n)”. If the condition is true, then put the cell data value for layer ”a” in the corresponding cell in the output layer. If the condition is false, i.e., the value for the cell does not equal the value for ”n”, then enter a ”0” in the corresponding cell in the output layer. These actions are represented by ”a,0” in the “ifelse” function. To start, I choose the Grid - Calculus/Grid Calculator module. The module parameter settings page is displayed (Figure 4-11).

Figure 4-11. The Grid Calculator module parameter settings page.

When I click in the value field to the right of the ‘Grid system’ label, a small triangle appears in the field and a pop-up list of grid systems loaded for the work session displays. I choose the grid system that the ‘MC1AllTer’ layer is a part. Clicking in the value field to the right of the ‘>>Grids’ label causes an ellipsis symbol to appear in the field. When I click on the ellipsis symbol, a pop-up list of grid data layers available for the chosen grid system displays. I move the mouse pointer over the ‘MC1AllTer’ grid data layer name on the list and click the left mouse button. This selects the layer. I move the layer to the right side of the window by clicking on the button that displays the ‘>>’ symbols in the center of the window. I can move layers from the right side back to the left side by selecting and using the ‘<<’ symbols button. I can also move data layers back and forth between the two lists by double-clicking with the mouse pointer positioned on the file you want to move. I am only choosing one layer so I click the ‘Okay’ button in the upper right of the window. I will leave the default, “[create]” in the value field to the right of the ‘<<Result’ label.

Page 139: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

122

The equation I enter in the ‘Formula’ parameter value field is: ifelse(eq(a,7),a,0). The grid data layer cell value “7” represents the ridge landform. The parameters I choose for this execution of the Grid Calculator module are displayed in Figure 4-12.

Figure 4-12. The Grid Calculator module parameter settings page using a Boolean formula to create a ridge landform grid data layer.

Next I click the ‘Okay’ button to execute the module. The grid data layer that is output containing cells with the grid data value “7” is in Figure 4-13.

Figure 4-13. A new grid data for the ridges landform.

I rename and save the output data layer with a name that explains the data layer content, ‘MC1ridges’.

Page 140: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

123

I used this process six more times, once for each of the other landform categories. Each time I changed the value for “n” in the formula to represent a different data value on the ‘MC1AllTer’ grid data layer. This went quite fast. Creating Contour Shapes Data Layers Creating a contour data layer from a grid data layer is relatively easy with SAGA. The module used is Shapes - Grid/Contour Lines from Grid. This is more generally referred to as a raster to vector conversion. This module is used to create “isopleth” line shapes data layers from grid data layers containing continuous or surface type values. A contour is a line connecting points of equal elevation. An isopleth, sometimes called isoline, is a line drawn on a map connecting points that are assumed to be of equal value. So a contour is also called an isopleth or isoline. Some examples that come to mind of isopleths would be isotherms (connecting equal temperature values), isohyets (connecting lines of equal rainfall amounts), and isobars (connecting lines of equal barometric values). Although it makes no difference whether the data is continuous or discrete, it is more logical (and the resulting contours are probably more meaningful) to use this approach with continuous type data. In this example the input grid data layer will be a digital elevation model (DEM). The goal is to create a line shapes data layer with contours using 1000’ contour intervals. Figure 4-14 displays the Shapes - Grid/Contour Lines from Grid module parameter settings page.

Figure 4-14. The Contour Lines from Grid module parameter settings page.

Page 141: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

124

The grid system is chosen by clicking once in the value field to the right of the ‘Grid system’ parameter label with the mouse pointer. This causes a small triangle to appear and a pop-up list of grid systems available for the work session displays. It is important that the grid system I identify be the one that the DEM (‘MCdem30’) grid data layer is a part. I choose the correct grid system on the list. The input grid data layer for the ‘>>Grid’ parameter is a grid data layer named ‘MCdem30’. I choose the grid data layer name from the pop-up list of grid data layers that displays after clicking with the mouse pointer in the value field. The output layer will be a line shapes data layer. The output is identified in the value field to the right of the ‘<<Contour Lines’ parameter. The default is “[create]”. I will leave this value field with the default. However, you could choose a shapes data layer that is loaded in the current work session. If you do this, the content of the data layer will be overwritten with the output from this module. When you click the mouse pointer in the value field, a small triangle will appear on the right side along with a pop-up list of loaded shapes data layers. Clicking on one of the layers in the list will choose the layer and enter its’ name in the value field. You would only choose a layer from the list if you desired its’ content to be overwritten by the output from this module. The ‘Options’ section has three parameters: Minimum Contour Value, Maximum Contour Value, and Equidistance. The minimum elevation value for this DEM grid data layer is sea level. In the value field to the right of the ‘Minimum Contour Value’ label, a “0” has been entered. Since the maximum elevation is near 6430’, I enter ”6000” in the value field to the right of the ‘Maximum Contour Value’ parameter label. The last option is called ‘Equidistance’. This is the parameter for what is normally referred to as the contour interval, which is the vertical distance between contours. For example, if I wanted a contour created for every 50’ of elevation difference I would enter ”50”. In this example, I want a contour for every 1000’ of elevation difference so I enter ”1000” in the value field. These three parameters provide the user with a lot of flexibility. You do not have to set the minimum contour value at ”0” although that would be normal. But you may have special output requirements. Maybe the objective is to create a set of contours covering only the elevations from 2000’ to 4000’. In this case you could use ”2000” as the minimum contour value and ”4000” as the maximum. Or you might have an elevation layer that also contains water depths so you can enter a negative value for the minimum contour value. If you are not happy with the contour interval you select, you can quickly and easily change it and re-run the module and see if the output better fits your needs. My final settings are displayed in Figure 4-15.

Page 142: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

125

Figure 4-15. Final settings for execution of the Contour Lines from Grid module.

The last step is to execute the module. I click on the ‘Okay’ button and the module executes. It may take a little longer than normal for this module to execute. This will depend on the complexity and size of the grid data and the settings used. Toward the bottom of the screen on the right side you will see a bar graph indicating the status of completion. Since the output is a vector or shapes product and not a grid data layer product, the output will show up toward the bottom of the data layer list (immediately below the “Grids” section) when you click on the ‘Data’ tab at the bottom of the Workspace window. It will be in the “Shapes” section of the list. Note that the default name used for the new contour shapes data layer is derived from the name of the source grid data layer. I can change the name that appears in the list. First, I click on the shapes data layer name in the list (or on the thumbnail in the ‘Thumbnails’ display mode). Then I view the ‘Object Properties’ window. If it is not already active, I activate it by choosing ‘Show Object Properties’ from the Menu Bar ‘Window’ title drop-down list of options. Then I click on the ‘Settings’ tab at the bottom of the ‘Object Properties’ window. The first parameter in the list is called ‘Name’. I click in the value field to the right of the parameter label and key in the name I want SAGA to use for the contour shapes data layer (‘MC1contoujrs’). If I save or re-save the currently active project, this name will be associated with the shapes data layer for the project as part of the project environment. Next, I want to save the data layer file. I right-click on the new line shapes data layer name and select the ‘Save Shapes as …’ option. The ‘Save Shapes’ dialog window will appear. I enter the name I want to give to the contour layer in the data field to the right of the ‘File name:’ label. In this case I give it the same name I used in the ‘Object Properties’ window, i.e., ‘MC1contours’. One of the easy ways to recognize benefits of having a contour or isopleth vector layer of a grid data layer is to overlay the isopleths on the original grid layer or on some other grid

Page 143: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

126

data layer that you would like to see a relationship between the isopleths and the grid data. This is especially valuable for elevation contours as they have strong relationships to many physical and topographic data variables. You can change the color used for the contours. First, display the ‘Object Properties’ window for the contour shapes data layer. If the settings are not visible in the ‘Settings’ tab area of the ‘Object Properties’ window, make sure the shapes data layer name is selected and active in the ‘Data’ tab area. The upper portion of the shapes data layer parameter settings page is displayed in Figure 4-16.

Figure 4-16. The ‘Object Properties’ parameter settings for the new contour shapes data layer.

The default color in the example above for the vector contour lines is lime green. If lime green will not show up well when superimposed on a grid data layer then you can choose a more appropriate color. When you click in the value field to the right of the ‘Unique Symbol: Color’ parameter a small triangle will appear along with a pop-up list of color swatches. Click on one of the color swatches or develop a custom color swatch by selecting the “custom” color swatch at the bottom of the pop-up list. Figure 4-17 is the original DEM grid data layer showing the 1000’ contours using white for the contour lines.

Page 144: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

127

Figure 4-17. The DEM grid data layer with a contour overlay.

The settings area supports other methods for applying colors to the contours. Creating elevation contour lines has been the focus of example in this section. Remember, however, that the same module can be used with temperature ranges, barometric pressure, etc.

Page 145: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

128

Chapter 5 - Generating a Watershed Basins Layer This chapter uses several of the Terrain Analysis library modules to develop a “Watershed Basins” grid data layer. Terrain Analysis/Sink Removal Terrain Analysis – Hydrology/Parallel Processing Terrain analysis – Channels/Channel Network Terrain analysis – Channels/Watershed Basins This process involves four stages. First, the Terrain Analysis/Sink Removal module is used to preprocess a digital elevation model grid data layer. Depressions (pits or sinks) in the digital elevation model (DEM) are “leveled off”, i.e., filled, relative to surrounding terrain. Catchment areas are then delineated using the Terrain Analysis – Hydrology/Parallel Processing module. The input for the module is the DEM with the pits or sinks filled. The output is a grid data layer containing catchment areas that is used as input to the module for defining stream channels. The Terrain analysis – Channels/Channel Network module produces three outputs related to the stream network. A grid data layer and a line shape data layer are produced that delineate the stream network in raster and vector formats. A grid data layer showing channel direction is another output. The module uses two inputs; one is the DEM with filled pits created with the Sink Removal module. The second input is the catchment area grid data layer. It is used for the ‘Initiation Grid’ parameter. A watershed basin grid data layer is produced with the Terrain analysis – Channels/Watershed Basins module. The DEM output from the Sink Removal module is input along with the grid data layer for the stream network produced with the Channel Network module. These briefly introduced steps are discussed further in the following sections of this chapter: Preparing a DEM Data Layer for Hydrology Analysis Calculating Catchment Area Defining Channel Networks Defining Watershed Basins Preparing a DEM Data Layer for Hydrology Analysis A pit or a sink is a cell or a group of cells with an elevation lower than all of the adjacent cells. The flow routing algorithms used in hydrology analysis have problems with pits. Sinks and pits have to be “filled” before using any of the SAGA modules involving flow

Page 146: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

129

routing. The SAGA module library Terrain Analysis – Preprocessing has four modules, each using slightly different approaches to filling pits. These modules are: Fill Sinks (Planchon/Darboux, 2001) Fill Sinks (Wang & Liu) Fill Sinks XXL (Wang & Liu) Sink Removal I am going to use the module Terrain Analysis - Preprocessing/Sink Removal to fill the sinks in a DEM for Mason County, Washington named ‘MCdem30’. The Sink Removal module has two inputs, one mandatory and one optional. The mandatory input is a DEM grid data layer. The optional input is a grid data layer with flow directions out of a sink. This grid could be created, for example, with the Terrain Analysis – Preprocessing/Sink Drainage Route Detection module. I will use a DEM grid data layer as input to create a new DEM data layer containing no pits. It will be renamed ‘MC1dem30-sinks’. The first step is to execute the module Terrain Analysis-Pre-processing/Sink Removal. The module settings page is displayed in Figure 5-1.

Figure 5-1. The Sink Removal parameter settings page.

The ‘Grid system’ is chosen by first clicking with the mouse pointer in the value field to the right of the parameter. A small triangle appears in the field and a list of the grid systems active for the work session displays. There are a couple of grid systems loaded in this work session. I choose the one that the ‘MCdem30’ grid data layer that will be used for the ‘>>DEM’ parameter is a part. When you click in the value field to the right of the ‘>>DEM’ parameter a small triangle displays along with a pop-up list of grid data layers for the grid system chosen for the ‘Grid system’ parameter. I choose the ‘MCdem30’ data layer on the pop-up list of grid cell data layers. The default “[not set]” in the value field to the right of the ‘<Preprocessed DEM’ parameter needs to be changed to “[create]” in order to produce a new DEM with the

Page 147: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

130

sinks filled. Otherwise the input grid would be overwritten. I click in the value field and choose “[create]” from the list of grid data layers displayed. There are two methods in the ‘Options’ section for the ‘Method’ parameter. One is referred to as “Deepen Draining Routes” and the other is “Fill Sinks”. The “Fill Sinks” method is the default entry and the one I will use. There are two further parameters that would make it possible to exclude sinks from filling which show greater depths than a threshold value. I will leave these parameters with their default values, i.e., I will not use a threshold. Figure 5-2 shows the settings for the ‘Sink Removal’ parameter page before I click on the ‘Okay’ button.

Figure 5-2. Final settings for the execution of the Sink Removal module.

Now I click on the ‘Okay’ button to execute the module. The output grid data layer is displayed in Figure 5-3.

Figure 5-3. A new DEM grid data layer with “sinks” removed.

After displaying the new grid data layer in a map view window, I rename it to “MC1dem30-0-sinks” and save it.

Page 148: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

131

Visually comparing the original DEM layer with this new one I do not detect any obvious differences. There is a simple way to display the cells where change has taken place (i.e., where sinks have been filled) using the Grid - Calculus/Grid Calculator module. The assumption for this is that pits or sinks exist as depressions in the original DEM; in this case, the ‘MCdem30’ grid data layer. In the modified DEM (‘MC1dem30-0-sinks’) the depressions will have been leveled off or filled in order that runoff will flow through the cell rather than terminate in the cell as in a hole. If I subtract the original DEM from the new grid data layer I will have a grid data layer of the differences. I execute the Grid - Calculus/Grid Calculator. The settings page appears (Figure 5-4).

Figure 5-4. The Grid Calculator parameter settings page.

I choose the ‘Grid system’ by clicking with the mouse pointer in the value field to the right of the ‘Grid system’ label and choose the grid system from the list of grid systems loaded for the work session the one that the ‘MCdem30’ and ‘MCdem30-0-sinks’ grid data layers are a part. I want to identify the differences between the original DEM layer (‘MCdem30’) and the one with the sinks filled (‘MCdem30-0-sinks’). I click in the value field to the right of the ‘>>Grids’ parameter. An ellipsis appears on the right in the field. When I click on the ellipsis with the mouse pointer, a pop-up list of current grid data layers appears. I choose the two DEM grid data layers from the list. It does not make any difference what order I select them in. But remember that when you develop an equation, the data layers are referred to by “a“, “b“, “c“, etc., in the order they appear in the list. In this example, the first one in the list is ‘MCdem30-0-sinks’ and the second one is ‘MCdem30’. So ‘MCdem30-0-sinks’ will be referred to in the formula as “a“ and ‘MCdem30’ as “b“. I am going to leave “[create]“ as the entry for the value field to the right of the ‘<<Result’ label. The equation I enter is for basic subtraction. I want to create a new grid data layer that contains the differences in elevations, cell by cell, for the two input data layers. The equation will be, simply, “a-b“. Figure 5-5 shows the parameter settings before I click on the ‘Okay’ button.

Page 149: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

132

Figure 5-5. The Grid Calculator parameter settings page for creating a grid data layer showing “sinks”.

After entering the formula I click on the ‘Okay’ button. The “difference” grid data layer is in Figure 5-6. I rename it ‘MCdem-diff’.

Figure 5-6. The “sinks” grid data layer showing the elevation differences between two DEM’s.

There are several options for analyzing the differences. First, I can display all three of the grid data layers: ‘MCdem30’, ‘MCdem30-0-sinks’, and the ‘MCdem-diff’ layer. Once the three are displayed I can move the mouse pointer to the areas on the “differences” layer showing greater than “0“ data (the values in the difference grid data layer correspond to the “sink depth”). With the cursor positioned on one of these cells I can see what the cell data values are for the two DEM layers by making one or the other of the DEM grid data layers active so their grid cell values are displayed in the “Z“ field at the bottom of the window.

Page 150: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

133

Another approach is to display the three grid data layers zoomed in on an area where differences exist so that the actual data values in the grid cells can be seen (see Figure 7-33). I can use the ‘Synchronize Map Extents’ option in the Menu Bar Map drop-down

menu or its toolbar icon ( ) to synchronize the display of the three map view windows. The three map view windows in Figure 5-7 were created using this tool.

Figure 5-7. Checking grid cell data values.

Each of the windows is displaying the same area of grid cells on the layers. The “differences” data layer is the one at the bottom showing the amounts added to the original DEM. The only cell in the zoomed in area not experiencing an elevation difference is the one in the upper left corner. You can see that the elevation differences range from 1.01 up to 6. Another analysis would be to view the histogram of the grid data layer of differences. When I view the tabular version of the histogram I can see that there are almost 32000 cells out of 315,315 that were classified as sinks or part of a sink by SAGA.

Page 151: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

134

This analysis could be taken further if desired. Since there is now a data layer that identifies cells with differences, it would be possible to evaluate why the sinks exist. Could some be valid sinks? A sink could be a real physical feature, e.g. a gravel pit or open pit mine. A sink could also be a wetland or it could be a data error. Calculating Catchment Area A large portion of the technical information in this section is from technical information provided by Volker Wichmann and from the SAGA User Guide authored by Victor Oláya. A catchment area is the same as a flow accumulation area. In terms of a grid cell data layer, the catchment area or flow accumulation area of a cell is defined as the area of all cells upslope that will provide flow to this cell and the area of the cell itself. A catchment area grid layer is needed as input for many of the modules in SAGA terrain analysis and hydrology. A catchment is also referred to as a drainage basin or watershed. Flow routing algorithms constitute the key element of hydrological analysis. There are many different approaches to flow routing. Before getting into calculating catchment area, I will very briefly visit the world of flow routing. Methods can be characterized based on one of two assumptions. One set of methods relate to the flow of water moving between cell centers and the other focuses on the flow moving freely around the digital elevation model (DEM). The algorithms related to the latter approach are referred to as flow tracing algorithms. The methods used in the first set of approaches relate to what is called the D8 method; the oldest method and the one implemented in most GIS’s. Methods of flow distribution:

• Cell-wise flow accumulation and routing o Linear flow distribution (D8, Rho8) o Flow distribution with divergence (FD8, Dinf)

• Flow tracing o Linear flow distribution (Kinematic Routing Algorithm) o Flow distribution with divergence (DEMON)

Linear flow distribution is usually called single flow direction and flow distribution with divergence is usually referred to as multiple flow direction. Each of the algorithms results with different delineations of catchment areas and should be chosen according to circumstances. Methods of processing the DEM:

• Parallel processing: the DEM is sorted and processed “in parallel” from the highest to the lowest cell.

Page 152: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

135

• Recursive processing: the DEM is processed recursively upwards from the lowest cell.

(Both methods of processing the DEM, in contrast to the methods of flow distribution, result in delineation of the same catchment areas).

• Flow tracing from each cell, the flow path (single flow direction) or flow tube (multiple flow direction) is traced.

The following are general descriptions of the approaches, using the above divisions, implemented in the SAGA modules. Deterministic 8 (D8). This is the classical approach. Flow goes from the center of a cell to the center of that lower neighboring cell to which the steepest gradient is detected. Flow directions are restricted to multiples of 45 º. This restriction is the main reason for most of the disadvantages of this method. (O’Callaghan and Mark, 1984) Rho8. The Rho8 (random eight node) method of Fairfield and Leymarie (1991) is a stochastic version of the D8 algorithm. A degree of randomness is introduced into the flow direction computations to produce a mean flow direction equal to the aspect and thus breaks up parallel flow paths usually observed with the D8 method. Deterministic infinity (D∞) The method is based on representing flow direction as a single angle taken as the steepest downwards slope on the eight triangular facets centered at each grid point. The flow is then proportioned between two down-slope cells according to how close this flow direction is to the direct angle to the down-slope cell (Tarboton, 1997). Braunschweiger Digitales Reliefmodell This is a multiple flow direction algorithm. The flow is split between the surrounding cell whose orientation is nearest to the aspect of the center cell and its’ two adjacent cells. (Bauer, Bork and Rohdenburg, 1985) FD8 This algorithm is a modification of the D8 method to allow for divergent flow. The flow is distributed to all lower neighbors (multiple flow direction) whereby the fractions passed to each neighbor are calculated on a slope-weighted basis (Freeman, 1991) Kinematic Routing Algorithm (KRA) The KRA method is a uni-dimensional aspect driven flow-tracing algorithm. Flow behaves like a ball rolling down the DEM. Its’ position is not restricted to the center of cells. (Lea, 1992) Digital Elevation Model Network (DEMON) This is the most complex one in SAGA. It is a bi-dimensional flow-tracing algorithm producing flow or stream tubes. Very time consuming. (Costa-Cabral and Burgess, 1994)

Page 153: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

136

Depending on which flow routing algorithm or method is used, the resulting catchment area grid will differ. Three different modules, corresponding to the three general approaches of processing the DEM described above, can be used to generate a catchment area grid data layer. They are all located in the Terrain Analysis - Hydrology menu: (1) Parallel Processing, (2) Recursive Upward processing and (3) Flow Tracing. The flow tracing algorithms are used in the Flow Tracing module and the cell-wise single and multiple flow direction routing algorithms are implemented in the Parallel Processing and Recursive Upward Processing modules. In this example, I will use the Terrain Analysis - Hydrology/Parallel Processing function. The module parameter settings page is displayed in Figure 5-8.

Figure 5-8. The Parallel Processing parameter settings page.

In addition to the ‘Grid system’ parameter, there are three inputs listed. The ‘>>Elevation’ input is mandatory. The second one, ‘>Sink Routes’, would be used if I had pre-processed the DEM using the “Sink Drainage Route Detection” option rather than the “Sink Removal” approach. In the “Preparing a DEM Data Layer for Hydrologic Analysis” section I used the “Sink Removal” approach. Therefore, I do not need to use the ‘>Sink Routes’ input parameter here. The third input parameter, ‘>Weight’, is used to adjust the contribution each cell makes when calculating catchment areas. You would use the ‘Weight’ grid data layer if you

Page 154: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

137

desire to reduce the area of each cell to the portion actually contributing to runoff. This approach could be used to account for evaporation and deep drainage. The weights are in the range 0-1, with 0 contributing no runoff and 1 contributing all precipitation falling on this cell. Runoff from a specific precipitation event can then be calculated by multiplying the output catchment area grid with the amount of precipitation. I am going to leave it as “[not set]“. Using “[not set]“, each cell will contribute to the catchment area with its’ full spatial area which equals the square of its’ cell size. Here are the parameters I enter. Clicking in the value field to the right of the ‘Grid system’ label, a pop-up list of grid systems available in this work session displays. I choose the grid system that the grid data layer I am going to use as input is a part. The DEM grid data layer is chosen by clicking in the value field to the right of the ‘>>Elevation’ label. I choose from the pop-up list of grid cell data layers the one that has been pre-processed for filling sinks, ‘MCdem30-0-Sinks’. I am going to leave the outputs set at the default. The ‘Catchment Area’ value field has a default of “[create]”. There are several other outputs that can be created. For now, I am going to leave them in their default setting, “[not set]”. This means they will not be created. Note that the default setting for the ‘Method’ parameter is “Multiple Flow Direction”. At a later time, when I have a better understanding of the different approaches, I am going to experiment with the various methods and compare the outputs. The settings I am entering for this module are displayed in Figure 5-9.

Page 155: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

138

Figure 5-9. The parameter settings used to generate the ‘Catchment Area’ grid data layer.

Last, I click on the ‘Okay’ button.

Figure 5-10. The Catchment Area grid data layer.

The output catchment area grid data layer in Figure 5-10 does not look, visually, very complex. I can check the data value range by opening the ‘Object Properties’ and displaying the ‘Description’ tab area for the new layer. I highlight and make active the

Page 156: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

139

catchment area data layer name in the ‘Data’ tab list of the Workspace window by clicking on it once. The description window for the catchment area grid data layer is displayed in Figure 5-11.

Figure 5-11. The catchment area grid data description window.

In this example, the range of data values goes from a minimum of 10,889.966 to a maximum of 594,853,824; a substantial range. The huge range of the data is the reason for the lack of detail in the view window for the grid data layer. The default color classification palette does not provide enough variation. Using the “logarithmic scaling” mode will improve the level of detail. The ‘Settings’ tab area of the ‘Object Properties’ window in Figure 5-12 has been scrolled down part way.

Page 157: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

140

Figure 5-12. The catchment area grid data description window.

I can see the data value range displayed to the right of the ‘Value Range’ label. Underneath this parameter is another one called ‘Mode’. There are three options supported: Linear (default), Logarithmic (up), and Logarithmic (down). I choose the “Logarithmic (up)” option. After some experimentation, I find that entering 100000 in the ‘Logarithmic Stretch Factor’ value field yields better visual interpretation. Now I am able to get a better impression of the results of generating catchment areas (Figure 5-13).

Page 158: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

141

Figure 5-13. The Catchment Area grid data layer using the ‘Logarithmic’ option.

The ‘Linear Flow Threshold’ parameter (see Figure 5-9) was not discussed. This threshold can be used to set a catchment area above which the algorithm used switches from multiple flow direction to single flow direction. This threshold would usually be set to a value, above which a channel network is developing (the “blue lines” on a topographic map). Using the D8 also on the hill-slope would usually result in unrealistic parallel flow paths. But along channels, it allows the flow to concentrate. So the combination of both can be used to make use of the advantages of both algorithms. I rename this data layer ‘MCcatchmentArea’. Defining Channel Networks Channel or stream network data layers, grid and vector, are generated using the Terrain Analysis - Channels/Channel Network module. The module settings page is displayed in Figure 5-14.

Page 159: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

142

Figure 5-14. The Channel Network parameter settings page.

The grid system is chosen by clicking with the mouse pointer in the value field to the right of the ‘Grid system’ label. A list of loaded grid systems for the work session displays. I choose the grid system the input grid layers are a part. You can see from the ‘>>’ symbols on the ‘Channel Network’ settings page that two grid data layers are mandatory input: ‘>>Elevation’ and ‘>>Initiation Grid’. The elevation grid is used to trace the channels. The digital elevation model (DEM) with the sinks filled (‘MCdem30-0-sinks’) will be used for this parameter. The initiation grid supplies information about the starting points of the channels. These cells are referred to as “initiation” cells. The ‘Catchment Area’ grid data layer can usually be used as the ‘Initiation Grid’. I will use it in this example. The ‘Catchment Area’ grid data layer (‘MCcatchmentArea’) was generated and described in the “Calculating Catchment Area” earlier in this chapter. When I click in the value field to the right of the ‘>>Elevation’ parameter, a small triangle appears in the field and a pop-up list of grid data layers available for the chosen grid system displays. I choose the DEM data layer with the sinks filled, ‘MCdem30-0-sinks’. The same list of grid data layers displays when I click in the value field to the right of the ‘>>Initiation Grid’ parameter. I choose the catchment area data layer, ‘MCcatchmentArea’, to use for the ‘>>Initiation Grid’ parameter. Note that immediately below the ‘>>Initiation Grid’ label, in Figure 5-14, are two options. The first one is for ‘Initiation Type’. This option defines the condition under

Page 160: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

143

which a channel is started. There are three choices: Less Than, Equal To, Greater Than. These choices relate to the threshold value set in the next row labeled ‘Initiation Threshold’. In this example, I will set the threshold to 1000000 and the ‘Initiation Type’ to “Greater Than”. The higher you set the threshold, the greater will be the distance from the divide to the initiation point, i.e., the more area the catchment area needs to be to supply enough water to form a channel. The parameters page shows that there are three output data layers. ‘Channel Network’ and ‘Channel Direction’ are both grid data layers. The third one is a line shapes data layer for the channel network. I will use the default “[create]” that appears in the value fields. The ‘Options’ section has one variable. It is used to control the length (in cells) of the shortest channel segments. I will limit the creation of channel segments to those greater than 10 cells in length. I enter ‘10’ in the value field to the right of the label ‘Min. Segment Length’. The parameter settings I will use for this example are displayed in Figure 5-15.

Figure 5-15. The parameter settings used for the Channel Network module.

Now I execute the module by clicking on the ‘Okay’ button.

Page 161: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

144

Figure 5-16. The Channel network and Channel Direction grid data layers.

The channel network grid data layer (on the left in Figure 5-16) contains cell values identifying the stream order after Shreve (1966) of the segment that flows across the cell. The zoomed in portion of the channel network grid data layer (Figure 5-17) shows cells having a stream order value of 33.

Figure 5-17. A zoomed in portion of the Channel Network grid data layer.

The channel direction grid data layer (on the right in Figure 5-16) shows the flow direction of each cell. The directions are coded from one through eight, counting clockwise from northeast (1) around to north (8). The grid data value in the cell (see Figure 5-18) identifies the direction out of the cell for the flow. A value of 3.00 means the flow is from the SE corner. A 4.00 value identifies the flow moving from the bottom of the cell.

Page 162: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

145

Figure 5-18. A zoomed in portion of the Channel Direction grid data layer.

The third output element created by this module is a shapes data layer. It has been added as a line shapes data layer to the list of data layers in the ‘Data’ tab area of the Workspace. I can see on the list of shape data layers that there is one called ‘Channel Network’. It captures the same channel network as the grid data layer channel network except in a vector format. If the shapes data layer is going to be used as an overlay for grid data layers, the color used for the stream segments may have to be changed depending on the color palette being used for the grid data layer it would overlay. I can adjust the color. First, I must make sure that the shapes data layer is selected in the ‘Data’ list in the Workspace window. Next, the ‘Object Properties’ window must be displayed in the work area. If it is not already displayed, I can activate it by selecting ‘Show Object Properties’ from the ‘Window’ title on the Menu Bar. The parameter page in the ‘Object Properties’ window will be populated with the settings for the data layer. You can see that the ‘Object Properties’ parameters page in Figure 5-19 is for the shapes data layer for the ‘Channel Network’.

Page 163: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

146

Figure 5-19. The parameter settings page for the ‘Channel Network’ shapes data layer.

There are several ways to adjust the color of the stream segments. Since my intent is not to portray attributes by colors but only to choose a suitable color for displaying the segments as a map overlay, I will use a single color for all. In the ‘Display: Color Classification’ section, there is a parameter called ‘Unique Symbol’. The first parameter under it is ‘Color’ and that is where the default color for the stream segments in the ‘Channel Network’ shapes data layer has been specified. The default is lime green. This is the parameter I will change. When I click in the value field

Page 164: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

147

to the right of the ‘Color’ label, a list of colors, like the one in Figure 5-20, is displayed. I click on the color I want to use to display the channel network stream segments.

Figure 5-20. A color table used with shapes data layers.

I choose white. Since the default background for the shapes view window is also white, the segments will seem to disappear. However, this is just because I am using white for the segments against a white background. When I overlay the white segments on a DEM grid data layer the channel network will stand out nicely. Figure 5-21 shows an example of the channel network shapes data layer as an overlay using white on the ‘MC1dem30-sinks’ grid data layer.

Page 165: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

148

Figure 5-21. The DEM grid data layer with a shape data layer channel network overlain.

I rename both the grid and line shapes data layers for the channel network to ‘MCchannelNet’. Defining Watershed Basins Each segment of a channel network grid data layer is associated with a watershed basin. This watershed basin corresponds to the catchment area of the lower point of the segment minus the basins associated to other segments located upslope. The watershed basin is delineated from the junction point at the end of the segment. This point is coded with a –1 while the segment is coded with the stream order. Knowing that junction points are coded with –1’s suggests another approach for calculating watershed basins. An input grid data layer consisting of only the –1 cells with all other cells coded as “NoData” cells could be used as a pour point grid instead of a channel network grid. The SAGA module for creating a watershed basin grid data layer is Terrain Analysis - Channels/Watershed Basins. Figure 5-22 displays the ‘ Watershed Basins’ settings page.

Page 166: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

149

Figure 5-22. The Watershed Basins module parameter settings page.

Two grid data layers are required for input. These are a DEM for elevation with the sinks filled (unless you specify a ‘Sink Route’ grid) and one for channel network. The ‘Grid system’ is chosen by first clicking with the mouse pointer in the value field to the right of the ‘Grid system’ parameter. A small triangle appears in the field and a list of the grid systems loaded for the work session displays. There are a couple of grid systems loaded in this work session. I select the one that the grid data layers that will be chosen for the ‘>>Elevation’ and ‘>>Channel Network’ parameters are a part. The grid data layers to be used for input are chosen by clicking in the value fields to the right of the ‘>>Elevation’ and ‘>>Channel Network’ parameters. A list of grid data layers that are part of the chosen grid system displays. For the ‘Elevation’ layer I choose the ‘MCdem30-0-sinks’ DEM that has been pre-processed by filling sinks. I choose the ‘MCchannelNet’ grid data layer for the ‘Channel Network’ input. I want to create a grid data layer for watershed basins so the default “[create]“ for the ‘<<Watershed Basins’ parameter as output will work fine. The ‘Min. Size’ parameter in the ‘Options’ section is similar to the one used for identifying a minimum length for stream segment identification. In this case it identifies a minimum size, in cells, for watershed basins. The cell size for this grid system area is 104 meter by 104 meter or about 315’ by 315’. The area of the cell is approximately 1.6 acres. I will set the ‘Min. Size’ option to about 160 acres or 100 cells. You can adjust the number and size of watershed basins to fit your needs by using different channel network grid data layers. You can have a more detailed channel network grid to represent channels but then create one using a greater threshold so it can be used to generate a basins grid data layer with a lower number of basins. The parameter settings page for the module after making the above entries is displayed in Figure 5-23.

Page 167: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

150

Figure 5-23. Watershed Basins module settings for creating a watershed basins grid data layer.

Figure 5-24 is the output watershed basin grid layer using the settings in Figure 5-23. I am using the channel network and the Mason County ‘waters’ shapes data layers as overlays.

Figure 5-24. A watershed basin grid data layer.

The watershed basins grid data layer was renamed to ‘MCwaterbasins’.

Page 168: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

151

Chapter 6 - Evaluating Proposed Community Park Sites The unincorporated hamlet of Grapeview, Washington desires to initiate an independent analysis to establish a developed recreation site for use by local residents and visitors to the area. This first part of the analysis is to find out if there are any properties within the hamlet that meet the community park committee criteria for a site. The general land use map for the County has 13 categories of land use. The category of most interest to Grapeview citizens is the one for “Open Space”. They believe there might be some opportunities for the establishment of a developed recreation area using land allocated to the open space land use category in the County Comprehensive Plan. This chapter describes using SAGA to analyze a number of resource data layers using a set of criteria for evaluating a community park site. The chapter is organized around how nine criteria are applied using SAGA modules. The sections in this chapter are listed here, along with SAGA modules used in the section. Criterion 1: Identifying the boundary for Grapeview. Shapes-Tools/New layer from selected shapes Shapes-Polygon/Polygon Intersection Grid-Gridding/Shapes to Grid Criterion 2: Identifying Open Space land use in Mason County and Grapeview. Grid-Calculus/Grid Calculator Criterion 3: Open Space parcels must be a minimum size of 5 contiguous acres. Grid-Filter/Filter Clumps Table-Calculus/Table calculator for shapes Criterion 4: Open Space land parcels with road access. Grid-Calculus/Grid Calculator Criterion 5: The park parcel cannot be adjacent to these land uses: industry, commercial, mineral extraction, and utilities; Criterion 6: The park parcel may be adjacent to these land uses: agriculture, commercial recreation, public, rural and residential; Criterion 7: The park is most suitable adjacent to these land uses: open space, forest, and water. Table-Calculus/Table calculator for shapes Shapes-Tools/Shapes Buffer Shapes-Polygons/Polygon Intersection Grid-Gridding/Shapes to Grid

Grid-Calculus/Grid Calculator Geostatistics-Grids/Zonal Grid Criterion 8: The largest amount of ground surface with slopes between 0 and 3 degrees.

Page 169: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

152

Grid-Calculus/Grid Calculator Geostatistics-Grids/Zonal Grid Statistics Criterion 9: The viewing of these land use classes in the foreground and middle-ground will be minimized: industry, commercial, mineral extraction, utilities. This criterion will be used to compare parcel choices. Shapes-Polygons/Polygon Centroid Terrain Analysis-Lighting, Visibility/Visibility (single point) [interactive] Grid-Tools/Grid Buffer Grid Calculus/Grid Calculator Selection Criteria The community park committee informally established criteria for selecting parcels suitable for a community park.

1. The park will be located within the “greater” Grapeview hamlet. Grapeview is defined by two political entities: the Grapeview School District and the Grapeview Volunteer Fire Department #3.

2. Suitable parcels will have a current land use class of open space. 3. Suitable parcels or groups of suitable parcels must be a minimum of 5 acres (the

equivalent of 28 grid cells 90’ by 90’). Cells must be contiguous. 4. There must be paved street or paved road access up to the property boundary. 5. The park parcel cannot be adjacent to these land uses: industry, commercial,

mineral extraction, and utilities. 6. The park parcel may be adjacent to these land uses: agriculture, commercial

recreation, public, rural and residential. 7. The park is most suitable adjacent to these land uses: open space, rural, forest, and

water. 8. The largest amount of ground surface with slopes between 0 and 3 degrees. 9. The viewing of these land use classes in the foreground and middle-ground visual

zones will be minimized: industry, commercial, mineral extraction, utilities. This criterion will be used to compare parcel choices.

Criterion 1: Identifying the boundary for Grapeview Mason County has one incorporated city. Other populated areas in the county are characterized as unincorporated. The hamlet of Grapeview is one of several unincorporated areas. Thus, Grapeview does not have a “city limits”. Rather, the boundary is loosely defined by the local school and fire district boundaries.

Page 170: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

153

Figure 6-1. The Grapeview School District (on the left in solid green) and the Grapeview Volunteer Fire Department #3 (on the right in solid red).

The map views in Figure 6-1 of the Grapeview School District and Volunteer Fire Department #3 district each are overlain with the County boundary. The Grapeview School District displays in solid green and Fire District #3 in solid red. The most efficient approach to “defining” the hamlet of Grapeview is to create a single object that combines the two district boundaries. I used the Shapes-Tools/New layer from selected shapes and Shapes-Polygon/Polygon Intersection modules for this task. First, I used the Shapes-Tools/New layer from selected shapes module to create two new polygon shapes data layers, one for each of the two districts. I loaded the ‘MasonSchoolDist’ layer containing the county school districts and the ‘MasonFD’ layer containing the county fire districts. These two layers are displayed in Figure 6-1. Next, I displayed the layer for school districts in a map view window. Before selections could be made in the map view window, I selected the ‘MasonSchoolDist’ polygon shapes data layer in the ‘Data’ tab area of the Workspace. Then I used the ‘Action’ tool

( ) from the Tool Bar to select (by moving the arrow into the Grapeview polygon object and clicking the left mouse button) the Grapeview School District polygon so it was selected and highlighted. Last, I executed the Shapes-Tools/New layer from selected shapes module. Figure 6-2 displays the module settings I used.

Page 171: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

154

Figure 6-2. The Shapes Tools/New layer from selected shapes module settings for creating the ‘MasonSDgrapeview’ layer.

The output from this module is a new polygon shapes data layer containing a single polygon object, the Grapeview School District polygon object. I renamed the output layer to ‘MasonSDgrapeview’. I used the same process to create a polygon shapes data layer for Grapeview Volunteer Fire Department #3. I renamed the output ‘FDthree’. The Shapes-Polygon/Polygon Intersection module was executed to merge the two shapes data layers into a single layer representing both district polygons. Figure 6-3 displays the settings used with this module.

Figure 6-3. The Shapes-Polygon/Polygon Intersection module settings for creating the ‘MasonGV’ layer.

Page 172: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

155

The ‘>>Layer A’ and ‘>>Layer B’ parameters are for choosing two shape data layers for input. In the ‘Options’ section for the ‘Method’ parameter, I chose the “Complete Intersection” method. The output shapes data layer from these settings is displayed in Figure 6-4. The output consists of a number of polygon objects. The Shapes-Polygon/Polygon Union module was then used to combine the polygon objects into a single object in a data layer named ‘MasonGV’.

Figure 6-4. The polygons representing the hamlet of Grapeview (‘MasonGV’).

The boundaries for the two districts are overlain on the output in Figure 6-4. The last step is to create a grid data layer version of the shapes data layer. The Grid-Gridding/Shapes to Grid module is used for this operation.

Figure 6-5. The Grid-Gridding/Shapes to Grid module settings, vector to raster conversion.

Page 173: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

156

The polygon shapes data layer (‘MasonGV’) defines Grapeview with a single polygon object. The ‘GVID’ attribute contains a ‘1’ data value for the polygon. I chose this attribute to provide the data value for the output on the grid data layer. This means the grid cells on the output grid data layer falling within the polygon on the input shapes data layer will be coded with the value of ‘1’. The output grid data layer from this module execution was renamed ‘MasonGVgrid’. Criterion 2: identifying Open Space land use in Mason County and Grapeview A county land use grid data layer exists (‘MasonGenLU’). The open space land use class on the county grid data layer that exists in the Grapeview hamlet will be copied into a grid data layer for the hamlet. The Grid-Calculus/Grid Calculator module is used to build this open space land use layer for the hamlet. The Mason County General Land Use map grid data layer is displayed in Figure 6-6.

Figure 6-6. The Mason County General Land Use class map.

The majority of the land area is in the forestry land use class. At this scale, it is difficult to see many areas in the open space class (displayed in pink). The data value for open space is “7”. The large white area in the northwest quadrant is federally owned land and includes portions of the Olympic National Park and Olympic National Forest. The county does not determine land use for federally managed lands. Figure 6-7 displays the Grid Calculator settings for creating a grid data layer containing the open space land areas for the Grapeview hamlet.

Page 174: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

157

Figure 6-7. The Grid Calculator module settings for creating the open space land use grid data layer for the Grapeview hamlet.

The input grid data layers are ‘MasonGVgrid’ (referred to in the formula as variable “a”) and ‘MasonGenLU’ (referred to in the formula as variable “b”). The formula applied is: ifelse(eq(a,1),ifelse(eq(b,7),b,0),0) The ‘MasonGVgrid’ layer uses a “1” for all the grid cells in the Grapeview hamlet. The first part of the formula checks layer “a” to see if the cell data value is “1”. If the value is a “1” (i.e. the condition is true), then the second part of the formula is checked. The data value for the open space land use on the ‘MasonGenLU’ layer is “7”. If this condition is true then the data value is saved to the corresponding cell on the output grid data layer. If the value is not found meaning the condition is false, a “0” is saved to the output layer grid cell. The output grid data layer is displayed in Figure 6-8. The grid data layer is renamed ‘GVOpSpgr’.

Page 175: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

158

Figure 6-8. Open Space and Rural land uses in Grapeview (‘GVOpSpgr)’.

The map display in Figure 6-8 represents the “population” of open space parcels in Grapeview that meet the first level of suitability for a community park. The parcels showing in the pink color have the open space land use classification. Criterion 3: Open Space parcels must be a minimum size of 5 contiguous acres The Grid-Filter/Filter Clumps module (see Figure 6-9) is used to identify groupings (larger than a specified minimum size) of grid cells having the same cell value. A value is entered to specify a minimum number of cells in a group. The value entered for specifying a minimum group size is the number of cells representing the minimum group size. In this situation, this means I must calculate how many cells make up 5 acres of land area. Each cell in the grid system is 90’ square or 8100 square feet. Five acres is about 217,800 square feet. Thus, 5 acres is approximately 27 grid cells.

Page 176: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

159

Figure 6-9. The settings for the Grid-Filter/Filter Clumps module for identifying >5 acre cell groupings.

The input grid data layer is ‘GVOpSpgr’. As noted earlier, this layer has open space land areas identified using the data value “7”. The minimum number of cells in a 5-acre group is calculated to be “27”. The output from executing these module settings is displayed in Figure 6-10.

Page 177: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

160

Figure 6-10. Grapeview Open Space areas greater than 5 acres in size.

Grid cells containing the open space data value “7” but are not part of a contiguous group of cells meeting the 5 acre threshold, are recoded by the Filter Clumps module. The module places ‘no data’ values in these cells. Because these ‘no data’ grid cells are really valid data cells containing zeroes, I used the Grid-Tools/Reclassify Grid Values module to convert the values to zeroes. The name for the grid data layer stayed the same (‘GVOpSpgr’). You can see that small areas have dropped out when you compare Figures 6-8 and 6-10. The open space areas displayed in Figure 6-10 represent the total population of suitable land areas that are land use class open space and meet the minimum size criteria of 5 acres. I used the Shapes-Grid/Vectorising Grid Classes module to create a polygon shapes data layer that can be used in later steps of this evaluation process. I have named this polygon shapes data layer ‘GVOpSpPoly’. Figure 6-11 displays the shapes data layer.

Page 178: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

161

Figure 6-11. Open Space areas in Grapeview greater than 5 acres in size.

Figure 6-12 displays the attribute table linked to the ‘GVOpSpPoly’ shapes data layer.

Figure 6-12. The attribute table for the ‘GVOpSpPoly’ shapes data layer.

I will add columns/fields to this table as the evaluation progresses. The labels displayed for the polygons in Figure 6-11 are from the ‘Site’ column in the attribute table. The site numbers are the numbers I have assigned to each of the open space groups. SAGA does not have good cartographic output support; thus, the labels are displayed but not cartographically pleasing.

Page 179: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

162

On the far right in the table is a column labeled “ACRES”. This is a generated column using the Table-Calculus/Table calculator for shapes module. The “AREA” field displays the square feet for the polygon object. The Table-Calculus/Table calculator for shapes module settings for generating the “ACRES” column are displayed in Figure 6-13.

Figure 6-13. The Table-Calculus/Table calculator for shapes module settings for calculating “ACRES”.

The polygon shapes data layer is chosen for the ‘>>Shapes’ parameter. The sixth column from the left is referred to in the equation as variable ‘f’. That column displays the square feet for each polygon. An acre is 43,560 square feet. The formula divides the polygon square footage by the square feet in an acre to calculate acres. Criterion 4: Open Space land parcels with road access There are several ways to approach this criterion. Since there are only 10 groupings of open space land use greater than 5 acres in size, you could display the county roads (‘MasonRoadsGraPav’) line shapes data layer overlain on the ‘GVOpSpgr’ grid data layer and visually determine the overlap. Another way is to use the Grid Calculator module to add the grid data layer version of the county roads to the ‘GVOpSpgr’ grid data layer. On the grid data layer version of the county roads, a data value of ‘2’ is for gravel surface roads and a value of ‘3’ is for pavement surface roads. Open space on the ‘GVOpSpgr’ data layer is coded as ‘7’. A mathematical overlay (adding the two together into a single layer) would mean that data values of ‘9’ and ‘10’ on the output grid data layer would represent areas where roads overlap open space land use. Figure 6-14 displays the Grid Calculator settings to produce this new grid data layer. I rename the new grid layer ‘GVOpSpRoads’.

Page 180: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

163

Figure 6-14. Grid Calculator settings for overlaying gravel/paved roads with open space land use in Grapeview.

Figure 6-15 displays the Grid Calculator output. Site 4 is the only site out of the 10 that does not have a road contact.

Figure 6-15. Display of ‘GVOpSpRoads’ grid data layer. Site 4 does not have a road contact.

It is relatively easy to zoom in on the 10 sites to assess whether any contain roads or have road contact. Criterion 5: The park parcel cannot be adjacent to these land uses: industry, commercial, mineral extraction, and utilities. Criterion 6: The park parcel may be adjacent to these land uses: agriculture, commercial recreation, public, rural and residential.

Page 181: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

164

Criterion 7: The park is most suitable adjacent to these land uses: open space, forest, and water. These three criteria (5, 6, and 7) address compatibility with adjacent land uses. I am going to create a table showing the linear distance for adjacency, in feet, for land uses bordering each of the ten sites. This table can be used to evaluate these three criteria. The first step toward developing this table is to create a grid data layer containing a one cell wide zone around each of the sites. This border zone will be one cell width or 90’ (since a cell is 90’ on a side). The data values for the border zone cells for site #1 will have a data value of 100; site #2 a data value of 200; and so on. This data value numbering system retains a numeric link to the sites and is initiated with a new attribute called ‘BUFFNUM’. The Table-Calculus/Table calculator for shapes module was used to create the new attribute ‘BUFFNUM’ for the ‘GVOpSpPoly’ shapes data layer. The existing attribute, ‘SITE’ (numeric values 1 through 10), values were multiplied by 100 to create the values for the ‘BUFFNUM’ attribute field. The Shapes-Tools/Shapes Buffer module was used to develop a polygon shapes data layer using ‘GVOpSpPoly’ as input. Each polygon object in the ‘GVOpSpPoly’ layer will increase in size by the addition of a 90’ buffer added to it in the output layer. Figure 6-16 displays the settings for the execution of this module.

Figure 6-16. Settings used for the Shapes-Tools/Shapes Buffer module.

Page 182: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

165

The ‘>>Shapes’ parameter shows ‘GVOpSpPoly’ polygon shapes data layer as input. This layer contains polygon objects representing the ten open space sites that are greater than 5 acres in size. The ‘ID’ attribute identifies the site ID for each object. In this case, the attribute selected does not have any influence on the output as the attribute values are not used. The grid cell size is 90’. This is the desired width of the output buffer. A “90” is entered for the ‘Buffer Distance (Fixed)’ value. The objects on the output layer will be the original object dimensions plus the 90’ buffer added around each polygon object. This is an interim output. I can use the Shapes-Polygons/Polygon Intersection module to create a polygon shapes data layer containing only the buffer portion of the output polygons from the Shapes Buffer module. This buffer portion is the single-cell width border zone around each polygon. Figure 6-17 displays the settings for the Shapes-Polygons/Polygon Intersection module for this execution.

Figure 6-17. Settings for the Shapes-Polygons/Polygon Intersection module execution.

The buffer polygons are created by subtracting the original open space site polygon objects from the output objects of the execution of the Shapes Buffer module. The result is the difference between the two layer objects. This is the buffer that was added by the Shapes Buffer module around each open space site; a 90’ border zone. The output layer is called ‘GVOpSpEDGE’. Figure 6-18 displays an example of the objects on the ‘GVOpSpEDGE’ layer.

Page 183: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

166

Figure 6-18. Zoomed in portions of the ‘GVOpSpEDGE’ output data layer.

The next step is to convert the ‘GVOpSpEDGE’ output to a grid data layer so it can be used with the ‘MasonGenLU’ grid data layer to identify adjacent land uses for the sites. Unfortunately, the values for the ‘BUFFNUM’ attribute were lost in the intersection process. Before doing a vector to raster conversion I edited the attribute ‘BUFFNUM’ and added the values back in. The Grid-Gridding/Shapes to Grid module is used for the vector to raster conversion. Figure 6-19 displays the settings used.

Figure 6-19. The settings used for the Grid-Gridding/Shapes to Grid vector to raster conversion.

The input shapes data layer is the one displayed in Figure 6-18, ‘GVOpSpEDGE’. The attribute chosen to provide the data values for the grid cells on the output grid data layer is ‘BUFFNUM’. This attribute contains values that link the border zone polygons to the site polygon. The output grid data layer is re-named ‘GVOpSpEDGEgr’.

Page 184: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

167

The next step is to use the ‘GVOpSpEDGEgr’ grid data layer with the grid layer containing land use classes for Mason County (‘MasonGenLU’). I will use the Grid Calculator module to add the two layers together. The data values on the ‘GVOpSpEDGEgr’ layer are from 100 to 1000. The data values on the ‘MasonGenLU’ layer are 1 through 12. Adding the two layers results with a set of new, unique, data values that can easily be related to the sites. For example, the data value of 100 from the ‘GVOpSpEDGEgr’ layer added to any of the land use classes would result with potential output values ranging from 101 through 112. The second and third digits in the value identify the land use class from the ‘MasonGenLU’ layer. Thus, the 100 series of data values relate to site #1 and border land use classes, the 400 series to site #4, etc. The coding of the ‘GVOpSpEDGEgr’ layer is crucial in this approach in order to distinguish the intersected classes. I did encounter one issue with this process. Site numbers 2 and 3, in one nearby area, are separated by a single grid cell. This was not enough separation for a buffer to be created for each site; instead, one buffer was created around both sites. This is not a big problem and was corrected by re-coding the border zone around site #2 on the grid data layer. Thus, the border zone around site #2 contained the value 200 and the zone around site #3 contained the value 300. This re-coding was accomplished using the Grid – Tools/Change Cell Values [interactive] module. The versatile Grid Calculator module is executed to create a new grid data layer using the ‘MasonGenLU’ and ‘GVOpSpEDGEgr’ grid data layers showing only the land use classes for the one-cell wide border zones. Figure 6-20 displays the settings for the Grid Calculator used for this objective.

Figure 6-20. The Grid Calculator settings for creating a grid data layer for land use classes along the site borders.

Page 185: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

168

The formula used is “ifelse(gt(a,0),(a+b),0)”. Variable “a” is the reference to the ‘GVOpSpEDGEgr’ layer and variable “b” refers to the ‘MasonGenLU’ layer. Layer “a” is checked to see if a found data value is greater than 0. If the condition is true, the data value would represent a border zone. If true, the data value for the cell in layer “a” (the border zone data value) is added to the corresponding cell data value in “b” (the land use class data value) and output to the corresponding cell on the output data layer. Again, the equation portion ‘(a+b)’ is adding the border zone number (from layer “a”) to the land use class data value (from layer “b”). The output in the grid data layer (‘GVOpSpEDGElanduse’) captures the land use adjacent to each of the open space sites being evaluated. The Geostatistics-Grids/Zonal Grid Statistics module can be used to produce a table that summarizes the number of cells for each data value that occurs on the output grid data layer (‘GVOpSpEDGElanduse’). Each of the data values includes the site number so the data can be summarized and displayed by site number. Figure 6-21 displays the settings for the execution of the Geostatistics-Grids/Zonal Grid Statistics module for the output ‘Result Table’.

Figure 6-21. The ‘Zonal Grid Statistics’ module settings.

I saved the output ‘Zonal Statistics’ table and opened it in Excel. I multiplied the cell counts by 90 to figure out the number of feet of adjacency for each land use by site. I had to do a visual interpretation for “water” adjacency as that is not a land use class included on the ‘MasonGenLU’ grid data layer. The final table is displayed in Figure 6-22.

Page 186: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

169

Figure 6-22. The table for land use adjacency for each of the sites.

The three criteria can now be evaluated. The above process could have been shortened by using the Geostatistics-Grids/Zonal Grid Statistics module at the beginning with the ‘GVOpSpEDGEgr’ layer for the ‘>>Zone Grid’ parameter and the ‘MasonGenLU’ layer for the ‘>Categorical Grids’ parameter. The lengthier approach described above illustrates several SAGA modules used together to achieve the objective. Criterion 5: The park parcel cannot be adjacent to these land uses: industry, commercial, mineral extraction, and utilities There are four land use classes that the committee feels a community park should not be adjacent. These are: industry, commercial, mineral extraction, and utilities. Viewing the table in Figure 6-22, site #5 has some type of utility facility adjacent to it. Criterion 6: The park parcel may be adjacent to these land uses: agriculture, commercial recreation, public, rural and residential There are five land use classes that the committee feels a community park is moderately compatible. These are: agriculture, commercial recreation, public, rural, and residential. At this time, this can be viewed on a presence or absence basis. All of the sites have residential land use adjacent to their boundaries. None of the sites are adjacent to a public land use. Site #4 borders some agriculture land use. Commercial recreation is adjacent to site #9.

Page 187: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

170

Criterion 7: The park is most suitable adjacent to these land uses: open space, forest, rural, and water Open Space is the land use for each of the 10 sites. There are not any sites that will have adjacent open space. Any adjacent open space is part of the greater than 5-acre group. Sites 1, 2, 4, 6, 7, 8, and 9 all have adjacent lands in forestry land use. The Rural land use is found adjacent to site #’s 1, 2, 3, 6, 7, 9, and 10. The last one, water, is near site #’s 1, 4, and 5. A final step in evaluating criteria 5, 6, and 7 will be to calculate the adjacent land use lengths as a percentage of the total border length for the site. The sites can then be rated accordingly. Sites with higher percentages of border length in these land uses would be more acceptable. Criterion 8: The highest amount of ground surface with slopes between 0 and 3 degrees A table showing the acreage having 0 to 3 degree slopes will be generated. The percentage of acreage in 0 to 3 degree slope, relative to the total acreage in the site, will be calculated. The sites can be ranked accordingly. There is a grid data layer representing the 10 sites. The grid data values range from 1 through 10. It is named ‘GVOsites’. This layer will be used with a second layer that has two classes; less than 3 degree slopes (1’s) and slopes greater than 3 degree (‘0s’). The ‘MasonSlpDeg’ grid data layer contains slope data, in degrees, for the entire county. The Grid Calculator module will be used to create a grid data layer that contains less than 3 degree slopes only. The settings for the Grid Calculator are displayed in Figure 6-23 for creating the ‘MasonSlopeLT3’ grid data layer.

Figure 6-23. Grid Calculator settings for creating a grid layer containing less than 3 degree slopes.

Page 188: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

171

The ‘MasonSlpDeg’ grid data layer was chosen for the ‘>>Grids’ parameter. The equation checks the cell value on the input layer to see if it is less than 3 degrees. If it meets the condition (i.e., the condition is true), the value “1” is saved to the corresponding grid cell on the output grid data layer. Otherwise, if it does not meet the condition (it is false), a 0 value is output to the grid data layer. I name the output grid data layer ‘MasonSlopeLT3’. The Geostatistics-Grids/Zonal Grid Statistics module can be used with the ‘GVOsites’ layer chosen to represent zones and the ‘MasonSlopeLT3’ layer as a categorical grid. The settings for this module are displayed in Figure 6-24.

Figure 6-24. The Zonal Grid Statistics module settings.

The output from the Zonal Grid Statistics module is a table with the default name ‘Zonal Statistics’. I saved this table in a text file and then opened it with Excel. I used features in Excel to re-organize the ‘Zonal Statistics’ table output and to calculate percentages. Figure 6-25 displays my spreadsheet version of this table.

Page 189: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

172

Figure 6-25. Acres and percent of total site acreage with slopes less than 3 degrees.

Using the data in the last column of this table, it is relatively easy to rank the sites in order of preference related to less than 3 degree slope. The higher the percentage of less than 3 degree slope, the more suitable. The sites rank from best to worst as follows: 1, 8, 2, 6, 9, 3, 7, 5, 10, 4. Criterion 9: The viewing of these land use classes in the foreground and middle-ground will be minimized: industry, commercial, mineral extraction, utilities. This criterion will be used to compare parcel choices The viewshed, or area that can be seen, from each of the ten open space land use sites will be calculated. A centroid point in each site will serve as the observation point for the viewshed determination. The foreground, middle-ground, and background visual zones surrounding each site (observation point) will be delineated using distance definitions for the three zones. A summary table will be prepared listing the acres for industry, commercial, mineral extraction, and utilities land uses in the viewshed for each site and by the three distance zones. This analysis will be a worst-case analysis because vegetation will not be a factor. The delineated viewshed will be larger in size compared to the same viewshed delineated taking vegetation heights into consideration. Vegetation heights tend to shield or block views. There is not an easy way to select an observer point. An approach involving elevation, aspect, roads, etc., could be developed. Rather than develop a complex approach, I am going to use the Shapes-Polygons/Polygon Centroid module. This module will determine a centroid point or mean center for each site. This point is calculated using the site x and y boundary coordinates. One advantage of using a centroid is that the identification procedure for the centroid will be consistent for all sites. Figure 6-26 displays the settings used for this execution. A note of caution. Using the centroid approach with these polygons produced acceptable observation points. However, some polygon shapes could result with a centroid outside of the polygon.

Page 190: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

173

Figure 6-26. The settings for the Shapes-Polygons/Polygon Centroid module.

The single input is the polygon shapes data layer with the sites as polygon objects. This is layer ‘GVOpSpPoly’. The output point shapes data layer containing the centroid points will be renamed ‘GVOpSpObserve’. Figure 6-27 displays a zoomed in portion of the output for the centroid in site number 9. The ‘GVOpSpPoly’ shapes data layer is overlain on the point layer in the figure.

Figure 6-27. A zoomed in view of the centroid (red dot) in site #9.

The following discussion will focus on how a single site is processed. The procedures described were applied to all of the sites.

Page 191: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

174

The Terrain Analysis-Lighting, Visibility/Visibility (single point) [interactive] module is used to calculate areas that can be seen from an observation point. A digital elevation model (DEM) provides the model for the topography. The name of the existing DEM for the county is ‘MasonDEM’. The DEM is displayed in Figure 6-28 with the ‘GVOpSpObserve’ point and ‘GVOpSpPoly’ polygon shapes data layers overlain.

Figure 6-28. The observer point shapes data layer displayed with the DEM grid data layer.

The settings for executing this interactive module are displayed in Figure 6-29. The interactive part of this module is collecting the x and y coordinate for the observation point. I will use the ‘GVOpSpObserve’ point shapes data layer as the source for the observation point coordinate. As noted above, Figure 6-28 displays the point shapes data layer overlain on the ‘MasonDEM’ grid data layer. This map view window can be displayed before executing the Terrain Analysis-Lighting, Visibility/Visibility (single point) [interactive] module or after. The on-screen point digitizing described below uses this map view window.

Page 192: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

175

Figure 6-29. The settings for the Terrain Analysis-Lighting, Visibility/Visibility (single point) [interactive] module.

The ‘MasonDEM’ grid data layer has been chosen for the ‘>>Elevation’ parameter. The ‘Height’ parameter is for specifying the height of the observation point above the terrain. I am placing this observer 5’ above the terrain. The ‘Unit’ parameter is for choosing the method. The “Visibility” method is one of four options supported. When the ‘Okay’ button is clicked on, the module begins execution. After execution is started, before the module can start delineating the viewshed or seen area for the observation point, you must digitize, on-screen, the location of the observation point. The ‘Action’ tool ( ) on the Tool Bar is used for digitizing this point. Once the ‘Action’ tool is chosen, the mouse pointer turns into a plus symbol with a lower-case ‘i’ at the bottom right. I am going to move the ‘Action’ tool pointer over the observation point that is the source of the viewshed for this execution. In order to make it easier to “digitize” the observer point location, I zoom in on the point in the map view window displayed in Figure 6-28. With the ‘Action’ tool positioned on the zoomed in point, I click the left button of the mouse. The x and y coordinate pair for the point is collected and passed to the module. Note that any grid data layer can be used as the coordinate source for the digitized point. It is best to use a layer that will provide detail if you zoom in on where the observer point is located. The module proceeds to calculate and delineate the area that can be “seen” from the observer point. The output ‘Visibility’ grid data layer will automatically pop up as a map view window when the calculation ends (you can view the progress of the calculation at the bottom right of the work space window). Even though the delineation of the seen area is complete, the module is still running. You can end the program execution by choosing

Page 193: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

176

the module a second time or you can click on the ‘Modules’ title on the Menu Bar and click on the module name toward the bottom of the pop-up list of options. You will see a check mark to the left of the module name. When you click on the module name the check mark will disappear (it also disappears if you use the ‘Modules’ pop-up list approach). If you have the module selected for display in the ‘Object Properties’ window, you can also stop execution by clicking a second time on the ‘Execute’ button at the bottom of the ‘Settings’ tab display. The delineated viewshed is for the observer point in site number 1. I rename the ‘Visibility’ grid data layer to ‘Site01Vis’. The three distance zones, foreground, middle-ground, and background are delineated using the Grid-Tools/Grid Buffer. Before the three zones can be delineated for site number 1, the point shapes data layer with the point objects representing the observers must be converted from its vector format to raster, i.e., to a grid data layer. The Grids-Gridding/Shapes to Grid module is used for that conversion. The new grid data layer is named ‘GVOpSpviewers’. Each observer point also must be in a grid data layer as the only “feature” on the layer, i.e., all other cell data values should be “no data”. I use the Grid Calculator module to create ten new grid data layers, one for each observer point. The layer for observer number 1 is named ‘Viewer01’. Now I can develop the grid data layer for the observer point that identifies three distance zones around the point: foreground, middle-ground, and background.

Page 194: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

177

The Grid-Tools/Grid Buffer module is executed once for each of the three zones. The distance for the foreground is from the observation point to ½ mile or 2640’. The middle- ground is from ½ mile to 3 miles or 2640’ to 15840’. Background is from 3 to 6 miles (15840’ to 31680’). The output grid data layer from each of these executions uses a ‘1’ data value for the “buffer”. The Grid Calculator is used to add the three layers creating a fourth one that has three data values: 3 for the foreground zone, 2 for the middle-ground zone, and 1 for the background zone. The settings for the Grid-Tools/Grid Buffer module for calculating the foreground zone are displayed in Figure 6-30.

Figure 6-30. An example of the settings for the Grid-Tools/Grid Buffer module.

The ‘Viewer01’ grid data layer containing a single feature (one grid cell with a data value of 1) is chosen for the ‘>>Features Grid’ parameter. The ‘Buffer Distance’ option has two choices, “Fixed” or “Cell Value”. The “Fixed” option is chosen. The width of the buffer is a specified distance. The distance is entered in the ‘Distance’ parameter value field: 2640. This is feet and represents the ½ mile width of the foreground. As noted earlier, this module is executed three times for each observer point, once for each of the distance zones. Two changes are made for the second execution of the module. The “[create]” option for the ‘<<Buffer Grid’ is chosen and the number for the ‘Distance’ parameter is changed to 15840. The third execution needs the same two changes with the only difference being the distance value will be 31680. Figure 6-31 displays the Grid Calculator settings for adding the three grid data layers into a single grid data layer with the three zones as data values 1, 2, and 3.

Page 195: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

178

Figure 6-31. The Grid Calculator settings for creating the foreground, midground, background grid data layer for observer point 1.

The grid data layers chosen for the ‘>>Grids’ parameter are temporary, interim layers that were generated for the three distance zones. The output grid data layer from execution of the Grid Calculator was renamed ‘Vzones01’. The ‘Vzones01’ grid data layer is displayed in Figure 6-32 with the ‘GVOpSpPoly’ and ‘MasonGV’ polygon shapes data layers overlain.

Figure 6-32. The ‘Vzones01’ grid data layer displaying the three distance zones for observer point 1.

The next processing step is to develop a grid data layer for observation point number 1 that shows the foreground, middle-ground, and background areas within its seen area (i.e., the viewshed). The seen area for observation point number 1 is the grid data layer ‘Site01Vis’ (Figure 6-33).

Page 196: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

179

Figure 6-33. The viewshed grid data layer for observation point number 1.

The areas that can be seen are in blue. The ‘GVOpSpObserve’ and ‘MasonGV’ shapes data layers are overlain. This seen area is for observation point 1. The Grid Calculator will be used to produce a grid data layer for observation point number 1 showing foreground, middle-ground, and background areas of the seen area or viewshed. Figure 6-34 displays the settings used to produce this new grid data layer.

Figure 6-34. The Grid Calculator settings used to produce a seen area grid data layer showing foreground, middle-ground, and background areas.

Page 197: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

180

The output grid data layer produced by these settings is displayed in Figure 6-35.

Figure 6-35. The output grid data layer showing foreground, middle-ground, and background areas for the viewshed for observation point number 1.

The output grid data layer will be re-named ‘SeenZones01’. The above set of procedures was applied to each observation point. The last set of grid data layers, ‘SeenZones*’, are used with the Geostatistics-Grids/Zonal Grid Statistics module to develop the data for the table listing acres for land uses (industry, commercial, mineral extraction, and utilities) by the three distance zones (foreground, middle-ground, and background). There will be one table for each of the three distance zones. The tables are displayed in Figure 6-36.

Figure 6-36. The visual impact tables.

Page 198: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

181

Site number 5 is the only one of the ten sites from which an “incompatible” land use is visible in the foreground. Site number 8 can see more “incompatible” land use acres in the middle-ground than any of the other sites. There are more acres visible in the background from site number 10. Discussion of Results Criterion 1: Identifying the boundary for Grapeview. The boundaries for the Grapeview Fire District and Grapeview School District were merged together to define a physical boundary for the hamlet of Grapeview. Criterion 2: Identifying Open Space land use in Mason County and Grapeview. The land use map for Mason County includes the category of land use “Open Space”. This map is available as a grid data layer. The Grapeview hamlet polygon shapes data layer was converted to a grid data layer. The output from this process was a grid data layer for the Grapeview hamlet that identifies all the open space areas in the hamlet. Criterion 3: Open space parcels must be a minimum size of 5 contiguous acres. The Grid-Filter/Filter Clumps module was applied to the grid data layer for the Grapeview hamlet to remove from consideration groups of open space less than 5 acres in size. The output from this process was similar to Criterion 2 with the exception that only groups of open space 5 acres or larger are on the output grid data layer. There are 10 groupings of cells that meet this criterion. Criterion 4: Open Space land parcels with road access. Road access is access by paved or gravel road up to the boundary of the open space area or into the area. This could have been determined visually but tools in SAGA were used to make the determination. The area referred to as site #4 is the only one of the 10 sites without road access. Criterion 5: The park parcel cannot be adjacent to these land uses: industry, commercial, mineral extraction, and utilities. A table was developed identifying adjacent land use categories for each open space site. Site #5 is adjacent to a utility land use. This is the only site adjacent to an incompatible land use0. Criterion 6: The park parcel may be adjacent to these land uses: agriculture, commercial recreation, public, rural and residential. Using the total boundary length for each site, the percent of land use, by length, was determined. Using percent, Site #5 is adjacent to more of these land uses than any of the sites followed by #10, #8, #4, #2, #3, #7, #6, #9, and #1. Criterion 7: The park is most suitable adjacent to these land uses: open space, forest, rural, and water.

Page 199: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

182

Using the total boundary length for each site, the percent of land use, by length, for the sites was determined. Using percent, site #4 is adjacent to more compatible land uses followed by #6, #9, #7, #1, #2, #3, #10, #5 and #8. Criterion 8: The highest amount of ground surface with slopes between 0 and 3 degrees. The Geostatistics-Grids/Zonal Grid Statistics module was used to develop a table displaying the acres of slope less than 3 degrees and the percent of area for each site with slopes less than 3 degrees. Parcels with higher percentage of low slopes are more suitable for a park. The sites rank from best to worst as follows: 1, 8, 2, 6, 9, 3, 7, 5, 10, and 4. Criterion 9: The viewing of these land use classes in the foreground and middle-ground will be minimized: industry, commercial, mineral extraction, utilities. This criterion will be used to compare parcel choices. The only site determined to have an “incompatible” land use visible in the foreground was site #5. More “incompatible” land use acres in the middle-ground are visible from site #8 and in the background from site number 10. The community park committee was able to clearly eliminate site #’s 4 and 5 from consideration. The results of applying the other criteria helped them become familiar with the available open space areas and the environmental situation of each site relative to the other sites. They realize that they need to develop criteria that can be combined together and produce an integrated set of values to base a decision. A first attempt at accomplishing this involved assigning weights based on the criteria. The attribute table linked to the ‘GVOpSpPoly’ polygon shapes data layer was opened with an older version of the Microsoft Excel program. Attributes were added for criteria 4 through 9. This could have been done using tools in SAGA supporting tables, but it was felt it might be easier using Excel. The committee decided to use a weighting scheme for each criteria based on 0 through 100, with 100 being the best. They reviewed the results of applying the various criteria and assigned weights to each site accordingly. Figure 6-37 displays this portion of the attribute table.

Page 200: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

183

Figure 6-37. Weights assigned to the sites based on applying the criteria.

The first column displayed on the left is the site number. Criteria 9 involved the three visual zones (foreground, middle-ground, and background). Rank weights were assigned for each zone and then averaged for the site. The Grid – Gridding/Shapes to Grid module was then used to create a grid data layer for each criteria using the “weights” as data values. Figure 6-38 displays the settings page used for creating the grid data layer for criteria #4 (the layer was renamed ‘GVrec4’).

Figure 6-38. The Grid – Gridding/Shapes to Grid module settings page for creating the grid data layer for criteria #4.

You can see that the ‘GVOpSpPoly’ polygon shapes data layer is chosen for the ‘>>Shapes’ parameter and the attribute for criteria #4 (“CRIT4”) is chosen for the

Page 201: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

184

‘Attribute’ parameter. Using the same module, a new grid data layer was developed for each criteria. The Grid – Calculus/Grid Calculator module “integrated” the six new grid data layers into a single data layer using a simple addition equation and dividing the sum for each grid cell by 6 (the number of grid data layers). Figure 6-39 displays the Grid Calculator settings for this step.

Figure 6-39. Using the Grid Calculator to display a composite score for all criteria for each site.

The six criteria grid data layers are chosen for the ‘>>Grids’ parameter. The equation refers to the six layers using letters “a” through “f”. After adding the six data values together, the sum is divided by six to determine the overall average for each site. Figure 6-40 displays the output grid data layer from the Grid Calculator execution.

Page 202: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

185

Figure 6-40. The site grid data layer displaying the average weight for each site.

Using this approach the preferred site for a park is #6 followed by 2, 1, 7, 8, 9, 3, 10, 4 and 5. The final weights for each site are displayed in the legend for the map in Figure 6-40. Their initial application of SAGA to help them explore criteria has been successful. They are starting to understand that they need to refine their preferences within a criterion as well as between criteria. Based on the descriptions included in SAGA, other modules they intend to explore, to refine their results and improve the analysis, include the Grid – Analysis/Analytical Hierarchy Process and Ordered Weighted Averaging (OWA). Summary SAGA modules have been applied to provide outputs in support of hypothetical criteria for evaluating proposed community park sites. The same modules as well as others not used in this example could probably be applied more efficiently. As you become familiar with how to use a module you often discover more effective analysis approaches; approaches that save time or ones that produce more specific results.

Page 203: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

186

Chapter 7 – Using SAGA With Digital Satellite Images The topic of this chapter is using SAGA functions and modules to accomplish standard tasks related to digital satellite imagery. There are core functions related to the display of grid data layers that lend themselves also to the display of digital satellite imagery. Several of the module libraries contain modules developed for use with remotely sensed data. In addition, there are modules developed as utility tools that can effectively be used with image data. This chapter will expose you to six specific areas related to the display and processing of digital imagery, and more specifically, digital satellite imagery. This does not mean the discussion does not have relevance with non-image grid data layers, it just means the focus in this chapter will be on the use of SAGA modules with digital satellite imagery. The six sections in this chapter, and the modules addressed in each, are: Contrast Enhancements Contrast enhancements are techniques used to change the way the information contained in an image displays. The goal is to alter image contrast or use color to emphasize a particular characteristic or information category of interest. Filters Filters are used to selectively emphasize or de-emphasize information in an image. Grid – Filter/User Defined Filter (3 x 3) Grid – Filter/Simple Filter Grid – Filter/Gaussian Filter Grid – Filters/Laplacian Filter Grid Calculus/Grid Calculator Grid – Filters/Majority Filter Ratio Images A ratio image is an image created by dividing the image pixel values of one satellite band by the corresponding image pixel values of another band in the same scene. In SAGA, image bands become grid data layers and pixels become grid cells. Grid – Calculus/ Grid Calculator Shapes – Tools/Create New Shapes Layer Shapes – Grid/Get Grid Data for Shapes Composite Images You can create a composite image by assigning combinations of spectral ranges or bands to the primary display colors red, green, and blue (RGB). Basically, creating a color composite is an enhancement involving multiple bands rather than a single band. Grid – Visualisation/RGB Composite Vegetation Indices

Page 204: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

187

Vegetation indices are used with multi-spectral imagery to estimate the likelihood or probability that vegetation was actively growing at a particular location when vegetation reflectance values were collected. Grid – Calculus/Grid Calculator Image Classification Image classification is the process of converting continuous reflectance values into data categories. This process is commonly associated with multi-spectral satellite digital imagery but can also be applied to non-image grid data layers. Imagery - Classification/Cluster Analysis for Grids Imagery - Classification/Supervised Classification Shapes-Tools/Create New Shapes Layer Much of the content in this chapter is derived from the module documentation you can view in Volume 3 of this updated User Guide for SAGA 2.0. If you seek more detailed information on how to execute a particular module used in this chapter, it is likely that you can locate the module documentation in Volume 3. Imagery Background Information The sensor on board the Landsat-7 satellite is the Enhanced Thematic Mapper Plus (ETM+) that was constructed by Santa Barbara Remote Sensing under contract to NASA. This sensor was a variation of the Thematic Mapper flown on Landsats 4 and 5. A Landsat-7 scene covers 185 km on a side. The spectral bands, spectral bandwidths, and resolution for the ETM+ sensor are listed here. Band # Bandwidth (μm) Name Resolution Band 1 0.45 – 0.52 Blue 30 m Band 2 0.53 – 0.61 Green 30 m Band 3 0.63 – 0.69 Red 30 m Band 4 0.78 – 0.90 Near IR 30 m Band 5 1.55 – 1.75 Mid-IR 30 m Band 6 10.4 – 12.5 Thermal IR 60 m Band 7 2.09 – 2.35 Mid-IR 30 m Band 8 0.52 – 0.90 Panchromatic 15 m Band 6, the thermal IR band, includes both high and low gain settings. Band 8, the panchromatic band, covers most visible to near-IR in a single band. The ground resolution for data collection (except for bands 6 and 8) is 30 meters. This means that the ETM+ sensor records 6 spectral values for each 30-meter “area” on the earth’s surface it passes over. Three of these values are reflected visible light (i.e., blue, green and red). Three of the values are reflected invisible infrared light (i.e., near IR and two in the mid IR range). A seventh value is for emitted thermal infrared. This value can be associated with ground temperature levels providing ground truth is available. The

Page 205: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

188

ground resolution for the thermal infrared band (6) is 60 meters. The eighth band is for reflected light from visible blue through visible red through near infrared. The ground resolution for band 8 is 15 meters. The Olympic Peninsula Landsat Scene The Olympic Peninsula Landsat scene is displayed on the left in Figure 7-1. The date of this scene is September 22, 2001. A sub-scene of this scene was created that covers Mason County, Washington. The sub-scene area is displayed on the right. The polygon shapes data layer for Mason County is displayed with the red boundary on both the full scene and sub-scene.

Figure 7-1. The full Olympic Peninsula Landsat scene (on left) and Mason County sub-scene on right.

Descriptive information comparing the full scene and sub-scene is displayed in Figure 7-2. Full Scene Sub-scene # of cells 8341 (x) * 7441 (y) = 62065381 1872 (x) * 2032 (y) = 3803904 Cell size 30 meters 30 meters West-East 345615 – 595815 = 250200 460552 – 516682 = 56130 South-North 5141985 – 5365185 = 223200 5213286 – 5274216 = 60930 Mem. Size 59.190MB 3.628MB

Figure 7-2. Comparing information for the full scene and sub-scene.

The sub-scene is one of two sub-scenes that will be used in many of the examples in this chapter. The full scene contains too much data for effective use with my desktop system. The sub-scene is much smaller in data volume at less than 1/10th the size of the full scene. The Central Arizona Landsat Scene The second scene is one that covers the central east portion of the state of Arizona. This scene was captured on September 26, 1999. The full central Arizona Landsat scene is displayed on the left in Figure 7-3. A polygon shapes data layer for the sub-scene boundary is overlain using red for the boundary on both the full scene and sub-scene.

Page 206: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

189

Figure 7-3. The full central Arizona Landsat scene (on left) and sub-scene on right.

Descriptive information for the full scene and sub-scene is displayed in Figure 7-4. Full Scene Sub-scene # of cells 8081 (x) * 7061 (y) = 57059941 2595 (x) * 2437 (y) = 6324015 Cell size 30 30 West-East 558615 – 801015 = 242400 628995 – 706815 = 77820 South-North 3725985 – 3937785 = 211800 3757425 – 3830505 = 73080 Mem. Size 54.417MB 6.031MB

Figure 7-4. Descriptive information for the full scene and sub-scene.

The sub-scene for Arizona is little larger than the Mason County sub-scene for the Olympic Peninsula but still significantly smaller in memory space than the full scene. These two satellite images provide coverage of two very different geographic areas. The Olympic Peninsula of Washington State includes the Olympic Mountains, the Olympic National Park, the Olympic National Forest, the Olympic rain-forest, a portion of the Pacific Ocean coastline, the Straits of Juan de Fuca and portions of Puget Sound. It has a moderate mid-latitude west coast climate, etc., having some precipitation extremes. Vegetation ranges from lowland to higher elevation conifer forests to tundra in the higher elevations of the Olympics. The slender fingers of the Puget Sound achieve their southern-most reach toward the capital city of the state of Washington (Olympia). East of the peninsula, on the eastern edge of the image, is the large metropolitan area consisting of the cities of Olympia-Tacoma-Seattle-Everett (from south to north). The majority of the population of Washington State resides in this urban environment. In contrast to the Olympic Peninsula is the central east Arizona sub-scene. The area it covers is semi-arid and generally high-elevation that includes portions of the Little Colorado Plateau and the White Mountains. Much of the landscape is above 7000’ of elevation and characterized as being “above” the rim, i.e., the Mogollon Rim that crosses Arizona in generally an east-west direction. One of the largest expanses of Ponderosa Pine forest is found in this area. The lower elevations are used for open range for cattle

Page 207: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

190

grazing, although vegetation is quite sparse. There are some open range areas where it takes over 20 acres to support one animal. Higher elevations support mixed conifer forests; lower elevations support pinyon and juniper. Sparse population is the rule. The twin-cities of Eagar and Springerville have a total population of around 6000. The area is roughly equidistant between Albuquerque, New Mexico and Flagstaff and Phoenix, Arizona; literally three or four hours driving time to anywhere. The Apache-Sitgreaves National Forests dominate the vegetated areas with over 2 million acres, the majority covered by this sub-scene. Contrast Enhancements Contrast enhancement is often necessary and essential to visual analysis involving digital satellite imagery. The topics in this chapter all fit within the general definition of contrast enhancement to support interpretation of digital imagery. They all assist in visually interpreting digital imagery. The simplest of the techniques involve the stretching of the data value range or “slicing” of the data value range so that certain features in the image can be more easily distinguished from their surroundings. There is basic descriptive statistical information available for all grid data layers in SAGA. The first place to view this basic information is using the ‘Description’ tab at the bottom of the ‘Object Properties’ window for an active grid data layer. For example, Figure 7-5 displays the descriptive information available for the grid data layer containing spectral reflectance data for band 3 of a Landsat TM sub-scene.

Page 208: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

191

Figure 7-5. Basic descriptive information for a grid data layer containing spectral data for band 3 of a Landsat TM sub-scene.

Three pieces of information, in Figure 7-5, important to contrast enhancement, are the ‘Value Range’, ‘Arithmetic Mean’, and ‘Standard Deviation’. Referring to Figure 7-5, the ‘Value Range’ defines the minimum and maximum data values for data in the grid data layer. In this case, the grid data layer contains values for spectral reflectance in band 3. You can see that the range is 238 when the minimum data value is 16 and the maximum value is 254. The possible range for the data is 256 since the lowest possible reflectance value is 0 and the highest is 255. The ‘Arithmetic Mean’ and ‘Standard Deviation’ statistics explain the distribution of the data values around the arithmetic mean for the data values. These two statistics can be of more value than the ‘Value Range’. In the case of reflectance values, the distribution is assumed to be a normal distribution. Certain assumptions are valid with a normal distribution of data. Approximately 68% of the data values, in a normal distribution, will be within plus or minus 1 standard deviation of the arithmetic mean. Using this example means that 68% of the data values will be within the data range of 20.66 to 36.83. Eighty-seven percent of the data values will be within 1.5 standard deviations of the mean. Further, approximately 95.45% of the data values will be within plus or minus 2 standard deviations of the arithmetic mean, i.e., within the data range of 12.57 to 44.92. Viewing the descriptive statistics in Figure 7-5, we can see that the lower value for the plus or minus 2 standard

Page 209: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

192

deviation range is below the minimum data value for the data. This means the data values for the grid data layer are skewed toward the lower end of the distribution.

Figure 7-6. The histogram for spectral reflectance values for band 3 (grid data layer ‘MCL720020922_3’).

The histogram for band 3 reflectance values displayed in Figure 7-6 supports the conclusion that the data values are skewed to the lower end of the value range. The form of the histogram also approaches the form for a normal distribution, i.e., a bell-shaped curve. Figure 7-7 displays a tabular version of the histogram.

Page 210: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

193

Figure 7-7. A portion of the tabular version of the histogram in Figure 7-6.

Using the full table of the tabular data of the histogram, we can do a quick check to see what the approximate percentage is for data values falling within 2 standard deviations of the mean. This will be the total count from row 1 in the table to row 31 divided by the total number of cells in the table. The percentage comes out to 94.9%. That is fairly close to the prediction of 95.45%. There are statistical tests that can be applied to test this conclusion. This helps us to understand the overall data distribution. It means that a very small portion of the data values range between 44 and 254 data values.

Page 211: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

194

SAGA has some basic functions in its’ core software that can be used to change the visual appearance of a grid data layer. These core functions do not change data values; rather, they change the appearance of the data through the use of color methods using knowledge of the arithmetic mean and standard deviation of the data distribution. Several of these functions are accessible in the ‘Classification’ sub-menu when you right-click with the mouse on the grid data layer name appearing in the ‘Data’ tab area of the Workspace. Figure 7-8 displays the ‘Classification’ sub-menu.

Figure 7-8. Functions available in the ‘Classification’ sub-menu.

Create Normalised Classification This option applies a normalization routine to the data range and produces a lookup table using a normalized distribution. The normalized classification applies a contrast stretch emphasizing the portion of the spectrum having the majority of the data. The “Lookup Table” option in the Display: Color Classification: Type setting must be chosen and the ‘Apply’ button clicked on (at the bottom of the ‘Object Properties’ window) in order for the effect of the normalized lookup table to be viewed. The “normalized” table can be reviewed by clicking on the Display: Color Classification: Lookup Table: Table: Table (columns…) setting. When the ellipsis appears, click on it and the table will display in the work area.

Page 212: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

195

Figure 7-9. Comparing corresponding zoomed in areas on the input and output following applying the ‘Create Normalised Classification’ option to a grid data layer.

The data values do not change. The colors assigned to various ranges of data values change. Create Lookup Table The second option in the ‘Classification’ sub-menu, ‘Create Lookup Table’, builds a color look-up table for displaying the data values for the grid data layer. When you choose this option, the ‘Create Lookup Table’ window in Figure 7-10 appears.

Figure 7-10. The ‘Create Lookup Table’ window.

The output using the setting for the ‘Create Lookup Table’ in Figure 7-10 is displayed in Figure 7-11. Again, the data values do not change; the colors assigned for displaying the data value change because of the new lookup table color assignments.

Page 213: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

196

Figure 7-11. Comparing zoomed in portions of input and output grid data layer after using the ‘Create Lookup Table’ option.

The entry to the right of the ‘Colors’ parameter (in Figure 7-10) displays the thumbnail representation of the selected color palette that will be used for the color assignments. The number displayed, in this example it is 100, is the number of classes the data values will be divided. A different number can be entered. First click in the value field to the right of the ‘Colors’ parameter. Next, click on the ellipsis on the right side of the value field. The ‘[CAP] Colors’ window in Figure 7-12 will display.

Figure 7-12. The ‘[CAP] Colors’ window.

Page 214: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

197

When you click on the ‘Count’ button (see Figure 7-12) an ‘Input’ window will appear allowing you to change the ‘Count’ numeric value to a new value. This is the parameter that controls the number of classes that the lookup table will contain. Using an entry of 100 means that the range of data values will be divided into 100 classes of equal intervals. Thus, if the data range is from a minimum value of 16 and a maximum value of 254 the range is 238. Dividing 238 by 100 means that there will be 100 classes and each class interval will be 2.38 data values wide. Figure 7-13 displays the first few records of the lookup table created using the setting in Figure 7-10.

Figure 7-13. A portion of the lookup table created using an entry for the ‘Count’ parameter of 100.

The lookup table is accessible in the ‘Settings’ tab section of the ‘Object Properties’ window for the grid data layer. The table displays when you click with the mouse pointer on the ellipsis that appears to the right of the Lookup Table: Table: Table (Columns …) parameter in the settings. Looking at the table in Figure 7-13, you can see that the class interval for each of the classes is 2.38 data units. This approach is a very versatile function for contrast or density slicing. Let’s look at another example. In this example, I will use a grayscale tone palette and change the entry for the ‘Count’ parameter to 20. The new ‘Count’ entry means that each class interval will be 23.8. Figure 7-14 displays corresponding zoomed in areas of the before and after views of the grid data layer. Figure 7-15 displays a portion of the lookup table created using the grayscale palette and a ‘Count’ entry of 20.

Page 215: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

198

Figure 7-14. Comparing zoomed in portions of the before and after grid data layers using a grayscale palette option with 20 classes.

Looking closely, you can see more detail in the before display. The before display uses 238 of the available 256 grayscale levels to display data values. The after display uses 20 grayscale levels (or classes) to display the data values. You can see the subtle differences in the two displays. The one on the right does not smoothly display gradations between values. This is because the display classes have been generalized from 238 classes to 20.

Figure 7-15. The lookup table created using an entry for the ‘Count’ parameter of 20.

Page 216: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

199

This is a flexible tool for automatically assigning a palette of colors (or as in the example above, grayscale tones) to a range of data in a grid data layer. Once the lookup table has been created, you can make further changes. The lookup table information can be modified when you display the table.

Figure 7-16. Adding color to the grayscale lookup table.

Here is an example where I created a grayscale lookup table with 40 display classes. Figure 7-16 shows the upper portion of the lookup table where I added color to the first four classes (these four classes account for approximately 95% of the grid data values).

Figure 7-17. Comparing the original grid data layer with the one using the modified lookup table.

Page 217: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

200

It is easy to see how this function can be used to emphasize specific data ranges in a grid data layer using the lookup table. The color assigned to a class can easily be changed. You can also change the class intervals by editing the values that were automatically selected for class “Minimum” and “Maximum”. Set Range to Minimum/Maximum Set Range to Standard Deviation (1.5) Set Range to Standard Deviation (2.0) These three options are used to set the minimum and maximum data values that display for a grid data layer. The first option uses the actual minimum and maximum of the data range to establish the display range for the layer. When you choose this option, all data values are displayed. The options using 1.5 and 2.0 standard deviations will set the minimum and maximum data values for display based on the distribution of the data around the arithmetic mean. Using ‘Set Range to Standard Deviation (1.5)’ will identify a minimum data value that is the arithmetic mean minus 1.5 times the standard deviation. The maximum data value to display will be the arithmetic mean plus 1.5 times the standard deviation. For example, using the earlier example (the grid data layer for the spectral reflectance values for band 3 of a Landsat sub-scene), the arithmetic mean for the data is 28.74 and the standard deviation is 8.09. One and a half times the standard deviation (8.09) is 12.135. This means that the display range, when this option is selected, will include data values between 16.61 and 40.88. Data values below this range will be displayed using the palette color on the far left of the ramp and values above this range will use the palette color on the right of the ramp. The same approach is used with the ‘Set Range to Standard Deviation (2.0)’ option. Any one of the three options can be set as the default ‘Display Range’ parameter for viewing grid data layer values. This parameter is set when you click on the ‘Data’ title in the ‘Data’ tab area of the Workspace. The settings for ‘Data’ will display in the ‘Object Properties’ window in the ‘Settings’ tab area. Toward the bottom of the settings is an area titled “Grid Display Defaults” with a parameter named ‘Display Range’. When you click with the mouse pointer positioned in the value field, the list of three options displays. You choose the option you prefer by moving your mouse pointer over the option and click the mouse button. This option will remain in effect until you change it again and is retained from one work session to the next. Additional functions for changing the appearance of data values using color methods are located in the grid data layers ‘Object Properties’ window. The Display: Color Classification: Type section options are accessed using the ‘Settings’ tab portion of the ‘Object Properties’ window. Most of the options for ‘Type’ can be used for changing the visual appearance of a grid data layer. Two of these options are particularly relevant for use with digital satellite grid data layers. These are “Shade” and “RGB Overlay”.

Page 218: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

201

Shade The “Shade” ‘Type’ has eight color choices that can be used with grid data layers. While all of the options can be used for data display, the first two are grayscale options that can be useful for displaying spectral reflectance using 256 levels of gray. These choices are “bright-dark” and “dark-bright”. The “bright-dark” choice assigns white to the “0” data value, “255” to the black value and distributes values in-between in gray scale levels from white to black. The “dark-bright” choice inverts the display. That is, the “0” value is assigned to black, the “255” value to white and values in-between are assigned to gray levels from black to white. These two choices are the equivalent of assigning a grayscale palette for the Graduated Colors: Colors setting. Figure 7-18 displays band 4 of a Landsat TM sub-scene using these two “Shade” ‘Type’ choices.

Figure 7-18. The “bright-dark” shade choice on the left and “dark-bright” on the right using band 4 of a Landsat TM sub-scene.

In Figure 7-18, the map view on the left uses the “bright-dark” shade ‘Type’ choice and the one on the right the “dark-bright” choice. RGB Overlay The other option, in the Display: Color Classification: Type setting, of interest is “RGB Overlay”. This is a relatively quick and easy way to display a color composite without creating a new grid data layer for a color composite. When you choose the “RGB Overlay” option, information identifying grid data layers to assign to the primary colors (red, green, and blue) must be entered in the ‘RGB Overlay’ section of the settings. Figure 7-19 displays the ‘RGB Overlay’ section of the grid data layer settings. The option chosen in the value field to the right of the ‘Coloring’ parameter determines assignment options for “this”, ‘>Overlay 1’ and ‘>Overlay 2’. The ‘Coloring’ parameter has six choices. The one displayed in Figure 7-19 means that the ‘R’ or red portion of ‘RGB’ is assigned in the “composite” display to the current grid

Page 219: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

202

data layer. The ‘Overlay 1’ and ‘Overlay 2’ settings are where you choose the grid data layers that will be assigned to the ‘G’ or green color and the ‘B’ or blue color for the RGB overlay or composite. The other five choices for ‘Coloring’ are variations of the combinations and dependent on the “this” or active layer. In this example, I am using the default choice: “red=this, green=1, blue=2”. The color red is assigned to the active grid data layer. This is the data layer with its settings displayed in the ‘Object Properties’ window.

Figure 7-19. Example settings for “RGB Overlay”.

Figure 7-20 (on the left) displays the composite display using the settings in the ‘RGB Overlay’ section in Figure 7-19. The active grid data layer happens to be band 4 (near infra-red spectral reflectance). The composite on the right was produced with the Grid – Visualisation/RGB Composite module.

Figure 7-20. Example composite display using the “RGB Overlay” choice.

Both of the composites in Figure 7-20 use band 4 for the red color, band 3 for the green color, and band 2 for the blue color. This combination of band assignments is referred to as a false color infra-red (FCIR) composite. It is one of the more popular satellite image composites. The two composites were generated using the same spectral bands for input assigned to the same RGB colors. You can see that there are some visual similarities. For example, vegetation in both composites has a red tint. The composite on the right is an output grid data layer from the Grid – Visualisation/RGB Composite module. The module has more functionality for applying a contrast stretch to each input band during the composite

Page 220: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

203

creation process. The ‘RGB Overlay’ setting is quick and easy but you have very little control for improving the visual display other than for assigning the grid data layers to the three colors. The ‘RGB Overlay’ image looks too bluish. None of the display options explained in this section change data values (except the RGB Composite module referred to above). The options are used to change the visual appearance of a grid data layer with the intent of making it easier to visually interpret or to isolate a feature or features of interest. Filters A filter is applied to a grid data layer (for example one that represents an image) to create a new image by applying a mathematical function on the original grid cell data values and their neighbors to calculate new values. The objective of the function is determined by the values stored in a template or kernel. Kernels will normally be a 3 x 3, 5 x 5, or 7 x 7 or larger (but generally always symmetrical) matrix of cells. The kernel moves from cell to cell. It is centered over each grid cell as it is processed and a new value for the central cell is computed from all cells within the kernel. Mean Filter One of the least complex filters is the mean filter. The mean filter tends to smooth data by removing noise such as speckles in digital image data by averaging the values for a neighborhood of cells. I will use the Grid – Filter/User Defined Filter (3 x 3) module to introduce you to the mean filter. Figure 7-21 displays the settings page for this module.

Figure 7-21. The settings page for the User Defined Filter (3 x 3) module.

The grid data layer containing the spectral values for band 1 for the Mason County Landsat sub-scene has been chosen for the input ‘>>Grid’ parameter.

Page 221: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

204

The 3 column by 3 row table representing the ‘Filter Matrix’ parameter is where you enter values for the kernel. In this case, for a filter to calculate the mean of a central cell, the 3 x 3 kernel is loaded with 1’s. This means that each cell value in the 3 x 3 kernel receives equal weighting. The grid cell data values for the 9 cells identified by the kernel will be totaled and divided by 9, the result being the mean for the 9 cells. The data entered for the ‘Filter Matrix’ parameter is displayed in Figure 7-22.

Figure 7-22. The ‘Filter Matrix’ parameter with values to calculate mean for the User Defined Filter (3 x 3) module.

Figure 7-23 displays a zoomed in portion of the input grid data layer and the corresponding area on the output ‘filtered grid’.

Figure 7-23. Comparing zoomed in areas of the input and output grid data layers.

Page 222: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

205

Let’s look at the 9 grid cells on the top left of the display. The input grid data layer values are 60, 53, 51, 58, 53, 51, 53, 51, and 50. The center cell is the one in the second row with the value 53. The 9 grid cell values total to 480. When you divide the total by 9 you get a mean value of 53.33. This is the value for the output grid cell at the center of the kernel.

Figure 7-24. Visual comparison of the input and output grid data layers.

The input grid data layer for the TM band 1 of the sub-scene is displayed on the left in Figure 7-24 and the output on the right. It is only when you zoom in on areas that you are able to see the “smoothing” effect on the data. Detail is lost because of the averaging done by the filter. The Grid – Filter/Simple Filter module can reproduce the same result using the settings in Figure 7-25.

Figure 7-25. The Grid – Filter/Simple Filter module settings for a 3 x 3 “mean” kernel.

Page 223: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

206

Viewing the settings in Figure 7-25 you can see that the Simple Filter module provides a different set of options than the User Defined Filter (3 x 3) module. For example, there are two options for the ‘Search Mode’ parameter: “Square” and “Circle”. The ‘Filter’ parameter provides choices to use this module as a filter for smoothing or for sharpening or edge enhancement. The size of the kernel is flexible and controlled by the ‘Radius’ parameter. The default of “1” defines a 3 x 3 kernel. A radius of “2” defines a 5 x 5 kernel, and so on. A desirable feature the Simple Filter does not support is the ability to enter values (or weights) in the kernel. Gaussian Filter The Grid – Filter/Gaussian Filter module is used to generalize or smooth data contained in an input grid data layer. This filter uses an averaging approach with different weights assigned to each grid cell in the kernel. Figure 7-26 displays settings for the Grid – Filter/Gaussian Filter module.

Figure 7-26. Settings used for the example of the Grid – Filter/Gaussian Filter module.

The same input grid data layer used for the earlier examples involving the Simple Filter and User Defined Filter (3 x 3) modules is used in this example. The options for this execution are the defaults of “1” for the ‘Standard Deviation’ parameter, “Square” for the ‘Search Mode’ and “2” for the ‘Search Radius’. A zoomed in portion of the output grid data layer is displayed on the right in Figure 7-27 alongside the corresponding zoomed in area of the input grid data layer.

Page 224: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

207

Figure 7-27. Visual comparison of the input and output grid data layers.

The filters discussed so far are characterized as low pass filters. Their objective is to capture the general background of an image. As noted, their primary application is to generalize or smooth data. In this respect they are used with digital images as well as with digital elevation models. High pass filters are used to isolate and emphasize the detail portion of an image. In particular, these filters are used to sharpen and enhance contrast, particularly, edge enhancement. Laplacian Filter The Laplacian filter is one of the most popular filters for edge enhancement. The SAGA Grid – Filters/Laplacian Filter module supports four user selectable options. Three of the options are referred to as “Standard kernel 1”, “Standard kernel 2” and “Standard kernel 3”. All are 3 x 3 matrices, see Figure 7-28. 0 -1 0 -1 -1 -1 -1 -2 -1 -1 4 -1 -1 8 -1 -2 12 -2 0 -1 0 -1 -1 -1 -1 -2 -1 Standard kernel 1 Standard kernel 2 Standard kernel 3 Figure 7-28. The “Standard kernel 1”, “Standard kernel 2” and “Standard kernel 3” options in the Laplacian Filter module.

The three standard kernel matrices use a positive weight for the central cell value and negative or zero weights for all other cells in the matrix or neighborhood of cells. The fourth option supported in the module is called “User defined”. When you choose this option, you must use the default values or enter new values for the three parameters: ‘Standard Deviation (Percent of Radius)’, ‘Radius’, and ‘Search Mode’. Note that ‘Search Mode’ has two choices, circle or square. Figure 7-29 displays settings for the Grid – Filters/Laplacian Filter module with “Standard kernel 1” chosen. A second execution was made using “Standard kernel 2”.

Page 225: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

208

Figure 7-29. Settings for the Grid – Filters/Laplacian Filter module.

Zoomed in areas of the input grid data layer (the spectral values for band 1) and corresponding areas of the outputs using “Standard kernel 1” and “Standard kernel 2” are displayed in Figure 7-30.

Page 226: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

209

Figure 7-30. Comparing the input grid data layer and two output grid data layers.

The zoomed in areas in Figure 7-30 are centered on an airfield outside of Shelton, Washington. The graphic toward the top of the figure displays the image for band 1. This was the input grid data layer for two separate executions of the Grid – Filters/Laplacian Filter module. The bottom left output used “Standard kernel 1” and the bottom right “Standard kernel 2”. The airport runways and taxiway do not show up well in the band 1 image. However, they do show up a little better on both of the module output grid data layers. Comparing the outputs it appears that the “Standard kernel 2” option displays more contrast in the edge enhancement areas. In general, linear features on both outputs can be more easily discerned compared to the input layer. Sobel Detection Filter Another approach to edge enhancement is referred to as the “Sobel Detection” method. The first step in this approach is to smooth the image using one of the low pass filters, e.g., the mean or Gaussian filter. Next, two additional passes over the smoothed image are made using two directional kernels. These kernels are displayed in Figure 7-31.

Page 227: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

210

1 2 1 1 0 -1 0 0 0 2 0 -2 -1 -2 -1 1 0 -1 Pass 1 Pass 2 Figure 7-31. The “Sobel Detection” directional filters.

A new grid data layer is created for each pass. Next, the equation Sqrt ((Pass 1 * Pass 1) + (Pass 2 * Pass 2)) is used to create a merging of the two passes into a single grid data layer. I will use the Grid Calculus/Grid Calculator module for this last step. I use the Grid – Filters/Gaussian Filter module for the first step. The settings I use are displayed in Figure 7-32.

Figure 7-32. The settings used for the Gaussian Filter module.

The Grid – Filters/User Defined Filter (3 x 3) module is used for the passes involving the two directional kernels. Figure 7-33 displays the ‘Filter Matrix’ entries for the first kernel execution.

Page 228: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

211

Figure 7-33. The values used for the ‘Filter Matrix’ for the first directional kernel.

I name the output from the first execution of the Grid – Filters/User Defined Filter (3 x 3) ‘Pass1’ and ‘Pass2’ for the execution that used the second directional kernel. Execution of the Grid – Calculus/Grid Calculator module is the last step in generating the output for the Sobel Edge Detection method. Figure 7-34 displays the settings I used to merge the two outputs from the two directional kernels.

Figure 7-34. The Grid – Calculus/Grid Calculator module settings.

The input grid data layers for the Grid Calculator module are ‘Pass1’ and ‘Pass2’. These are the renamed output data layers from the two separate executions of the Grid – Filters/User Defined Filter (3 x 3) module. Note that in the Grid Calculator module the

Page 229: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

212

input data layers are referred to with alpha characters when used in the ‘Formula’ parameter. Thus, “a” refers to ‘Pass1’ and “b” refers to ‘Pass2’. The formula directs the module to square the values of each data layer, add them together and then take the square root for calculating the data value for the corresponding cell on the output grid data layer. This output was renamed ‘Sobelgrid’.

Figure 7-35. Viewing the output from applying the Sobel Edge Technique.

The upper left graphic in Figure 7-35 is the input grid data layer for spectral values for band 1. The upper right graphic is the smoothed grid data layer produced by the Guassian

Page 230: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

213

Filter module. The two map views in the middle are ‘Pass1’ on the left and ‘Pass2’ on the right. The bottom graphic is the merging of ‘Pass1’ and ‘Pass2’ created using the Grid Calculator module. Looking closely you can discern the emphasis within the output of each of the two kernels by looking at ‘Pass1’ and ‘Pass2’. The first kernel isolated edges with horizontal orientation while the second kernel emphasized vertical oriented edges. The output from the Grid Calculator module, at the bottom of the graphic, appears to exaggerate linear features. Majority Filter The SAGA Grid – Filters/Majority Filter module uses another smoothing technique to help eliminate noise. The kernel is used to identify the predominant or most frequent occurring data value for the neighborhood of cells and assign that value to the central cell. Figure 7-36 displays the settings for this example using the Majority Filter module.

Figure 7-36. Majority Filter module settings page.

The grid data layer containing spectral values for the Mason County Landsat band 1 is chosen as the input for the ‘>>Grid’ parameter. The ‘Search Mode’ parameter has two choices, “Square” or “Circle”. I chose “Square”. The “1” entry for the ‘Radius’ parameter means a 3 x 3 filter matrix is used. The default “0” was left for the ‘Threshold [Percent]’ parameter. The value used for the ‘Threshold [Percent]’ parameter sets a threshold for the number of same values needed to change the central cell value. There are 9 grid cells involved. Each grid cell accounts for a little over 11% of the total number of values (1 cell out of 9, 1/9 =

Page 231: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

214

.111 or about 11%). If you want the central cell to change when at least 3 of the 9 cells have the same data value, you would enter “33” for the ‘Threshold [Percent]’ parameter. Figure 7-37 displays corresponding zoomed in portions of input and output grid data layers used with the Majority Filter module.

Figure 7-37. Comparing the input and output grid data layers related to the Majority Filter module execution.

The output grid data layer on the right appears smoothed. When you compare the airfield in the two layers, the airfield on the right has rough edges compared to the airfield on the left in the input grid data layer.

Figure 7-38. Comparing data values for the input and output grid data layers related to the Majority Filter module execution.

The displays in Figure 7-38 illustrate how the Majority Filter operates. The predominant value for the matrix of 9 grid cells on the left is 54. This is the value chosen by the module for the corresponding central cell on the output grid data layer on the right side of the figure.

Page 232: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

215

“Relief” Filters The versatile Grid – Filters/User Defined Filter (3 x 3) module can be used with a digital elevation model to output a relief-like grid data layer. The ‘Filter Matrix’ settings are used to specify the illumination direction. Figure 7-39 displays two kernels that will be used to create relief-like grid data layers for two different illumination directions. -3 -2 -1 4 2 -1 -2 1 2 2 1 -2 -1 2 4 -1 -2 -3 Kernel 1 Kernel 2 Figure 7-39. Two kernels for different illumination directions.

Figure 7-40. Comparing the outputs using the two kernels.

It is easy to discern the differing illumination perspectives by looking at the “shadows”. The output using “Kernel 1” (on the left) has illumination that appears to be from a southerly direction while the output using “Kernel 2” has illumination from a northerly direction. An easier way to generate relief like output is to use the SAGA Terrain Analysis – Lighting, Visibility/Analytical Hillshading module. The module takes into account the slope and aspect of each cell in the computation. Ratios Introduction Using digital imagery, a ratio image is created by dividing the pixel values of one spectral band by the corresponding pixel values of another spectral band from the same image. The advantage of a ratio image over a single band is that the influence of variation within a band due to topography or shadow can potentially be minimized, as the same variation is present in all spectral bands of a scene. A ratio of two bands captures the spectral relationship regardless of topography or shadow.

Page 233: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

216

Figure 7-41 displays typical spectral range reflectance curves for water, vegetation, and dry bare soil. The figure also plots the spectral ranges for TM bands 1, 2, 3, 4, 5 and 7 using the gray areas. These curves will be referred to in the following discussion.

Figure 7-41. Spectral Reflectance Curves and TM+ Band Spectral Ranges.

The Grid – Calculus/ Grid Calculator module will be used to produce examples of ratio images. The settings page for the Grid Calculator is displayed in Figure 7-42.

Figure 7-42. The settings page for the Grid Calculator module.

Page 234: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

217

Using the Grid Calculator to create ratio images is very easy. First, the grid data layers containing spectral reflectance information (grid data values) for the various TM+ bands must be loaded in the work session. Ratio images normally involve two bands, one divided by the other. Assuming two grid data layers will be chosen, the equation entered into the value field for the ‘Formula’ parameter is “a/b” (as displayed in Figure 7-42 above). The “a” and “b” variables represent the two grid data layers for the TM+ band spectral data. The two layers used in the formula are chosen for the ‘>>Grids’ parameter in the settings. You must make sure they are in the correct order to match the formula. Ratio TM1/TM2 Band 1 is in the blue spectral range (0.45 to 0.52 µm) and Band 2 is in the green range (0.52 to 0.60 µm). Band 1 is designed for penetrating water. It is useful for coastal water mapping and for discriminating between soil and vegetation, forest types, and cultural feature interpretation. Band 2 is useful for measuring green reflectance of vegetation for vegetation discrimination and vegetation health. It also is useful for cultural feature interpretation. Viewing Figure 7-41, you can see the spectral ranges for bands 1 and 2 compared to the reflectance curves for water, dry bare soil, and vegetation. The curves for all three surface features are in the low end of reflectance values. The two bands appear to be highly correlated.

Figure 7-43. The Grid Calculator settings for the ratio TM1/TM2 image.

The entry for the value field for the ‘Grid system’ parameter is the grid system the grid data layers representing the spectral values for the TM+ bands are a part. The grid data layers for bands 1 (‘MCL720020922_1’) and 2 (‘MCL720020922_2’) have been chosen for the ‘>>Grids’ parameter. The equation used is “a/b”.

Page 235: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

218

The ratio of TM1 and TM2 (blue and green) results with a low contrast image. Figure 7-44 displays examples of this ratio using the two Landsat sub-scenes for Mason County and an area in central east Arizona.

Figure 7-44. Comparing two TM1/TM2 ratioed images.

The grayscale images in the upper part of the image are the two TM1/TM2 ratio images. The one on the left is a zoomed in area of the Mason County sub-scene and the one on the right a zoomed in area for the semi-arid central east Arizona. The color composite images (the bottom two map view windows) are true color composites (to be discussed later in this chapter). The composites can assist with interpretation of the ratio images. The true color composite images have good contrast compared to the TM1/TM2 ratio image. Features, such as roads and vegetation, do not show up well on the ratio images. The two towns of Springerville and Eagar, in the Arizona sub-scene, are in the center of the zoomed in area. On the true color composite you can see the greenness of vegetation as well as the airfield that is on the northwest side of the towns. These areas show up poorly on the ratio image. In order to provide a simple comparison of the spectral values and the ratio image values, I identified fifteen sample points, three sample points each representing five general cover classes: roads, water, bare soil, conifer vegetation, and deciduous vegetation. The

Page 236: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

219

development of this point shapes data layer is described at the end of this section. Figure 7-45 displays spectral data for the sample points with the spectral values for bands 1 and 2 and the ratio image TM1/TM2 created using the Grid Calculator module.

MC - 1 MC - 2 TM12 AZ-1 AZ-2 ARTM12HWY 101 62 47 1.32 HWY 180 74 65 1.14SR 3 65 53 1.23 HWY 60 64 57 1.12SR 3 57 44 1.30 HWY 60 71 59 1.20Water-Cush 51 28 1.82 Water 1 49 34 1.44Water-Hood 50 31 1.61 Water 2 50 38 1.32Water-Mason 50 30 1.67 Water 3 49 37 1.32Soil - 1 59 46 1.28 Soil - 1 92 104 0.88Soil - 2 59 45 1.31 Soil - 2 111 123 0.90Soil - 3 57 42 1.36 Soil - 3 117 121 0.97Conif - 1 50 34 1.47 Conif - 1 46 35 1.31Conif - 2 50 34 1.47 Conif - 2 48 36 1.33Conif - 3 49 34 1.44 Conif - 3 50 36 1.39Decid - 1 50 36 1.39 Decid - 1 49 46 1.07Decid - 2 53 39 1.36 Decid - 2 48 40 1.20Decid - 3 51 40 1.27 Decid - 3 55 50 1.10

Figure 7-45. Spectral values for bands 1 and 2 and the ratio image TM1/TM2.

The spectral reflectance values for the Mason sub-scene in band 1 do not vary a lot nor do the ones in band 2. You can see how this explains the low contrast values for the TM1/TM2 ratio image. There are some small numeric differences but not enough for a real definitive differentiation between features. The Arizona sub-scene is a little bit different. The soils in particular are highly reflective. This shows up in the ratio image TM1/TM2. Otherwise, the contrast does not appear to vary significantly. You can see significant differences between the two sub-scenes. These differences are not just due to temporal differences. The land cover is quite different between the two areas. There is a lot more bare soil land cover in the Arizona sub-scene compared to the Mason County sub-scene. There is much more biomass in the Mason County sub-scene compared to the Arizona sub-scene. Vegetation types are different between the two. Ratio TM3/TM4 Band 3 is in the red range (0.63 to 0.69 µm) and Band 4 is in the near infrared range (0.78 to 0.90 µm). The red spectral range is the chlorophyll absorption region making this band useful in vegetation discrimination. It is also useful for cultural feature interpretation. Band 4 is in the near infrared range. It is useful for interpreting vegetation types, vigor, and biomass content. It can be useful for delineating water bodies and for soil moisture discrimination.

Page 237: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

220

Viewing Figure 7-41, you can compare the spectral ranges for bands 3 and 4 to the reflectance curves for water, dry bare soil, and vegetation. Reflectance for water is moderate in band 3 and very low to zero for band 4. Vegetation will appear in darker tones due to low reflectance values in red and high reflectance in near infrared. Figure 7-46 displays examples of this ratio using the two Landsat sub-scenes for Mason County and the area in central east Arizona.

Figure 7-46. Comparing two TM3/TM4 ratio images.

The contrast for the TM3/TM4 ratio images is much better compared to the TM1/TM2 image (see Figure 7-44). The topography in the sparsely vegetated areas in the Arizona sub-scene is displaying some detail in the ratio image. Roads in both images have good contrast and vegetation has more definition. Figure 7-47 displays spectral numeric data for bands 3 and 4 and the ratio image TM3/TM4 using the same fifteen sample points described earlier.

Page 238: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

221

MC - 3 MC - 4 TM34 AZ-3 AZ-4 ARTM34HWY 101 45 65 0.69 HWY 180 74 74 1.00SR 3 54 76 0.71 HWY 60 59 77 0.77SR 3 37 89 0.42 HWY 60 65 72 0.90Water - Cush 19 13 1.46 Water 1 26 17 1.53Water - Hood 20 13 1.54 Water 2 27 16 1.69Water - Mason 20 14 1.43 Water 3 30 18 1.67Soil - 1 44 79 0.56 Soil - 1 134 126 1.06Soil - 2 41 80 0.51 Soil - 2 154 134 1.15Soil - 3 39 61 0.64 Soil - 3 164 143 1.15Conif - 1 24 74 0.32 Conif - 1 29 60 0.48Conif - 2 25 65 0.38 Conif - 2 31 60 0.52Conif - 3 24 68 0.35 Conif - 3 29 59 0.49Decid - 1 25 111 0.23 Decid - 1 38 113 0.34Decid - 2 27 134 0.20 Decid - 2 32 130 0.25Decid - 3 27 126 0.21 Decid - 3 43 114 0.38

Figure 7-47. Spectral values for bands 3 and 4 and the ratio image TM3/TM4.

Unlike the previous example using bands 1 and 2, in this example you see some variation in the spectral reflectance values. Notice the difference between roads and water, for example. Also, you can see the difference between vegetation and other features. The near infrared values (the MC-4 and AZ-4 columns in the table) differentiate between conifer and deciduous vegetation. Thus, you can see that the ratio image TM3/TM4 does quite well differentiating between water, roads, bare soil, and general types of vegetation. Ratio TM5/TM2 Band 5 is in the mid-infrared range (1.55 to 1.75 µm) and band 2 is in the green range (0.52 to 0.60 µm). Band 5 reflectance values are useful for interpretation of vegetation moisture content and soil moisture. This band can also assist in differentiating between snow and clouds. Comparing the reflectance curves for water, vegetation, and dry bare soil (see Figure 7-41) in these two spectral ranges you can see that dry bare soil and vegetation have relatively higher reflectance values for vegetation and soil in band 5 than they do in band 2. Vegetation will display with lighter tones in this ratio. Figure 7-48 displays examples of this ratio using the two Landsat sub-scenes for Mason County and the area in central east Arizona.

Page 239: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

222

Figure 7-48. Comparing two TM5/TM2 ratio images.

Figure 7-49 displays spectral data for bands 5 and 2 and the ratio image TM5/TM2 using the same fifteen sample points described earlier.

MC - 5 MC - 2 TM52 AZ-5 AZ-2 ARTM52HWY 101 61 47 1.30 HWY 180 82 65 1.26SR 3 81 53 1.53 HWY 60 67 57 1.18SR 3 54 44 1.23 HWY 60 66 59 1.12Water - Cush 9 28 0.32 Water 1 12 34 0.35Water - Hood 9 31 0.29 Water 2 12 38 0.32Water - Mason 9 30 0.30 Water 3 11 37 0.30Soil - 1 87 46 1.89 Soil - 1 188 104 1.81Soil - 2 67 45 1.49 Soil - 2 191 123 1.55Soil - 3 63 42 1.50 Soil - 3 156 121 1.29Conif - 1 28 34 0.82 Conif - 1 37 35 1.06Conif - 2 30 34 0.88 Conif - 2 39 36 1.08Conif - 3 28 34 0.82 Conif - 3 36 36 1.00Decid - 1 37 36 1.03 Decid - 1 48 46 1.04Decid - 2 59 39 1.51 Decid - 2 51 40 1.27Decid - 3 57 40 1.42 Decid - 3 81 50 1.62

Figure 7-49. Spectral values for bands 5 and 2 and the ratio image TM5/TM2.

Page 240: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

223

This example also displays some significant variation in the spectral reflectance values. The Mason sub-scene roads have low reflectance values in both bands that produce a low ratio in the ratio TM5/TM2 image. This ratio, however, is a lot lower than ratios for other features. Thus, roads, due to the low ratio, will stand out against the higher ratio values of other features. The Arizona sub-scene road surface material is more reflective in both bands but the contrast is low. The Arizona lake water is much lower in reflectance than water in the Mason sub-scene. The low contrast stands out against the higher contrast backgrounds. Ratio TM3/TM7 Band 3 is in the red area of the spectrum (0.63 to 0.69 µm) and band 7 is another band in the mid-infrared range (2.08 to 2.35 µm). The spectral range for band 7 is useful for discrimination of mineral and rock types. This range is also sensitive to vegetation moisture content. Roads and other cultural features appear in lighter tones due to the relatively high reflectance in the red band and lower reflectance in the mid-infrared band (TM band 7). Turbid water can be interpreted in this ratio image. Figure 7-50 displays examples of this ratio using the two Landsat sub-scenes for Mason County and the area in north central Arizona.

Page 241: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

224

Figure 7-50. Comparing two TM3/TM7 ratio images.

Figure 7-51 displays spectral data for bands 3 and 7 and the ratio image TM3/TM7 using the same fifteen sample points described earlier.

MC - 3 MC - 7 TM37 AZ-3 AZ-7 ARTM37HWY 101 45 39 1.15 HWY 180 74 66 1.12SR 3 54 53 1.02 HWY 60 59 49 1.20SR 3 37 32 1.16 HWY 60 65 53 1.23Water - Cush 19 9 2.11 Water 1 26 13 2.00Water - Hood 20 9 2.22 Water 2 27 10 2.70Water - Mason 20 9 2.22 Water 3 30 12 2.50Soil - 1 44 51 0.86 Soil - 1 134 149 0.90Soil - 2 41 41 1.00 Soil - 2 154 159 0.97Soil - 3 39 38 1.03 Soil - 3 164 129 1.27Conif - 1 24 14 1.71 Conif - 1 29 23 1.26Conif - 2 25 17 1.47 Conif - 2 31 27 1.15Conif - 3 24 14 1.71 Conif - 3 29 21 1.38Decid - 1 25 19 1.32 Decid - 1 38 24 1.58Decid - 2 27 26 1.04 Decid - 2 32 25 1.28Decid - 3 27 25 1.08 Decid - 3 43 44 0.98

Figure 7-51. Spectral values for bands 3 and 7 and the ratio image TM3/TM7.

Page 242: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

225

This ratio image is similar to the first example, TM1/TM2. Due to low contrast data values, it is difficult to differentiate between features. The reflectance values for the sample points show some variation but not a lot. The Mason sub-scene road sample point and the Arizona water sample point ratio values are significantly different from the ratio values for other features. Again, there are some small numeric differences but not enough for a real definitive differentiation between most features. The Sample Point Shapes Data Layer As noted earlier, I identified fifteen sample points with three points in each of five general cover classes: roads, water, bare soil, conifer vegetation, and deciduous vegetation. I digitized these sample points on-screen using SAGA vector support tools. This process is described in several places including Volume 1, Chapter 4 in the ‘Edit’: Tools Available for Shapes Data Layers section. First I executed the Shapes – Tools/Create New Shapes Layer module to create a blank point shapes data layer. Figure 7-52 displays the settings I used for this module execution.

Figure 7-52. The Shapes – Tools/Create New Shapes Layer module settings.

I entered a name for the ‘Name’ parameter, ‘MasonPoints2’. There are four choices for the ‘Shape Type’ parameter: Point, Multipoint, Lines, and Polygon. I chose “Point” and clicked the ‘Okay’ button. I displayed a false-color infrared (FCIR) composite image with the new point shapes data layer as an overlay. Since the point shapes data layer is transparent, the FCIR image is visible. In the absence of ground truth, I used my interpretation of the content of the FCIR image to on-screen digitize three sample points each for cover classes roads, water, bare soil, conifer vegetation, and deciduous vegetation.

Page 243: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

226

The attribute table linked to the point shapes data layer will have two attributes. One will be a unique number for each sample point. The second one will be a simple text name for each point. I added this attribute information as I collected the digitized sample points. Once the four ratio images were created, and with the grid data layers for the spectral bands available in the work session, I executed the Shapes – Grid/Get Grid Data for Shapes module. This module uses a point shapes data layer as input. Grid data layers are chosen as sources for attribute information to be added to the attribute table for the point objects of the input layer. Each grid data layer theme is added as an attribute column to the existing attribute table linked to the input data layer. The settings page for executing this module is displayed in Figure 7-53.

Figure 7-53. The Shapes – Grid/Get Grid Data for Shapes module settings page.

The input for the ‘>>Shapes’ parameter is my ‘MasonPoints2’ point shapes data layer containing the 15 point objects. The output parameter (‘<<Shapes (Grid Information)’) will be a new shapes data layer. The difference between the input and output layers will be the extra columns containing grid data layer data for the attribute table linked to the output point shapes data layer. The point objects will not change. I saved the new output layer using the same name as the input layer. Next I loaded the attribute file into Excel where I developed the tabular tables used in the discussions of the ratio images and below. This same process was used to develop similar data for the Arizona sub-scene. The Sample Point Shapes Data Layer Attribute Table Figures 7-54 and 7-55 display point data for the Mason County and Arizona sub-scenes. These are spectral reflectance values for bands 1 through 7 and the ratio data values for the four ratio images.

Page 244: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

227

Figure 7-54. Summary of spectral reflectance and ratio image values in the Mason County sub-scene.

Figure 7-55. Summary of spectral reflectance and ratio image values in the Arizona sub-scene.

It is easy to produce ratio images using the Grid – Calculus/Grid Calculator module. SAGA has modules to support different analysis approaches on the images.

Page 245: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

228

Composite Images Introduction Spectral reflectance data from satellite images can be visualized by combining three individual spectral bands into a single composite image. Each band is mapped to a primary color: red, green, or blue (RGB). One band is displayed in shades of red; one band is displayed in shades of green, and the third one in shades of blue. The resultant composite is often referred to as an “RGB” composite. You have seen examples of this type of image earlier in this chapter. Often, putting three bands together in a color composite produces an image more suitable for visual interpretation of features. There are a couple approaches to development of color composites in SAGA depending on whether you want to create a visual display only or create a composite image grid data layer. We will start by exploring the SAGA Grid – Visualisation/RGB Composite module. The settings page for this module is displayed in Figure 7-56.

Figure 7-56. Settings page for module RGB Composite.

Page 246: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

229

The ‘Grid system’ parameter is used to identify the grid system the input grid data layers are a part. The grid system must be loaded in the current work session. When you click with the mouse pointer in the value field to the right of the ‘Grid system’ parameter, a list of loaded grid systems for the work session displays. You should choose the one the input grid data layers are a part. The rest of the settings are for choosing the three grid data layers to represent the spectral reflectance values for three bands and an optional fourth input for a ‘>Transparency’ layer. The three grid data layer input parameters are ‘>>Red’, ‘>>Green’, and ‘>>Blue’. The output parameter is the one named ‘<<Composite’. The default is “[create]”. Using this option, the output grid data layer will be named “Composite”. When you click in the value field to the right of the ‘<<Composite’ label, a list of the grid data layers available in the work session for the chosen grid system displays. You may choose an existing grid data layer. If you do, its content will be overwritten with the output from the module execution. Generally, it is best to use the “[create]” option and rename the output to a meaningful name when it finishes. Each of the three required input layers for the three primary colors and the optional transparency layer has a primary option parameter called ‘Value Preparation’. This option has five choices: 0-255 Rescale to 0-255 User defined rescale Percentiles Percentage of standard deviation Each input layer can use a different choice for the ‘Value Preparation’ parameter as needed. 0-255 The standard range of potential data values for Landsat bands is from 0 to 255. Selecting the ‘0-255’ option for the ‘Value Preparation’ parameter thus results with the RGB Composite module using the data values without any enhancement or “preparation”. Rescale to 0-255 When this option is chosen, the low end (minimum) of the data range is assigned to 0 or black and the high end (maximum) assigned to 255 or white. The remaining values are re-distributed linearly between 0 and 255. In this choice, the original data range is being linearly stretched between 0 and 255. Using linear stretch can result with a dull image. The full scale of values between 0 and 255 is utilized but the bulk of the cell values or pixels is displayed toward the middle. This is because, generally, the spectral values are described as a normal distribution, with the minimum and maximum values in the tail of the distribution.

Page 247: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

230

User defined scale This choice is used when the user wants to define a portion of the data range to stretch between 0 and 255. When this option is chosen, the values entered for the ‘Minimum’ and ‘Maximum’ for the ‘Rescale Range’ parameter are used to define a portion of the data range. The value entered for the ‘Minimum’ is set to 0 or black and the value entered for the ‘Maximum’ is set to 255 or white. The data values between the ‘Minimum’ and ‘Maximum’ are linearly stretched between 0 and 255. Percentiles This approach uses a minimum percentile and a maximum percentile to identify a specific data range to use. The value associated with the minimum percentile will become 0 or white and the value associated with the maximum percentile will become 255. The values in-between the minimum percentile value and maximum percentile value will be linearly stretched between 0 and 255. Percentage of standard deviation A value identifying the percentage of the standard deviation is entered in the value field to the right of the ‘Percentage of standard deviation’ parameter. Generally, it can be assumed that the spectral values for a band will fit or describe a normal or bell-shaped distribution. This assumption means that 68% of the spectral values fall within plus or minus 1 standard deviation of the mean value. Further, it means that 87% of the spectral values fall within plus or minus 1.5 standard deviations, 95.45% within plus or minus 2 standard deviations, and 99.7% within plus or minus 3 standard deviations. This approach uses a percentage of the standard deviation to identify a data range based on the distribution of values around the data value average or mean. When you want to use 1 standard deviation you enter 100; 1.5 standard deviations 150; 2.0 standard deviations 200; etc. Once the data range is identified, the low value of the range is set to 0 or white and the high value to 255 or black. The values in-between are linearly re-distributed between 0 and 255. The Grid – Visualisation/RGB Composite module has been used for creating true color and false color infrared composites. These are the two most popular composites. Other than changing the color assignments, I used the same options with each of the executions of the module. The “Percentage of standard deviation” choice was made for the ‘Value Preparation’ parameter. In the value field to the right of the ‘Percentage of standard deviation’ parameter I entered 300. This means that the contrast stretch will be based on plus or minus 3 standard deviations around the arithmetic means for the band reflectance values. True Color Composite In the true color composite, the red band (band 3) is assigned to red, the green band (band 2) is assigned to green, and the blue band (band 1) assigned to blue.

Page 248: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

231

Figure 7-57. Zoomed in areas on the true color composites for Mason County and Arizona.

The individual bands in the visible portion of the spectrum are assigned to the three primary colors they represent. The true color composite represents a true color rendition of a satellite image. Vegetation displays in shades of green, water in darker shades of blue, soil in light to dark shades. Populated areas will be mixed and tend toward bright light shades. The zoomed in area of the Mason County sub-scene, on the left in Figure 7-57, also shows clear-cuts of various ages. They show up in shades of green and light reds. The open range areas in the zoomed in area of the Arizona sub-scene, are showing up in medium shades of brown and a very light green. These grazing areas are sparsely vegetated. The lower left portion of the graphic is an area of higher elevation with low- to medium-density pinyon and juniper vegetation. False Color Infrared Composite In the false color infrared composite, the near infrared band (band 4) is assigned to red, the red band (band 3) is assigned to green, and the green band (band 2) assigned to blue.

Figure 7-58. Zoomed in areas on the false color infrared composites for Mason County and Arizona.

Vegetation displays in shades of red. Conifer and deciduous vegetation in the Mason County image can be differentiated. Conifer generally has a dark red tone while deciduous a more medium to bright red. Young vegetation in clear cuts shows up in shades of bright red. The bright red areas on the Arizona image mostly are irrigated fields

Page 249: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

232

and grass areas. Deciduous or riparian vegetation also shows up in bright red. Pinyon and juniper trees display in dark reds. Vegetation Indices Introduction Vegetation indices are a category of tools used with digital imagery to predict the existence of vegetation at specific pixel locations, or, in the case of SAGA at specific grid cell locations. Most of the indices are empirically constructed in such a way that larger values correspond to higher probabilities of actually finding live green plants at the selected location and time of observation. The indices themselves are based on combinations of spectral measurements in different wavelengths as recorded by a radiometric sensor. These combinations aid in the analysis of multi-spectral image information by combining multidimensional data into a single value. Huete (1994) defined vegetation indices as: “dimensionless, radiometric measures usually involving a ratio and/or linear combination of the red and near-infrared (NIR) portions of the spectrum. Vegetation indices may be computed from digital counts, at satellite radiances, apparent reflectances, land-leaving radiances, or surface reflectance and require no additional ancillary information other than the measurements themselves… What vegetation indices specifically measure remains unclear. They serve as indicators of relative growth and/or vigor of green vegetation, and are diagnostic of various biophysical vegetation parameters.” SAGA has two modules supporting two general types of vegetation indices: distance based and slope based. Distance based approaches involve calculating a regression formula related to soil background reflectance returns. These indices were developed for use in areas of less dense vegetation. In this chapter, I have chosen to concentrate on applying the slope based vegetation indices. The Grid – Analysis/Vegetation Index[slope based] module generates grid data layer output for six popular vegetation indices. The input grid data layers for each of the indices are the same: the thematic mapper red (band 3) and near infrared (band 4) spectral bands; although, you could assign other bands if desired. A single execution of the module produces a grid data layer of output values for each index. I would encourage you to apply the Grid – Analysis/Vegetation Index[slope based] module. Relative to the purposes of this User Guide, as an introduction to this fascinating area of remote sensing, I will use the Grid – Calculus/Grid Calculator module to introduce to you how SAGA can facilitate the calculation of vegetation indices.

Page 250: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

233

The module will be executed once for each vegetation index using the index equation for the ‘Formula’ parameter and the two grid data layers representing the red and near infrared spectral bands as input. Each vegetation index is described, including sample outputs, for the Mason County and Arizona sub-scenes. The descriptions include the equation for the vegetation index, the Grid Calculator settings, and the output grid data layer for the index for both sub-scenes. In addition, a set of sample points for different land cover features will be used to compare within index data value differences as well as differences between sub-scenes. There are a total of 24 sample points; 3 each for water, roads, bare soil, agriculture fields, lawn grass, deciduous vegetation, conifer vegetation, and bare rock. Two point shapes data layers were created for the sample points, ‘MCLsamples2’ for the Mason County sub-scene and ‘Azsamples2’ for the Arizona sub-scene. These shapes data layers were created in the same manner as described at the end of the Ratios section of this chapter. The Normalized Difference Vegetation Index This vegetation index has been around since the middle 1970’s (Rouse, 1974). It was developed as a replacement for one of the first indices developed called the Ratio Vegetation Index (RVI). The RVI is described later in this section. The NDVI equation introduced a modification to the RVI equation to produce a range of values from –1.0 to +1.0. Functionally, the two indices are identical. The equation for the NDVI is:

RedRed

+−

=NIRNIRNDVI

The Grid Calculator settings page is displayed in Figure 7-59. You can see that a grid system has been chosen for the value field to the right of the ‘Grid system’ parameter.

Figure 7-59. The Grid Calculator setup parameters for creating a grid data layer for the Normalized Difference Vegetation Index (NDVI).

Page 251: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

234

The input grid data layers containing reflectance values for Landsat TM bands 3 and 4 are members of the chosen grid system. The files for Landsat TM bands 3 and 4 are chosen and appear in the value field to the right of the ‘>>Grids’ label. The grid data layer containing reflectance values for the near infrared band is named ‘MCL720020922_4’ and the layer for the red band is ‘MCL720020922_3’. The order that the input grid data layers are listed in the value field to the right of the ‘>>Grids’ label is important. The first input in the list will be referred to as variable “a” in the equation entered in the ‘Options’ section. The second input will be referred to as variable “b”. Although I won’t be including more than two variables in the formulae in these examples, additional inputs would be referred to as variables “c”, “d”, etc. The equation entered for the ‘Formula’ parameter is (a-b)/(a+b). Interpreting the variables, the equation reads: (Near infrared – red) divided by (Near infrared + red) The output produced by the Grid Calculator module for the NDVI is displayed in Figure 7-60. The graphic on the left is a zoomed in area of the Mason County sub-scene and the one on the right is a zoomed in area in the Arizona sub-scene.

Figure 7-60. A zoomed in portion of the sample grid data layer outputs for the NDVI.

The data values range from –0.404255 to 0.764706 for the Mason County sub-scene and –0.636364 to 0.74026 for the Arizona sub-scene. Figure 7-61 displays data related to the sample points for both sub-scenes. The data includes reflectance values for the red and infrared bands and the calculated NDVI index values.

Page 252: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

235

Figure 7-61. Sample point NDVI values.

Generally, the NDVI values for the sample points tend to follow the guides for interpreting the values. Numbers above zero indicate the presence of vegetation and numbers less than zero non-vegetation. The index values for vegetation are on the higher end, above zero, and most are greater than 0.4. Ratio The RATIO vegetation index separates green vegetation from soil background by dividing the reflectance values in the near infrared band by those contained in the red band (Rouse et al. 1974). The equation for the RATIO is:

RedNIRRATIO =

The output grid data layer shows the contrast between the red and infrared bands for vegetated grid cells. Combinations of low red band values (due to absorption by chlorophyll) and high infrared reflectance values (as a result of leaf structure) reflectance produce high index values.

Page 253: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

236

The Grid Calculator settings page for generating the Mason County sub-scene RATIO grid data layer is displayed in Figure 7-62.

Figure 7-62. The Grid Calculator setup parameters for creating a grid data layer for the Ratio vegetation index (RATIO).

The equation entered in the value field to the right of the ‘Formula’ parameter is “a/b”. The layer for band 4 (‘MCL720020922_4’) is referred to in the equation as variable “a” and band 3 (‘MCL720020922_3’) is referred to as variable “‘b”. Thus, the equation divides the near infrared layer data values by the data values in the red layer. The outputs produced by the Grid Calculator module for the RATIO vegetation index are displayed in Figure 7-63. The graphic on the left is a zoomed in area of the Mason County sub-scene and the one on the right is for the Arizona sub-scene.

Figure 7-63. The sample grid data layer output for the RATIO.

The data values range from 0.424242 to 7.5 for the Mason County sub-scene and 0.222222 to 6.7 for the Arizona sub-scene.

Page 254: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

237

Figure 7-64. Sample point RATIO values.

RATIO index values less than 1.0 are likely to represent non-vegetation cells and a ratio value greater than 1.0 is likely to be vegetation. The road and soil sample points for the Mason County sub-scene appear to be in the vegetation range. However, if you look at the relative values between vegetation and non-vegetation, vegetation values are higher than the values in non-vegetation areas. If you use a differentiation value closer to 1.5 rather than 1.0, most of the vegetation would be greater than that value. Using the 1.0 value with the Arizona sub-scene seems to work all right except for the rock sample points. The Ratio Vegetation Index (RVI) This was another of the early vegetation indices (Richardson and Wiegand, 1977). The equation for the RVI is:

NIRRVI Red

=

An RVI value is calculated by dividing the reflectance value in the red band (band 3) by the value in the near infrared band (band 4). The low reflectance of red light from green

Page 255: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

238

vegetation combined with the strong reflectance of near infrared will result with high index values associated with vegetation biomass. Comparing the RVI equation to the RATIO index equation described earlier in this section, you can see that the RVI equation is the inverse of the RATIO index. The Grid Calculator settings page for creating a RVI grid data layer for the Mason County sub-scene is displayed in Figure 7-65.

Figure 7-65. The Grid Calculator setup parameters for creating a grid data layer for the Ratio Vegetation Index.

The equation entered in the value field to the right of the ‘Formula’ parameter is: a/b. The grid cell data values in the ‘MCL720020922_3’ layer are divided by the corresponding cell data values in the ‘MCL720020922_4’ layer. The output produced by the Grid Calculator module for the RVI is displayed in Figure 7-66. The graphic on the left is a zoomed in area of the Mason County sub-scene and the one on the right is for the Arizona sub-scene.

Page 256: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

239

Figure 7-66. The sample grid data layer output for the RVI.

The data value range for this vegetation index is.1333333 to 2.357143 for the Mason County sub-scene and 0.222222 to 6.7 for the Arizona sub-scene.

Figure 7-67. Sample point RVI values.

The suggested index value for differentiating between vegetation and non-vegetation with the RVI is 1. Values less than 1.0 are interpreted as vegetation and values greater than 1.0 as non-vegetation. Vegetation in the Mason County sub-scene does have index values

Page 257: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

240

less than 1 (as do the vegetation sample points in the Arizona sub-scene). However, the road and soil sample points also are below 1. Based on the sample point values, using a value around .35 would seem to discriminate better between vegetation and non-vegetation. The 1.0 value works fine for the Arizona sub-scene; the one exception being two of the rock sample points. Transformed Vegetation Index (TVI) This index was developed in 1975 and is documented by Deering et al (1975). A constant of .5 is added to NDVI values and then the square root taken of the results. This was done to reduce the probability of getting negative values. The square root was intended to produce a normal distribution rather than the approximate Poisson distribution of most NDVI index output. The equation for the TVI is:

⎟⎠⎞

⎜⎝⎛ +

+−

= 5.RedRed

NIRNIRsqrtTVI

The Grid Calculator settings page for creating a TVI grid data layer is displayed in Figure 7-68.

Figure 7-68. The Grid Calculator setup parameters for creating a grid data layer for the Transformed Vegetation Index (TVI).

The equation entered in the value field to the right of the ‘Formula’ parameter is: sqrt(a+.5). The value of .5 is added to each grid cell value in the input NDVI (‘MCLndvi’) grid data layer and then the square root of the result is calculated and output to the corresponding cell in the output grid data layer.

Page 258: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

241

Output for the two sub-scenes produced by the Grid Calculator module for the TVI is displayed in Figure 7-69. The graphic on the left is a zoomed in area of the Mason County sub-scene and the one on the right is for the Arizona sub-scene.

Figure 7-69. The sample grid data layer output for the TVI.

The data values range from 0.309426 to 1.124591 for the Mason County sub-scene and 0 to 1.11367 for the Arizona sub-scene.

Page 259: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

242

Figure 7-70. Sample point TVI values.

The differentiation value between vegetation and non-vegetation with this index is suggested to be 0.71; less than 0.71 is non-vegetation and greater than 0.71 is vegetation. This guide does not seem to work with the Mason County sub-scene but works well with the Arizona scene except for two of the rock sample points. Corrected Transformed Vegetation Index (CTVI) The CTVI was developed to minimize the probability of negative values in the TVI. The equation for the CTVI is:

)5.0((*)5.0(

)5.0(+

++

= NDVIabsolutesqrtNDVIabsolute

NDVICTVI

The Grid Calculator settings page used to generate an example CTVI grid data layer is displayed in Figure 7-71.

Figure 7-71. The Grid Calculator setup parameters for creating a grid data layer for the Corrected Transformed Vegetation Index (CTVI).

The equation entered in the value field to the right of the ‘Formula’ parameter is: ((a+0.5)/(abs(a+0.5)))*sqrt(abs(a+0.5)). The value of .5 is added to each grid cell value in the input NDVI (‘MCLndvi’) grid data layer. This is divided by the absolute value of the cell value plus 0.5 and then multiplied by the square root of the absolute value of the cell value plus 0.5. The result is output to the corresponding cell on the output grid data layer. Output produced by the Grid Calculator module for the CTVI is displayed in Figure 7-72. The graphic on the left is a zoomed in area of the Mason County sub-scene and the one on the right is for the Arizona sub-scene.

Page 260: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

243

Figure 7-72. The sample grid data layer output for the CTVI.

The data values range from 0.309426 to 1.124591 for the Mason County sub-scene and –--0.369274 to 1.11367 for the Arizona sub-scene.

MC - 3 MC - 4 CTVI AL - 3 AL - 4 CTVI Water - Cush 20 13 0.5365 Water - 1 26 17 0.5392Water - Hood 22 13 0.4928 Water - 2 27 16 0.4942Water - Mason 20 13 0.5365 Water - 3 84 28 0.0000Road - 1 46 73 0.8526 Road - 1 73 67 0.6761Road - 2 40 83 0.9217 Road - 2 79 74 0.6836Road - 3 35 88 0.9648 Road - 3 87 73 0.6423Soil - 1 48 74 0.8445 Soil - 1 119 118 0.7041Soil - 2 59 86 0.8284 Soil - 2 135 120 0.6642Soil - 3 61 90 0.8319 Soil - 3 182 148 0.6301Agri - 1 48 113 0.9506 Agri - 1 45 188 1.0553Agri - 2 40 126 1.0090 Agri - 2 39 166 1.0581Agri - 3 64 86 0.8042 Agri - 3 36 142 1.0467Grass - 1 41 138 1.0207 Grass - 1 46 150 1.0152Grass - 2 36 108 1.0000 Grass - 2 44 150 1.0229Grass - 3 27 130 1.0752 Grass - 3 36 157 1.0616Decid - 1 28 139 1.0792 Decid - 1 40 130 1.0146Decid - 2 27 126 1.0710 Decid - 2 38 125 1.0167Decid - 3 28 150 1.0888 Decid - 3 36 142 1.0467Conif - 1 23 58 0.9655 Conif - 1 30 86 0.9913Conif - 2 25 78 1.0073 Conif - 2 29 80 0.9838Conif - 3 26 67 0.9700 Conif - 3 29 65 0.9397Rock - 1 82 77 0.6845 Rock - 1 52 42 0.6274Rock - 2 74 54 0.5863 Rock - 2 37 57 0.8443Rock - 3 70 76 0.7356 Rock - 3 44 68 0.8452

Figure 7-73. Sample point CTVI values.

Page 261: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

244

The same differentiation value for the TVI, 0.71, is suggested for use with the CTVI to discriminate between vegetation and non-vegetation. This guide does not appear to work with the CTVI data for my sample points. Normalized Ratio Vegetation Index (NRVI) The NRVI is a modification of the RVI (Baret and Guyot, 1991). The result of RVI –1 is normalized over RVI + 1. The formula for the NRVI is:

)1Re(

)1Re(

+

−=

NIRd

NIRd

NRVI

The ‘Grid Calculator’ settings page used to generate the example NRVI grid data layer is displayed in Figure 7-74.

Figure 7-74. The Grid Calculator setup parameters for creating a grid data layer for the Normalized Ratio Vegetation Index (NRVI).

The equation entered in the value field to the right of the ‘Formula’ parameter is: (a-1)/(a+1). The value of 1 is subtracted from the RVI value for a grid cell and divided by the RVI value plus 1. The result is output to the corresponding cell on the output grid data layer. The output produced by the Grid Calculator module for the NRVI is displayed in Figure 7-75. The graphic on the left is a zoomed in area of the Mason County sub-scene and the one on the right is for the Arizona sub-scene.

Page 262: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

245

Figure 7-75. The sample grid data layer output for the NRVI.

The data values range from -0.764706 to 0.404255 for the Mason County sub-scene and –0.74026 to 0.636364 for the Arizona sub-scene.

Figure 7-76. Sample point NRVI values.

The guide for differentiating between vegetation and non-vegetation is just the opposite as the one for the NDVI. Values less than zero indicate vegetation and values greater than zero non-vegetation. If you look at Figures 7-77 and 7-78 you can quickly compare the

Page 263: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

246

index values for sample points for the NDVI and NRVI. It looks like the indices are the inverse of each other. Discussion SAGA has two modules specifically designed for supporting the production of grid data layers depicting a variety of both slope based and distance based vegetation indices. In addition, the Grid Calculator module can be used with many of the calculation formulas. Other tools can be used to collect statistical data to assist with interpretation of map data. SAGA has a lot of resources to apply to remotely sensed data. The sample points have been valuable in comparing vegetation index output for the eight broad cover classes within a specific index and between indices. The samples for roads are probably not too helpful. Roads have a lot of linear area but are quite narrow. Consequently, pixels characteristic of roads will generally reflect a combination of reflectance for surface and adjacent cover. Using sample points for roads is probably not too effective. MC - 3 MC - 4 NDVI RATIO RVI TVI CTVI NRVI Water - Cush 20 13 -0.2121 0.6500 1.5385 0.5365 0.5365 0.2121Water - Hood 22 13 -0.2571 0.5909 1.6923 0.4928 0.4928 0.2571Water - Mason 20 13 -0.2121 0.6500 1.5385 0.5365 0.5365 0.2121Road - 1 46 73 0.2269 1.5870 0.6301 0.8526 0.8526 -0.2269Road - 2 40 83 0.3496 2.0750 0.4819 0.9217 0.9217 -0.3496Road - 3 35 88 0.4309 2.5143 0.3977 0.9648 0.9648 -0.4309Soil - 1 48 74 0.2131 1.5417 0.6486 0.8445 0.8445 -0.2131Soil - 2 59 86 0.1862 1.4576 0.6860 0.8284 0.8284 -0.1862Soil - 3 61 90 0.1921 1.4754 0.6778 0.8319 0.8319 -0.1921Agri - 1 48 113 0.4037 2.3542 0.4248 0.9506 0.9506 -0.4037Agri - 2 40 126 0.5181 3.1500 0.3175 1.0090 1.0090 -0.5181Agri - 3 64 86 0.1467 1.3438 0.7442 0.8042 0.8042 -0.1467Grass - 1 41 138 0.5419 3.3659 0.2971 1.0207 1.0207 -0.5419Grass - 2 36 108 0.5000 3.0000 0.3333 1.0000 1.0000 -0.5000Grass - 3 27 130 0.6561 4.8148 0.2077 1.0752 1.0752 -0.6561Decid - 1 28 139 0.6647 4.9643 0.2014 1.0792 1.0792 -0.6647Decid - 2 27 126 0.6471 4.6667 0.2143 1.0710 1.0710 -0.6471Decid - 3 28 150 0.6854 5.3571 0.1867 1.0888 1.0888 -0.6854Conif - 1 23 58 0.4321 2.5217 0.3966 0.9655 0.9655 -0.4321Conif - 2 25 78 0.5146 3.1200 0.3205 1.0073 1.0073 -0.5146Conif - 3 26 67 0.4409 2.5769 0.3881 0.9700 0.9700 -0.4409Rock - 1 82 77 -0.0314 0.9390 1.0649 0.6845 0.6845 0.0314Rock - 2 74 54 -0.1563 0.7297 1.3704 0.5863 0.5863 0.1563Rock - 3 70 76 0.0411 1.0857 0.9211 0.7356 0.7356 -0.0411

Figure 7-77. Band 3 and 4 spectral and vegetation index values for sample points in the Mason County sub-scene.

Page 264: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

247

AL - 3 AL - 4 NDVI RATIO RVI TVI CTVI NRVI Water - 1 26 17 -0.2093 0.6538 1.5294 0.5392 0.5392 0.2093Water - 2 27 16 -0.2558 0.5926 1.6875 0.4942 0.4942 0.2558Water - 3 84 28 -0.5000 0.3333 3.0000 0.0000 0.0000 0.5000Road - 1 73 67 -0.0429 0.9178 1.0896 0.6761 0.6761 0.0429Road - 2 79 74 -0.0327 0.9367 1.0676 0.6836 0.6836 0.0327Road - 3 87 73 -0.0875 0.8391 1.1918 0.6423 0.6423 0.0875Soil - 1 119 118 -0.0042 0.9916 1.0085 0.7041 0.7041 0.0042Soil - 2 135 120 -0.0588 0.8889 1.1250 0.6642 0.6642 0.0588Soil - 3 182 148 -0.1030 0.8132 1.2297 0.6301 0.6301 0.1030Agri - 1 45 188 0.6137 4.1778 0.2394 1.0553 1.0553 -0.6137Agri - 2 39 166 0.6195 4.2564 0.2349 1.0581 1.0581 -0.6195Agri - 3 36 142 0.5955 3.9444 0.2535 1.0467 1.0467 -0.5955Grass - 1 46 150 0.5306 3.2609 0.3067 1.0152 1.0152 -0.5306Grass - 2 44 150 0.5464 3.4091 0.2933 1.0229 1.0229 -0.5464Grass - 3 36 157 0.6269 4.3611 0.2293 1.0616 1.0616 -0.6269Decid - 1 40 130 0.5294 3.2500 0.3077 1.0146 1.0146 -0.5294Decid - 2 38 125 0.5337 3.2895 0.3040 1.0167 1.0167 -0.5337Decid - 3 36 142 0.5955 3.9444 0.2535 1.0467 1.0467 -0.5955Conif - 1 30 86 0.4828 2.8667 0.3488 0.9913 0.9913 -0.4828Conif - 2 29 80 0.4679 2.7586 0.3625 0.9838 0.9838 -0.4679Conif - 3 29 65 0.3830 2.2414 0.4462 0.9397 0.9397 -0.3830Rock - 1 52 42 -0.1064 0.8077 1.2381 0.6274 0.6274 0.1064Rock - 2 37 57 0.2128 1.5405 0.6491 0.8443 0.8443 -0.2128Rock - 3 44 68 0.2143 1.5455 0.6471 0.8452 0.8452 -0.2143

Figure 7-78. Band 3 and 4 spectral and vegetation index values for sample points in the Arizona sub-scene.

The soil and rock sample points can also experience a lot of variation within a sub-scene and between sub-scenes. Most vegetation will tend to be shades of green. Soil and rock reflectance will vary depending on parent material and geology. The reflectance can vary from bright to dark and include various colors. I think using sample points along with other SAGA modules greatly assists the use of remotely sensed data. My next set of sample points would focus on vegetation cover (after all, vegetation indices are for predicting the existence of vegetation) and include more examples of deciduous, coniferous, riparian vegetation types. In addition, there may be vegetation types unique to the geographic area covered by the satellite scene. Image Classification Image classification is the process of converting continuous reflectance values into categories representing land cover or surface condition. This process is commonly associated with satellite digital imagery. Please note that, although the focus of this section is on remotely sensed data, and in particular on Landsat satellite digital imagery, the techniques described here are also used with non-image data.

Page 265: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

248

Landsat Thematic Mapper Satellite digital imagery measures reflectance from the earth’s surface using eight spectral bandwidths. These bandwidth ranges (referred to as band 1, band 2, band 3, etc.) include several ranges representing visible light and several ranges in the near and middle infrared areas. In addition, one spectral range of emitted or thermal radiation is measured. More information on Landsat imagery is provided in the “Imagery Background Information” section at the beginning of this chapter. Image classification is the process of analyzing multiple band reflectance values for a specific small area of the earth’s surface in order to identify the land cover or a condition that it represents. There are two general image classification approaches used to classify satellite digital imagery: supervised and unsupervised. Supervised classification starts with a set of training sites. The training sites represent “ground truth”; these are areas that have a known land cover or condition. The spectral return values for these cells, i.e., the digital values representing the reflectance values for each spectral band of the sensor, provide the basic data for establishing each land cover class mean and variance. The procedure evaluates the rest of the image cells to determine which of the known land cover classes each cell fits best. The unsupervised classification procedure uses a cluster analysis algorithm to identify clusters of values that seem distinct based on the spectral reflectance values for each spectral band of the sensor. Mathematically, the clustering approach is performed using an iterative series of passes to minimize the within cluster homogeneity and maximize the between cluster heterogeneity. Unsupervised Classification The Imagery - Classification/Cluster Analysis for Grids module in SAGA supports the unsupervised classification process. The unsupervised classification relies on the software to statistically analyze the input multiple bands (or multiple grid data layers in the case of using non-image files) without benefit of what the different spectral or numeric combinations represent. Using the SAGA Cluster Analysis for Grids module the user specifies the number of classes (the default is 10) to analyze. The classification proceeds using statistical rules that are applied to the various multi-band pixels or multi-grid data layer data values. When module execution finishes, the resulting classes must be interpreted and related to ground features or grid data layer themes to assign class names.

Page 266: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

249

Figure 7-79. Settings page for the module Cluster Analysis for Grids.

The choices for the ‘>>Grids’ parameter will be the set of grid data layers representing spectral reflectance in various bandwidth areas. These grid data layers must be a part of a grid system loaded in the current work session. The ‘Grid system’ parameter is used to choose the grid system. You can see in Figure 7-79 that the grid system loaded in the Workspace to the left of the ‘Cluster Analysis for Grids’ window has been chosen. Notice the list of grid data layers below the grid system name. These grid data layers represent spectral reflectance for bands 1 through 7 of a Landsat scene, in this case, actually a sub-scene. This is the Mason County sub-scene used in examples throughout this chapter. Once the grid system has been chosen, the multiple grid data layers representing spectral reflectance can be chosen for the ‘>>Grids’ parameter. When you click with the mouse pointer in the value field to the right of the ‘>>Grids’ label, a small ellipsis appears on the right side. Clicking with the mouse pointer on the ellipsis displays the ‘Grids’ window, i.e., a list of the grid data layers available for the chosen project in the current work session (See Figure 7-80).

Figure 7-80. The ‘Grids’ window displaying a list of grid data layers available for the active project selected in the ‘Grid system’ parameter.

Page 267: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

250

When you move the mouse pointer over a grid data layer name in the list and click the mouse button, the name will become selected and appear highlighted. You can continue choosing layers in the same manner. Clicking on another data layer name will select it also. Both layers will be highlighted. If you click with the mouse on an already highlighted grid data layer name, it will de-select. Once one or more grid data layers are highlighted, you move them to the right side of the window by clicking on the button that displays the ‘>>’ symbols in the center of the window. You can move layers from the right side back to the left side by selecting and using the ‘<<’ symbols button. You can also move data layers back and forth between the two lists by double-clicking with the mouse pointer positioned on the file you want to move. The ‘Up’ and ‘Down’ buttons can be used to move layers up or down in the list. The list order for the selected layers is not important for how this module executes. Once you have selected the layers you want for the module, click the ‘Okay’ button in the upper right of the window. This module generates two outputs. The ‘<<Clusters’ parameter is the grid data layer output. The default in the value field to the right of the ‘<<Clusters’ label is “[create]”. Normally you will use the default. You can replace the default with an existing grid data layer. In this case, the output will overwrite the content of the layer. This may be useful in the case that you are refining the number of classes with subsequent module runs and don’t want to create a new output layer each time. The tabular output for the module is a statistics table (see Figure 7-81). This table provides descriptive statistics for each cluster or class created by the module. The default entry in the value field to the right of the ‘<<Statistics’ label is “[create]”. Normally this is what you will use for this parameter.

Figure 7-81. Example of statistics output from the Cluster Analysis for Grids module.

There are four parameters listed in the ‘Options’ section of the settings: ‘Method’, ‘Clusters’, ‘Normalise’, and ‘Update View’.

Page 268: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

251

Method The ‘Method’ parameter supports three choices you can choose for the cluster analysis procedure. They are: Iterative Minimum Distance (Forgy 1965) Hill-Climbing (Rubin 1967) Combined Minimum Distance/Hillclimbing The default entry for ‘Method’ is “Hill-Climbing (Rubin 1967)”. When you click with the mouse pointer in the value field to the right of the ‘Method’ label, a drop-down list is displayed showing the three methods. The one you choose will be entered into the value field and will be the method used in the execution of the Cluster Analysis for Grids module. Clusters The value field to the right of the ‘Clusters’ label is for entering the number of clusters or classes you want the module to generate. The default is 10. The intent is that the classes represent somewhat homogenous land cover or other feature classes based on the spectral combinations for satellite spectral bands or based on numeric data values from multiple grid data layers representing combinations of land characteristics (e.g., slope, aspect, elevation, soil, etc.). What the classes represent depends on the environment you are applying the module. Normalise The ‘Normalise’ and ‘Update View’ parameters are controlled by check boxes. The default is for the boxes to contain checks which means the option is turned on. Clicking in the box with the mouse will erase the check and turn off the option. The ‘Normalise’ option directs the module to automatically normalize the data values for the input grid data layers using the data standard deviations prior to beginning the clustering process. The setting of this option does affect the output grid data layer data values. Having the ‘Normalise’ option turned on will increase the execution time for the module compared to it being turned off. Update View The ‘Update View’ option causes a map window displaying the output grid data layer to be displayed in the Work Area. This map window automatically opens during execution of the module. The window is updated or refreshed as the module execution progresses in creating the number of clusters or classes specified for the ‘Cluster’ parameter. When the execution is complete, the map window remains displayed in the SAGA Work Area. If you turn this option off the map window does not display during module execution. There are several benefits to having the output map displayed and updated while the module executes. Depending on the size of the input grid data layers, their complexity, and the number of clusters specified in the ‘Cluster’ parameter, the module could take a while to execute. When the ‘Update View’ map window is displayed you see

Page 269: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

252

updates as the module iterates through the input layers over and over until it achieves a solution. Having the ‘Update’ option on or off does not appear to have significant affect on the execution time of the module. Example This example applies an unsupervised classification on a Landsat TM sub-scene. On the ‘Cluster Analysis for Grids’ settings page, the input for the ‘>>Grids’ parameter is bands 1 through 5 for an Olympic Peninsula, Washington Landsat 7 Thematic Mapper sub-scene for Mason County. I will use the default “[create]” entry in the value field to the right of the output parameter ‘<<Clusters’. The ‘Methods’ parameter in the ‘Options’ section will be set to the “Combined Minimum Distance/Hillclimbing” choice. The number of clusters will remain with the default of 10. The ‘Normalise’ and ‘Update View’ options will be turned on; i.e., the boxes will have checks in them. The module executes when I click on the ‘Okay’ button. The settings for this execution are displayed in Figure 7-82.

Figure 7-82. Settings for the Cluster Analysis for Grids module.

When the module starts to execute, a blank map window for the output grid is displayed. This occurs because the box is checked for the ‘Update View’ parameter. The module executes in an iterative fashion. It makes a series of successive passes through all the grid cells assigning each cell to one of the 10 clusters. The objective of the module is to statistically assign each cell to the cluster it best fits. At the lower left, at the bottom of the Work Area display (see Figure 7-83), the progress of the module execution can be observed. The module will display the most recent pass number and the change in variance for the pass. In the figure, you see that at the time of the screen capture, the module is on “Pass: 4”. You will also notice that at the end of each pass, the cluster grid data layer window is refreshed. As the variance approaches zero, the module will be nearing completion.

Page 270: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

253

Figure 7-83. The “pass” and “change” display.

Page 271: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

254

Figure 7-84. Output from the Cluster Analysis for Grids module.

Figure 7-84 displays the grid data layer output from the Cluster Analysis for Grids module. The output contains grid data values for 10 clusters, using data values 0 through 9. The module does not interpret what the cluster classes represent; the user or an analyst must accomplish that. This output was renamed ‘MCclusters10’. A color lookup table was created and named ‘Mcclusters10LUT’. The original colors allocated to each cluster will probably not have any meaning relative to what the cluster classes might represent. For this example, I did a quick interpretation of the clusters in the output, and assigned some names and colors to them. You can see in the legend the results of my interpretation. It would be very easy using the digital elevation model for the area and the Normalized Difference Vegetation Index to make adjustments to this output.

Page 272: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

255

Supervised Classification The Imagery - Classification/Supervised Classification module in SAGA supports the supervised classification process. It is beyond the scope of this User Guide to explore this classification approach in detail. A variety of publications can be accessed that provide much explanation regarding this approach, for example, Computer Processing of Remote-Sensed Images: An Introduction by Paul M. Mather. This module, the Supervised Classification module, requires identification of training sites representing land cover classes. The training sites are often referred to as “ground truth”. The groups of pixels (in our case the pixels are grid cells) in the training sites are examples of each land cover class to be “classified”. This is the primary difference between the unsupervised and supervised classification approaches. The supervised classification starts with “known” sites that represent the land cover classes to be classified. The unsupervised classification approach uses statistical techniques to identify clusters of pixels that may or may not uniquely identify a land cover class of value. Descriptive statistics for the pixels making up the training sites are generated. The entire image is “classified” by applying the land cover class training site statistics to the various combinations of multi-spectral returns using decision rules associated with the chosen method option. In this case, the various satellite bands provide the data representing various ranges of reflectance in the electromagnetic spectrum.

Page 273: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

256

Figure 7-85. The settings page for the module Supervised Classification.

The entry for the ‘Grid system’ parameter must be the grid system the input grid data layers is a part. This module expects these data layers to be files containing spectral reflectance values for earth surface areas. In order to be chosen, the grid system must be loaded in the current work session. When you click with the mouse pointer in the value field to the right of the ‘Grid system’ parameter, a list of loaded grid systems for the work session will display. The default for this parameter is “[not set]”. Once the grid system has been chosen, one or more grid data layers for the ‘>>Grids’ parameter can be selected. When you click with the mouse pointer in the value field to the right of the ‘>>Grids’ label, a small ellipsis appears on the right side. Clicking with the mouse pointer on the ellipsis will display the ‘Grids’ window containing a list of the grid data layers available for the chosen grid system (See Figure 7-86).

Page 274: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

257

Figure 7-86. The ‘Grids’ window displaying a list of grid data layers available for the selected grid system.

When the mouse pointer is positioned over a grid data layer name on the list that you want to select, you click the left mouse button. The name will become selected and highlighted. You can continue selecting additional layers in the same manner. Selected layers will be highlighted. If you click with the mouse on an already highlighted grid data layer name, it will de-select. After one or more grid data layers are selected, you move them to the right side of the window by clicking on the button that displays the ‘>>’ symbols in the center of the window. You can move layers from the right side back to the left side by selecting and using the ‘<<’ symbols button. You can also move data layers back and forth between the two lists by double-clicking with the mouse pointer positioned on the file you want to move. The ‘Up’ and ‘Down’ buttons can be used to move layers up or down in the list. The list order for the selected layers is not important for how this module executes. Once you have selected the layers you want for the module and moved them to the right side of the window, click the ‘Okay’ button in the upper right of the window. The ‘>>Training Areas’ input parameter is a polygon shapes data layer containing polygon objects representing delineations of representative land cover types. These delineations are often referred to as “training sites”. Each of the polygon objects representing a specific land cover type will have a unique numeric attribute or identifier for that cover type. These unique identifiers separate one set of land cover type polygon objects from another set of land cover type objects. Note that the unique attribute or identifier must contain numeric values. You may create an attribute for storing a text string and use it for a text name for the land cover class but the module will need a numeric attribute that also describes the land cover classes. The Supervised Classification module uses the polygons or “training sites” to select spectral values for corresponding grid cells across all of the input grid data layers chosen for the ‘>>Grids’ parameter. The chosen method for the ‘Method’ parameter uses the training site spectral values along with techniques or decision rules related to the methods

Page 275: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

258

approach to identify grid cells that fall within the land cover classes supported by the training sites. The ‘>>Training Areas’ parameter value field is for identifying the polygon shapes data layer containing the “training sites” objects. Prior to execution of the Supervised Classification module, you must make sure that the polygon shapes data layer has either been loaded as part of a project in the current work session or has been specifically loaded using the Shapes/Load Shapes command in the Menu Bar ‘File’ drop down menu. When you click the mouse in the value field to the right of the ‘<<Training Areas’ parameter, a list of the polygon shapes data layers loaded for the current work session displays. Choose the layer from the displayed list. An example of how to create this input polygon data layer is described in the last section of this chapter. Each shapes data layer has a linked attribute table. This will be a dBase (.dbf) file. The ‘>>Training Areas’ parameter input is a polygon shapes data layer. The ‘Class Identifier’ parameter is where you choose the field in the attribute table that provides the numeric cover type identifiers. When you click in the value field to the right of the ‘Class Identifier’ label, a list of the attributes available for the chosen polygon shapes data layer in the ‘>>Training Areas’ parameter displays. The attribute you choose should be a numeric attribute containing data values for the land cover training sites. If you select a text or string attribute, the results will be unpredictable. There are three outputs created by this module: a mandatory ‘<<Classification’ and optional ‘<Quality’ grid data layers and a mandatory ‘<<Class Information’ table of statistics. The mandatory ‘<<Classification’ parameter is one of two grid data layers output from this module. The default in the value field to the right of the ‘<<Classification’ label is “[create]”. The only other valid entry for this parameter is an existing grid data layer. When you click with the mouse in the value field, a drop down list of grid data layers available for the chosen grid system appears. You can choose an existing grid data layer for the value field. If you choose an existing grid data layer it will be overwritten by the output from the module. The ‘<Quality’ output is an optional grid data layer that can be generated by this module. The default entry in the value field to the right of the ‘<Quality’ label is “[not set]”. The output grid layer data values depend on the entry for the ‘Method’ parameter: parallelepiped, minimum distance, mahalanobis distance, maximum likelihood, spectral angle mapping, or binary encoding. You should consult with appropriate references for detailed information about these six method options.

Page 276: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

259

Here is a brief overview of what these values represent according to the option chosen for the ‘Method’ parameter. This output grid data layer is valuable for interpreting the quality of the training sites. Quality layer content for parallelepiped method (“Membership”) The values output to the ‘Quality’ layer, when this method is used, represents the number of classes the combination of values for a specific cell qualify. You can verify this information after executing the module using the input values for each input grid data layer and the ‘<<Class Information’ output table. For example, if three grid data layers were chosen for input, identify the grid cell values for the same cell for all three input layers. Compare a cell value to the lower and upper class boundaries for the corresponding layer in the table (using the columns “01_ROI_MIN” for lower and “01_ROI_MAX” for upper for layer 1, etc.). When all three values fall within the lower and upper class boundaries for the same class for each input layer, it means the cell value combination meets the criteria for the class. When the cell value combination meets the criteria for one or more classes, the total number of classes where the criteria is met is output to the ‘Quality’ layer when the parallelepiped method is chosen. Quality layer content for minimum distance method (“Distance”) When the ‘minimum distance’ option is chosen, values in the ‘<Quality’ grid data layer will be the minimum spectral distance from the mean of the corresponding spectral cell values on the input grid data layers to the statistical spectral mean for the nearest land cover class. Quality layer content for mahalanobis distance method (“Distance”) The values in the ‘>Quality’ layer are similar to the ones when the minimum distance method is used. The difference is that the mahalanobis distance method uses additional statistics (the covariance matrix) in the equation. The variance and covariance are used so that spectral clusters that are highly varied lead to similarly varied classes and vice versa. Quality layer content for maximum likelihood method (“Proximity”) When the ‘maximum likelihood’ method is chosen, data values output to the ‘<Quality’ grid data layer are the maximum probability that the spectral signature of a given grid cell will belong to a specific land cover class. Quality layer content for spectral angle mapping method (“Angle”) The spectral angle mapping technique measures the spectral similarity of image bands to similar image spectral information obtained for training sites. Spectral similarity is defined by calculating the angle between the two spectral sources (i.e., the image bands and the training sites), treating them as vectors in n-dimensional space, with n being the number of bands used. Small values for the angle represent higher spectral similarity between grid cells and reference spectral data (Kruse et al, 1993). The ‘<Quality’ layer contains angle values representing the spectral angle for the grid cell image bands to the spectral information for the chosen class training sites. Quality layer content for binary encoding method (“Difference”)

Page 277: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

260

This method involves the binary coding of image spectral data. The spectral values for each band are compared to the spectral mean for the band. The cell is assigned to that class, for which the grid data values (the band spectral values) is most often above the spectral mean for the band. The data values for the ‘Quality’ layer cells represent the number of times the spectral values were above the spectral mean of the assigned class. The ‘<<Class Information’ output (see Figure 7-87) for the module is tabular output of information and statistics for each delineated land cover class. The default entry in the value field to the right of the ‘<<Class Information’ label is “[create]”.

Figure 7-87. Example of ‘<<Class Information’ table output from the Supervised Classification module.

The example table in Figure 7-87 includes information and statistics (mean “01_ROI_M” and standard deviation “01_ROI_S”) for each of the input grid data layers chosen for the ‘>>Grids’ parameter. Information includes the total number of cells identified in the class (“TOT_N”), the number of cells in the training sites in the class (“ROI_N”), and the minimum (“O1_ROI_MIN”) and maximum (“01_ROI_MAX) data values for the grid data layer values in the class. Figure 7-87 displays a portion of the entire table. Additional mean and standard deviation fields for ‘>>Grids’ inputs 2 through 3 are not in view in the figure. The column titles will change for additional grid data layers by incrementing the first two characters to “02” and “03” in this table. There are six parameters listed in the ‘Options’ section of the settings. They are: ‘Method’, ‘Normalise’, ‘Distance Threshold’, ‘Probability Threshold (percent)’, ‘Probability Reference’, and ‘Spectral Angle Threshold (Degree)’. The module supports six rules for the ‘Method’ parameter for accomplishing the classification. They are: parallelepiped, minimum distance, mahalanobis distance, maximum likelihood, spectral angle mapping, and binary encoding. The default entry for ‘Method’ is “parallelepiped”. When you click with the mouse pointer in the value field to the right of the ‘Method’ label, a drop-down list displays showing six choices. The one you choose will be entered into the value field and will be the method used in the execution of the Supervised Classification module. A brief overview of each method is provided in the earlier section describing the optional grid output ‘<Quality’. You should

Page 278: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

261

consult with appropriate references for detailed information about these six method options. The ‘Normalise’ parameter is a check box. The default is for the box to be blank. Clicking in the box with the mouse will enter a check in the box and turn on the option. The ‘Normalise’ option directs the module to automatically normalize the data values for the input grid data layers using the data standard deviations prior to beginning the classification process. The ‘Normalise’ parameter works with the “parallelopiped”, “mahalanobis distance”, and “maximum likelihood” methods. The ‘Distance Threshold’ parameter is used with the “minimum distance” and “mahalanobis distance” ‘Method’ parameter options. A grid cell will not be classified if the spectral distance for the cell is greater than the value entered for the ‘Distance Threshold’ parameter for all of the land cover class training site spectral means. The ‘Probability Threshold (Percent)’ parameter is used with the ‘Maximum Likelihood’ method. This value is used to set the minimum probability you will accept for allocating a cell spectrally to a land cover class. A grid cell will not be classified if the calculated maximum likelihood probability is less than the percent value entered for this parameter. The ‘Probability Reference’ parameter is used with the ‘Probability Threshold (Percent)’ parameter. This parameter has two options: Absolute or Relative. When the “Absolute” option is chosen, the quality measure cell value will be the calculated probability. If the “Relative” option is chosen, the quality measure determined for the grid cell is the percentage of the probability that was calculated for the assigned class in relation to all classes, i.e., the probability is normalized. ‘Spectral Angle Threshold (Degree)’ This parameter is used with the “spectral angle mapping” option for the ‘Method’ parameter. As noted earlier, this method involves measuring the spectral similarity of image bands to similar image spectral information obtained for training sites. Spectral similarity is defined by calculating the angle between the two spectral sources (i.e., the image bands and the training sites), treating them as vectors in n-dimensional space, with n being the number of bands used. Small values for the angle represent higher spectral similarity between grid cells and reference spectral data (Kruse et al, 1993). Thus, the spectral angle for the spectral information for a specific cell is compared to the spectral angles for the various training sites. If the spectral angle for the cell is greater than all the training sites, the cell will not be classified. Example This example will use the supervised classification approach with the Landsat scene for the Olympic Peninsula, Washington. On the Supervised Classification settings page, there are two input parameters. The grid data layers input (‘>>Grids’ parameter) will be bands 1 through 5 of the Olympic

Page 279: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

262

Peninsula scene. The other input is for the ‘>>Training Areas’ parameter and is a polygon shapes data layer (‘L7trainsites’) containing the polygon objects identifying the land cover training sites. Development of this shapes data layer is discussed in more detail in the last section of this chapter. The default “[create]” option will be used for the value field to the right of the output parameter ‘<<Classification’. The “[not set]” entry for the optional ‘<Quality’ grid data layer output will be changed to “[create]”. The ‘Methods’ parameter in the ‘Options’ section will be set to the “Maximum Likelihood” rule. I will use the default value of “0” for the ‘Probability Threshold (percent)’ parameter. Using a zero means that all cells will be allocated to a land cover class. The module executes when I click on the ‘Okay’ button. The settings for this execution are displayed in Figure 7-88.

Figure 7-88. Settings for the Supervised Classification module example.

Page 280: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

263

Figure 7-89. The ‘Classification’ output from the Supervised Classification module.

Figure 7-89 displays the grid data layer output from the Supervised Classification module. The output contains grid data values for 11 land cover classes, with values 1 through 11. Close examination of the output shows classification conflicts between urban and rock. This is not unusual as urban areas and rock areas often have similar spectral signatures. Also, the spectral signatures for salt water and fresh water need to be refined with more training sites. Preparing the Input Polygon Shapes Data Layer This last section of the chapter describes how the polygons shapes data layer was developed that was used as input for the Supervised Classification module. This description will provide some insight into one approach for developing this input layer as well as how several other SAGA modules can be used. This description is also pertinent to creating other shapes data layers, e.g., a point shapes data layer. Several discussions in this chapter involved a point shapes data layer. The first step is to create an empty, georeferenced, polygon shapes data layer for the same area of coverage as the Landsat TM scene or a grid system that includes it. I chose to focus on creating a shapes data layer for the same area of coverage as the Landsat TM scene.

Page 281: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

264

First, I am going to create a new shapes data layer. The Shapes-Tools/Create New Shapes Layer will be used. Figure 7-90 displays the ‘Create New Shapes Layer’ settings page.

Figure 7-90. The ‘Create New Shapes Layer’ settings page.

The entry for the ‘Name’ parameter is “L7trainsites”. This is what I want the output shapes data layer to be named. This new layer will contain polygon objects. When I click in the value field to the right of the ‘Shape Type’ parameter, a list of four choices is displayed: Point, Multipoint, Lines, and Polygon. I choose the “Polygon” type. An attribute file is part of every shapes data layer. This file contains descriptors for the objects contained in the layer. I want the attribute file for the ‘L7trainsites’ layer to contain 3 attributes: ID (numeric), ClassIdent (numeric), and Name (string). In the value field to the right of the ‘Number of Attributes’ parameter, I enter a 3 since this is the number of attributes I want to track for each polygon object. The ‘Attributes’ parameter is where you define the attributes you are going to use. You enter a name and the type of attribute (numeric or string). The text “9 parameters” that is displayed in the value field is the number of characteristics or parameters for the number of ‘Number of Attributes’ entry. For each attribute there are three parameters, “Node of Attribute”, “Name” and “Type”. The entry for the ‘Attributes’ parameter is the total number of parameters for the ‘Number of Attributes’ entry. In this case, in Figure 7-90, there are “3” attributes, each with 3 parameters, therefore, there is a total of “9 parameters”. When you move the mouse pointer into the value field and click, and ellipsis appears on the right side of the field. The ‘Attributes’ window will appear when you click on the ellipsis with the mouse pointer.

Page 282: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

265

Figure 7-91. The ‘Attribute’ window for the Create New Shapes Layer module example.

The three attributes are entered using the ‘Attributes’ window in Figure 7-91. You can see that there are two characteristics for each attribute: Name and Type. I use the names noted earlier. The ‘Type’ parameters are where you specify whether the attribute data will be numeric or text. Numeric data can be further defined based on integer and floating point. Once I am okay with my entries, I click on the ‘Okay’ button to continue with execution of the Create New Shapes Layer module. I have now completed entering the setup data for a new shapes data layer so I click on the ‘Okay’ button on the ‘Create New Shapes Layer’ window and the module executes. Figure 7-92 displays the new polygon shapes data layer in map view along with the layer description.

Figure 7-92. The ‘L7trainsites’ polygon shapes layer map and ‘Description’.

Page 283: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

266

The ‘Description’ displays the ‘Table Description’ for the attribute table showing the three attributes or data fields that will describe each polygon object. This polygon shapes data layer will be the input polygon shapes data layer for the Supervised Classification module. The layer will contain polygon objects that will be digitized on the screen using the mouse. The ‘ClassIdent’ attribute field will be used for the land cover type number. I will enter a land cover type name in the ‘Name’ field. The Supervised Classification module only needs the values for the ‘ClassIdent’ attribute. This next section will explain how to digitize, on-screen, one polygon object for a land cover class representing one-year old clear-cuts using a ‘ClassIdent’ value of 30. A map window is created in SAGA, starting with a false color infrared composite image (created using the RGB Composite module). This Landsat TM image, ‘L720020922_FCIR2’, 30-meter resolution, has enough detail that general land cover classes can be visually interpreted. In addition to the composite image, the map view will also include the polygon shapes data layer ‘L7trainsites’. The shapes data layer is transparent allowing the “background” or backdrop composite image to be easily seen and interpreted. Figure 7-93 displays this map window; the map window description is displayed below.

Figure 7-93. The Map View window used for on-screen digitizing.

Acceptable digitizing accuracy can be achieved by zooming in on the areas where a polygon is to be digitized. Figure 7-94 displays a zoomed in area that includes a clear-cut

Page 284: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

267

area (in the center) that will be digitized on the ‘L7trainsites’ as one of several polygon objects for the land cover class 30 (Clear-cut 1).

Figure 7-94. Zoomed in area for on-screen digitizing.

Next, I make sure that the ‘L7trainsites’ polygon shapes data layer is active. In the ‘Data’ tab section of the Workspace, I move the mouse pointer to the ‘L7trainsites’ layer name and click with the left mouse button. When the name is highlighted, it means the layer is active. When I click on the ‘Action’ tool ( ) from the Tool Bar I will be able to use the on-screen edit commands for digitizing the polygon boundary for the clear-cut training site. The ‘Action’ tool is selected. The mouse pointer converts to a plus sign with a small ‘i’ in a blue circle in the lower right quadrant of the plus symbol. When I move the new mouse pointer over the map window and press the right button on the mouse, a pop-up list of options is displayed.

Figure 7-95. Pop-up list of vector edit options.

At this point nothing has been selected so most of the options are grayed out and not available. The option I want to select is ‘Add Shape’. In this case, I want to add a new

Page 285: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

268

polygon object. I choose the ‘Add Shape’ option from the list. I move the mouse cursor to where I want to define the first point, press the left mouse button, move to the next point, press the left mouse button, etc. When I have clicked on the last point, I press the right mouse button to end the digitizing process. This action exits me from the ‘Add Shape’ option and automatically initiates the ‘Edit Selected Shape’ option. The object will be selected. In Figure 7-96 you can see that the individual points defining the polygon boundary have “edit” boxes around them.

Figure 7-96. The points and line segments defining a polygon for a clear-cut land cover training site.

In the ‘Edit Selected Shape’ mode there are additional edit functions for adding a new point to a line segment (a line segment is a line between two points), choosing an existing point and moving it to another location by dragging it with the mouse, and choosing an existing point and deleting it. You can add a new point to a line segment by moving the mouse pointer near a line segment. When the pointer is on a line segment a plus symbol will be added to the pointer icon. When the plus is displayed, when you press the left mouse button, a new point will be inserted in the line where the pointer is located. When you move the mouse pointer over an existing point, a circle with a dot in its center will be added to the pointer icon. When you press the left mouse button, the box outline surrounding the digitized point the pointer is on will turn red. This means the point is selected. There are several edit functions available that can be used with selected points and parts. Figure 7-97 displays the pop-up menu that shows when you press the right button on the mouse.

Page 286: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

269

Figure 7-97. Edit functions available for selected points and parts.

When a point has been chosen, if you choose the ‘Add Part’ option, you will be able to add a point, two points connected with a line segment, or three or more points (a polygon). Anything you add will become part of the definition of the chosen polygon object regardless of whether the addition is contiguous to the original polygon object boundary or points. This means you can actually add a polygon not touching the chosen polygon and it will become a part of the polygon. The ‘Delete Selected Part’ will delete the entire object the chosen point is a part. The ‘Delete Selected Point’ will delete the chosen point and draw a new line segment connecting the points that are on either side of the deleted points. Pressing the ‘Delete’ key on the keyboard will also delete the point. I did not have any editing to do on the digitized polygon so I did not choose any of the polygon points. So I can exit from the ‘Edit Selected Shape’ option. I now want to save the polygon object definition. I move the mouse pointer over the map window, press the right mouse button. The pop-up list of options is displayed.

Figure 7-98. Pop-up list of options.

The ‘Edit Selected Shape’ option will have a check to the left of it. This means it is the active option; in this case it is actually a mode. I could modify the polygon by choosing the other option that is not grayed out: ‘Add Part’. I am okay with the polygon definition so I click on the ‘Edit Selected Shape’ option to exit the edit process. The check will disappear.

Page 287: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

270

Figure 7-99. The ‘Edit Shapes’ dialog box.

A small dialog box titled ‘Edit Shapes’ will appear. This box is asking if I want to save the polygon definition (using the ‘Yes’ button) or not (using the ‘No’ button). I click on the ‘Yes’ button. The polygon definition is temporarily saved during the work session. See below for more explanation. The polygon becomes selected. It is filled in yellow. I need to add values for the two attributes in the attribute table for the new polygon. Because the polygon is selected (highlighted), I can view the current attribute settings and edit the settings by clicking on the ‘Attributes’ tab in the ‘Object Properties’ window for the data layer.

Figure 7-100. The ‘Attributes’ tab in the ‘Object Properties’ window.

I enter my data by clicking in the value field to the right of the attribute. When it is highlighted, I type in the attribute value. You can see that I entered ‘30’ for the CLASSIDENT and ‘Clearcut 1’ for the NAME attributes. At the bottom of the ‘Object Properties’ window is the ‘Apply’ button. When I click on the ‘Apply’ button, an ‘Attributes’ dialog box appears. The dialog box question is asking if I want to save the attribute data I entered (using the ‘Yes’ button) or not (using the ‘No’ button). I click on the ‘Yes’ button. The above polygon object is temporarily saved as long as the work session is not terminated. If I have more objects to digitize I can continue on. Otherwise, in order to permanently save the object, I need to use the ‘Save Shapes’ or ‘Save Shapes As…’ commands to save the polygon shapes data layer file. I click on the ‘Data’ tab at the bottom of the Workspace window. I find my shapes layer name, ‘L7trainsites’. I move the mouse pointer to the name, press the right mouse button once, and a pop-up list of options is displayed that includes the ‘Save Shapes As…’ choice. I choose the ‘Save Shapes As…’ choice as the ‘Save Shapes’ option is not available. The ‘Save Shapes’

Page 288: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

271

dialog window is displayed and I follow the directions and save the data layer. Note, if the layer has previously been saved, the ‘Save Shapes’ command will be available. If the layer has not been previously saved, only the ‘Save Shapes As…’ command will be available. These are the actions associated with on-screen digitizing a polygon, entering a couple attributes, saving the new information as part of a polygon shapes data layer, and saving the shapes data layer as a file. A specific land cover class will probably have multiple polygon objects defining its’ training site. All the polygons for a class will share the same unique land cover class number as an attribute. How many training site polygons are needed for statistically defining a land cover class? One general rule equates this “quantity” to the number of image pixels included in all of the polygon objects making up a land cover training site’s polygons. SAGA provides tools that easily convert a polygon shapes data layer to a grid data layer (e.g., the Grid-Gridding/Shapes to Grid module). It would be quite easy to determine how many grid cells or pixels make up the polygons of a particular land cover training class. Another way is to estimate the number based on zooming in on the polygon shapes data layer as it is superimposed on the background grid data layer. In my example, the background grid data layer was a false color infrared composite image. What is the general rule for the minimum number of pixels that should define a land cover training site? For a Landsat 7 Thematic Mapper with 7 bands, you should aim for at least 70 pixels per training class. The rule being that there should be at least ten times as many pixels for each training class as there are bands in the image to classify. You can see that it is quite easy to meet the minimum and you are encouraged to do so. Chapter 7 References Baret, F. and G. Guyot. “Potentials and Limits of Vegetation Indices for LAI and APAR Assessment,” Remote Sensing of Environment 35: 1991, pp 161-173. Deering, D. W., Rouse, J. W., Haas, R. H. and Schell, J. A. “Measuring ‘Forage Production’ of Grazing Units From Landsat MSS Data,” in Proceedings of the 10th International Symposium on Remote Sensing of Environment II, 1975, pp 1169-1178. Huete, A. R., Justice, C., and Liu, H. “Development of Vegetation and Soil Indices for MODIS-EOS,” Remote Sensing of Environment 49: 1994, pp 224-234. Jordan, C. F. “Derivation of leaf area index from quality of light on the forest floor,” Ecology 50: 1969 pp 663-666. Kruse, F. A. Lefkoff, A. B., Boardman, J. W., Heidebrecht, K. B., Shapiro, A. T., Barloon, P. J. and Goetz, A. F. H. “The Spectral Image Processing System (SIPS) –

Page 289: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

272

Interactive visualization and analysis of imaging spectrometer data,” Remote Sensing of Environment 44: 1993, pp 145-163. Mather, Paul M., 2004. Computer Processing of Remotely-Sensed Images: An Introduction. John Wiley & Sons Ltd: England, 324 pp. Richardson, A. J. and C. L. Wiegand. “Distinguishing Vegetation from Soil Background Information,” Photogrammetric Engineering and Remote Sensing 43: 1977, pp 1541-1552. Rouse, J. W., Jr., R. H. Haas, D. W. Deering, J. A. Schell, and J. C. Harlan, 1974. Monitoring the Vernal Advancement and Retrogradation (Green Wave Effect) of Natural Vegetation. NASA/GSFC Type III Final Report, Greenbelt, MD, 371 p.

Page 290: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

273

Chapter 8 – The SAGA Point Cloud (.spc) Data Type SAGA version 2.0.4 introduced a new data type called the Saga Point Cloud (.spc) data type. Support for the use of the data type is available in a set of new modules. These modules are: Import/Export – Shapes/Import Point Cloud from File Import/Export – Shapes/Import Point Cloud from Text File Import/Export – Shapes/Import Stereo Lithography File (STL) Import/Export – LAS/Import LAS Files Shapes – Point Clouds/Cluster Analysis for Point Clouds Shapes – Point Clouds/Drop Point Cloud Attribute Shapes – Point Clouds/Point Cloud Attribute Calculator Shapes – Point Clouds /Point Cloud Cutter Shapes – Point Clouds /Point Cloud Cutter [interactive] Shapes – Point Clouds /Point Cloud Reclassifier / Subset Extractor Shapes – Point Clouds/Point Cloud Thinning (simple) Shapes – Point Clouds /Point Cloud from Grid Points Shapes – Point Clouds /Point Cloud from Shapes Shapes – Point Clouds /Point Cloud to Grid Shapes – Point Clouds /Point Cloud to Shapes Shapes – Point Clouds /Transform Point Cloud Shapes - Point Cloud Viewer/Point Cloud Viewer Point Cloud Type Background Information The increasing availability of point clouds, collected, for example, by airborne Light Detection and Ranging (LIDAR) sensors, has resulted with the emergence of standards for the exchange of point cloud data and software tools supporting data manipulation, processing, and display. A Point Cloud The basic definition of a point cloud is a set of vertices in three-dimensional space, each vertex defined by an x,y,z triple; an X and Y coordinate and a Z altitude value. In addition, on-board sensors supporting the collection of LIDAR data collect ancillary information for each vertex usually including an intensity value, a pulse return number and a time stamp. In this manner, LIDAR sensors collect three-dimensional data typically used to derive digital elevation models. Due to the density of the light emission characteristics of the sensor (light transmission using pulses), a small land surface will be sensed as ground when pulses penetrate canopy cover to the ground, will be sensed as vegetation canopy when pulses are reflected from leaf structures, or could be sensed as structures in the case of being intercepted by buildings, etc. An airborne LIDAR sensor collects massive amounts of raw data. The average density of collected data may be as high as 40 points per square meter.

Page 291: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

274

The Point Cloud Exchange Format As airborne LIDAR data became increasingly available in the 1990’s, from a variety of vendors and sensors, the need to define a data exchange format became clear. The American Society of Photogrammetry and Remote Sensing (ASPRS) approved the first data exchange format standard in May 2003. This was the first version (1.0) of the .las exchange format. The format has experienced several updates with the most recent, version 2.0, occurring July 2009. The purpose of the exchange format is to facilitate the exchange, manipulation, analysis, and storage of point cloud data efficiently. The .las format is a binary data exchange format with variable length records. Much of the .las standard is directly related to LIDAR data. The format can be used to exchange any point cloud geospatial data. Point Cloud Applications As noted above, point clouds collected by airborne LIDAR sensors, are often used to develop high-resolution digital elevation models. These high-resolution models show promise in studying geologic hazards, soil erosion, landforms, environmental issues, faults, etc. In addition, they have illustrated potential in environmental monitoring, emergency management, transportation planning, forest mapping, shoreline management, hydrology, and many other application areas. Importing a .las File The Import/Export – LAS/Import LAS Files module supports the import of the ASPRS versions 1.0, 1.1, and 1.2 .las exchange formats. In addition to the X, Y, and Z coordinate values, eleven other attributes in the .las file can be selectively imported. The ‘Import LAS Files’ settings page is displayed in Figure 8-1.

Page 292: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

275

Figure 8-1 The Import LAS Files module settings page.

The ‘Input File’ parameter is used to identify the storage location and file name for the .las file you want to import into the SAGA environment. In Figure 8-1 you can see that a directory path is entered and a file for importing identified. The name of the file to import is ‘pslc02000019.las’. The ‘Attributes to import besides x, y, z, …’ parameter has 14 attributes that can be chosen for importing. The .las file may or may not include data for all of the attributes. If data is available, it will be usually be stored in the .las file format. Placing a check in the box in the value field to the right of the attribute indicates the attribute is to be imported. The attribute will not be imported if the box is left unchecked. Whether you import additional data attributes, besides the X, Y, and Z coordinates, depends on your project requirements and your knowledge of the quality of the point cloud data you are importing. The attributes imported will be stored as part of the Point Cloud data type and will not be saved in a linked file like attributes are for shapes data layers. In Figure 8-1 you can see that 10 of the 14 attributes are chosen for import. The .las file that is chosen for the value field to the right of the ‘Input File’ parameter will be imported and converted to a SAGA Point Cloud data type. The converted layer will be listed in the ‘Data’ area of the SAGA Workspace. Figure 8-2 displays the ‘Data’ area after execution of the ‘Import LAS Files’ module. The name of the .las file was ‘pslc02000019’.

Page 293: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

276

Figure 8-2 The imported .las file ‘pslc02000019’ listed as a SAGA Point Cloud data type.

When you click on the ‘Description’ tab in the ‘Object Window’ when the ‘pslc02000019’ Point Cloud layer has been selected in the ‘Data’ area of the Work Space, the description lists the ten attributes selected for import. A portion of the description window is displayed in see Figure 8-3.

Page 294: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

277

Figure 8-3. The ‘Description’ tab display for the ‘pslc02000019’ Point Cloud layer.

The display in Figure 8-3 is for a portion of all the descriptive information. Notice that for the three of the attributes listed (field #’s 4, 5, and 6) the data values imported were zeroes. Regardless of whether the attribute is populated with zeroes or real data values in the .las file, if chosen for import, it will be imported. Figure 8-4 displays the ‘pslc02000019’ Point Cloud layer.

Page 295: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

278

Figure 8-4. The ‘pslc02000019’ Point Cloud view window.

I renamed this imported Point Cloud data ‘Skokomish1’ and saved it. Three additional modules are available for importing Point Clouds from different data sources. The Import/Export – Shapes/Import Point Cloud from File module is used to create a Point Cloud dataset from an ESRI point shapes data layer. A Point Cloud can be imported from a raw ASCII file using the Import/Export – Shapes/Import Point Cloud from Text File module. The third module, Import/Export – Shapes/Import Stereo Lithography File (STL) creates a Point Cloud from a stereo lithography file (STL). Cluster Analysis for Point Clouds The Shapes – Point Clouds/Cluster Analysis for Point Clouds module is used with a Point Cloud layer to statistically analyze multiple attributes to produce classes of information based on combinations of input data values. For example, classes can be produced from analyzing combinations of the attributes elevation, intensity and number of the return. This module uses a classification function. There are two other modules in SAGA that use a classification function. They are the Cluster Analysis for Grids and Supervised Classification modules in the SAGA Imagery – Classification library. These modules are discussed in Chapter 7 of this volume. Classification functions are frequently used with satellite imagery for land cover interpretation. They can be used for classifying non-image grid data layers as well. The two classification functions are generally referred to as supervised and unsupervised. The Shapes – Point Clouds/Cluster Analysis for Point Clouds module is in the unsupervised category and the only one of the three modules used with Point Clouds. You will see later

Page 296: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

279

in this chapter that a Point Cloud layer can be converted to a grid data layer. Such a grid data layer could be included as input for use with the Cluster Analysis for Grids and Supervised Classification modules. An unsupervised classification relies on the software to statistically analyze the multiple inputs without benefit of what the different numeric combinations represent. The user specifies the number of classes (the default being 10) to analyze. The classification is based on statistical rules that are applied to the attribute data values. When the Point Cloud has been classified, the resulting classes must be interpreted and related to ground features or themes to determine what classes they represent. The output is a new attribute named “CLUSTER” that is appended to the existing set of attributes for the layer. Figure 8-5 displays the settings page for the Cluster Analysis for Point Clouds module.

Figure 8-5. The settings page for the Cluster Analysis for Point Clouds module.

There is one input parameter (‘>>Point Cloud’) and two outputs (‘<<Result’ and ‘<<Statistics’). The Point Cloud that is chosen for input must be loaded for the work session. The ‘Point Cloud/Load Point Cloud’ command in the Menu Bar ‘File’ drop down menu can be used to load a Point Cloud layer not loaded for the work session or it could be loaded as part of a project.

Page 297: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

280

The two outputs are a new Point Cloud layer and a statistical table. The default entry for both parameters is “[create]”. You could choose an existing Point Cloud layer or table rather than use the default, however, the output will overwrite the content of any existing file chosen. The ‘<<Statistics’ output for the module is tabular output of statistics for each cluster or class created. The output Point Cloud layer will be named for the input layer with “_cluster” concatenated to the name. For example, if the input layer is “Sound” then the default name for the output would be “Sound_cluster”. An additional attribute named “CLUSTER” will be appended to the input layer attributes. The data for this new attribute will be the cluster class the vertex is a member. Thus, if the ‘Clusters’ parameter uses “10”, there will be 10 clusters output, with values 0 through 9. The “CLUSTER” attribute will, therefore, contain values 0 through 9. The default name for the output statistical table is “Cluster Analysis PC” and the name of the input Point Cloud layer concatenated. For example, if the input layer is “Puget”, the default output name for the statistical table would be “Cluster Analysis PC_Puget”. There are four parameters listed in the ‘Options’ section of the settings. They are: ‘Method’, ‘Clusters’, ‘Normalise’, and ‘Update View’. Method The module supports three methods for accomplishing the cluster analysis. They are: Iterative Minimum Distance (Forgy 1965) Hill-Climbing (Rubin 1967) Combined Minimum Distance/Hillclimbing The default entry for ‘Method’ is “Hill-Climbing (Rubin 1967)”. When you click with the mouse pointer in the value field to the right of the ‘Method’ label, a drop-down list is displayed showing the three methods. The one you choose will be entered into the value field and will be the method used in the execution of the Cluster Analysis for Point Clouds module. Clusters The value field to the right of the ‘Clusters’ label is where you identify the number of clusters or classes you want the module to generate. The default is 10. The objective is that the classes represent somewhat homogenous feature classes based on the attributes chosen in the ‘Choose the attributes to use for clustering:’ window (see Figure 8-6). Normalise The ‘Normalise’ and ‘Update View’ parameters are check boxes. The default is for the boxes to contain checks which means the options are turned on. Clicking in the box (when the check is showing) with the mouse will erase the check and turn off the option.

Page 298: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

281

The ‘Normalise’ option directs the module to automatically normalize the data values for the input Point Cloud layer attributes using the data standard deviations prior to beginning the clustering process. Update View The ‘Update View’ option causes a map window containing the output Point Cloud layer to be displayed in the Work Area. This map window will automatically open up during execution of the module. The window will be updated or refreshed as the module execution progresses in creating the number of clusters or classes specified for the ‘Clusters’ parameter. When the execution is complete, the map window will remain displayed in the SAGA work area. If you turn this option off the map window will not be displayed during module execution. There are several benefits to having the output map displayed and updated during execution of the module. Depending on the size of the input Point Cloud layer, the complexity, and the number of clusters specified in the ‘Clusters’ parameter, the module could take a while to execute. When the ‘Update View’ map window is displayed you will see updates as the module iterates through the chosen attributes for the input layer over and over until it achieves a solution. Once you have chosen the settings in the ‘Cluster Analysis for Point Clouds’ window and clicked on the ‘Okay’ button, a second input settings window displays.

Figure 8-6. The ‘Choose the attributes to use for clustering:’ input settings window.

Page 299: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

282

The list of attributes on the ‘Choose the attributes to use for clustering:’ input settings window represents the attributes available in the chosen input file. The check boxes are used to choose the attribute data values that will be used for the cluster analysis. You can enter a check in a box by moving the mouse pointer within the box and clicking the mouse button. A check will appear. You can remove a check using the same procedure. Example This example involves a Point Cloud that represents a subset of a larger Point Cloud. The subset (‘AutzenStad’) contains over 4 million vertices that describe the area that includes Autzen Stadium and the immediate area. This is a football stadium at the University of Oregon in Eugene, Oregon USA. Figure 8-7 displays this extracted Point Cloud.

Figure 8-7. The Point Cloud layer for Autzen Stadium.

The settings page for the Cluster Analysis for Point Clouds module is displayed in Figure 8-8.

Page 300: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

283

Figure 8-8. The ‘Cluster Analysis for Point Clouds’ settings page.

The ‘AutzenStad’ Point Cloud layer has been chosen for the ‘>>Point Cloud’ input parameter in the settings page in Figure 8-8. The defaults are used for the two output parameters and the four options.

Page 301: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

284

Figure 8-9. The ‘Choose the attributes to use for clustering:’ settings page.

The attributes chosen include elevation (“Z”), intensity, and number of the return. You can see that the boxes for the three contain checks. The elevation in the subset Point Cloud has a data range from 411 feet to 479 feet. “Intensity” values range from 0 to 254 and values for “number of the return” from 1 to 4. The Point Cloud layer output from these settings is displayed in Figure 8-10.

Page 302: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

285

Figure 8-10. Cluster Analysis for Point Clouds module output for the ‘AutzenStad’ Point Cloud layer.

The upper portion of Figure 8-10 displays the output Point Cloud layer (‘AutzenStad_cluster’) displaying the classes. The attribute table for the output layer includes the new “CLUSTER” attribute containing data values for the cluster classes. Below the map view window is the statistical table (‘Cluster Analysis PC_AutzenStad’) showing which color is being used for each of the classes. Figure 8-11 displays the statistical table ‘Cluster Analysis PC_AutzenStad’ that is output.

Figure 8-11. The ‘Cluster Analysis PC_AutzenStad’ output statistical table.

Page 303: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

286

The table that is output for the ‘<<Statistics’ output parameter will have three columns of data representing “ClusterID”, “Elements” (the number of vertices in the class), and “Variance”. In addition, there will be one column for each of the chosen input layer attributes. The values in the columns for the attributes represent the mean value for that attribute for the class. Each class will be a row or record in the table. How to Delete a Point Cloud Attribute The Shapes – Point Clouds/Drop Point Cloud Attribute module is used to delete an attribute that is part of a Point Cloud data file. There is an exception. The X, Y, and Z attributes used to define a vertex location in three-dimensional space, cannot be deleted from the attribute table. The module will display an error message if you choose one of them for deletion. Figure 8-12 displays the settings page for the module.

Figure 8-12. The ‘Drop Point Cloud Attribute’ module settings page.

There are two inputs for the module. The first one is where you choose the Point Cloud layer for the ‘>>Input’ parameter. In Figure 8-12 the ‘SubPugetSound1’ Point Cloud layer has been chosen for this input parameter. In order to be chosen, the Point Cloud layer must be loaded in the current work session. The ‘Point Cloud/Load Point Cloud’ command in the Menu Bar ‘File’ drop down menu can be used to load a Point Cloud layer not loaded for the work session. A Point Cloud layer can also be loaded as part of a project. The data file for the ‘SubPugetSound1’ layer has five attributes in it. The first three are x, y, and z. These three attributes are coordinates for a 3-dimensional position. The x and y coordinates provide horizontal position and the z value is the elevation or vertical of the position. When the ‘SubPugetSound1’ .las file was imported and converted to a SAGA Point Cloud layer, two additional attributes were loaded out of the fourteen potential ones available in the exchange file. These two were “gps-time” and “number of the return”.

Page 304: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

287

The ‘Attribute to drop’ parameter is for choosing an attribute you want to delete from the Point Cloud layer file. When you click in the value field to the right of the parameter, a triangle is displayed on the right along with a drop-down list of the attributes making up the Point Cloud layer. In this example, there are five attributes. As you move the mouse pointer over an attribute, its name becomes highlighted. When you click the mouse button, the highlighted attribute will be chosen for this parameter entry. The “gps-time” attribute is shown chosen in Figure 8-12. The output parameter for this module is ‘<<Result’. The default entry for this parameter is “[create]”. This is usually the entry you will use for this parameter. As with other modules, if you want the module output to overwrite an existing Point Cloud data layer, you can choose a Point Cloud data layer from the pop-up list that displays if you click in the value field with the mouse pointer. The default name for the output Point Cloud layer will be the name of the layer chosen for the ‘>>Input’ parameter concatenated with the name of the attribute to be deleted. Using the settings in Figure 8-12, the default name of the output Point Cloud layer will be ‘SubPugetSound1_drop_gps-time’. Once the choices for the parameters are made, the module will execute when you click the ‘Okay’ button on the settings page.

Figure 8-13. Comparing the descriptions for the ‘SubPugetSound1’ Point Cloud layer before (on the left) and after module execution (on the right).

The two displays in Figure 8-13 show the description information for the Point Cloud layer before and after execution of the module. The ‘Description’ tab area for the output Point Cloud data layer on the right does not include the “gps-time” attribute since it has been deleted. Point Cloud Attribute Calculator This module operates in a similar manner to the Grid – Calculus/Grid Calculator, Table – Calculus/Table calculator, and Table – Calculus/Table calculator for shapes modules.

Page 305: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

288

When you execute the module, the settings page displayed in Figure 8-14 appears.

Figure 8-14. Settings page for the Point Cloud Attribute Calculator module.

The entry for the ‘>>Point Cloud’ parameter will be a Point Cloud data layer. The default “[create]” for the ‘<<Result’ parameter instructs the module to create a new Point Cloud data layer using the name of the input layer concatenated with the entry for the ‘Output Field Name’ parameter. A new field will be added to the existing attribute list for the input Point Cloud layer. The ‘Formula’ parameter is for entering the equation using one or more of the attributes for the input Point Cloud data layer. The attributes are referred to in the formula by an alpha character based on their order in the layer attribute list. For example, in the layer attribute list the first three attributes are the X and Y coordinates and the Z value (for elevation). These three attributes would be referred to with “a”, “b” and “c” in the formula. For example, if you want to divide the Z value or elevation by “2”, the formula would be “c/2”. The ‘Output Field Name’ parameter defaults to the entry for the ‘Formula’ parameter. You can use a different name by keying it into the value field to the right of the ‘Output Field Name’ parameter. Whatever appears in this value field will be concatenated onto the input Point Cloud data layer name for the output Point Cloud layer. The new field or attribute can be chosen for display using the ‘Attribute’ parameter in the Point Cloud layer settings. When you choose the Point Cloud data layer in the ‘Data’ tab area of the Workspace, you can view the layer settings in the ‘Object Properties’ window ‘Settings’ tab area. The ‘Attribute’ parameter is near the bottom of the list.

Page 306: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

289

Here is an example. I want to create a new attribute for the ‘Skokomish2’ Point Cloud data layer that displays the existing feet elevations in meters. The conversion factor is the multiplier .3048. The Z attribute is referred to as “c” in the formula and the formula is “c * .3048”. I enter the word METERS in the value field to the right of the ‘Output Field Name’ parameter. This is the name I want to use for the new attribute. Figure 8-15 displays the settings page for the module execution.

Figure 8-15. Settings for the Point Cloud Attribute Calculator example.

The output from this execution is a new Point Cloud data layer named ‘Skokomish2_METERS’. When the new layer appears in the ‘Data’ tab area of the Workspace, I click on it so it becomes the active layer. The ‘Settings’ tab area of the layer ‘Object Properties’ window is displayed in Figure 8-16.

Page 307: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

290

Figure 8-16. The ‘Settings’ tab area for the ‘Skokomish2_METERS’ Point Cloud data layer.

The triangle in the value field to the right of the ‘Attribute’ parameter has been clicked on with the mouse pointer and a drop-down list of the fields or attributes stored for the Point Cloud data layer displays. Notice that the last entry in the list, “METERS”, is the attribute created by the execution of the Point Cloud Attribute Calculator. In this case, it is being chosen for the ‘Attribute’ parameter so the new data can be viewed in a map view window. Selecting a Subset of a Point Cloud Layer Two modules are available for creating a spatially defined subset of a Point Cloud layer: the Shapes – Point Clouds /Point Cloud Cutter [interactive] and the Shapes – Point Clouds/Point Cloud Cutter. A good reason for extracting a subset of a Point Cloud layer is to exclude data from outside of an area of interest. A Point Cloud consists of a large amount of data. Selecting a subset of data to process will facilitate data analysis.

Page 308: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

291

The Shapes – Point Clouds/Point Cloud Cutter will use one of three methods to extract a subset. A bounding box for an area of interest can be defined by entering boundary coordinates. The spatial definition of a grid system or a shapes layer can be used to define a subset. Third, the polygons or selected polygons on a polygon shapes data layer can be used to extract a subset of data. There is an area in the ‘Skokomish1’ Point Cloud layer that I want to select as a subset for viewing and analyzing. I am going to use the Shapes - Point Clouds/Point Cloud Cutter module to create a Point Cloud layer that only includes my area of interest and will result with an easier to handle volume of data. There is an existing grid system that defines the spatial boundaries of the subset.

Figure 8-17. The ‘Point Cloud Cutter’ settings page.

The ‘Skokomish1’ Point Cloud layer is chosen for the ‘>>Points’ parameter. The output parameter, ‘<<Cut’, is using the default “[create]” option. The module will name the output file ‘Skokomish1 [Cut]’. The single option in the ‘Options’ section, the ‘Choose Cut from…’ parameter, has three choices. The “Grid System Extent” choice is chosen for this execution. When I click on the ‘Okay’ button, the module executes. Figure 8-18 displays the output from my execution of the Shapes - Point Clouds/Point Cloud Cutter module using the settings in Figure 8-17. I rename the output layer ‘Skokomish2’.

Page 309: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

292

Figure 8-18. A subset of the ‘Skokomish1’ Point Cloud layer.

The Shapes - Point Clouds/Point Cloud Cutter [interactive] module extracts a subset in an interactive manner. The ‘Define AOI by …’ parameter in the options section of the module settings page supports two choices: “dragging a box” or “digitizing a polygon.” You can use the mouse pointer to drag a box around the area of interest or you can use the mouse pointer to click on the screen to define a series of points defining a polygon. This is an interactive module. This means the module continues to be active until it is selected a second time. If your first attempt to delineate an area of interest was not quite correct, you can quickly and easily try again until you end the module by selecting the module a second time. The next module discussed in this chapter, is the Shapes – Point Clouds/Point Cloud Reclassifier/Subset Extractor module. In addition to reclassifying data values, this module is also used to extract a subset of a Point Cloud layer, but not interactively. The Shapes – Point Clouds/Point Cloud Reclassifier/Subset Extractor Module The Shapes – Point Clouds /Point Cloud Reclassifier / Subset Extractor module serves two general purposes. It can be used to reclassify a Point Cloud attribute or extract a subset of Point Cloud vertices based on the values of an attribute. The reclassification or subset creation is based on one of four options: a single value of an attribute, a range of values, a range of values specified in a lookup table or a range of values specified in a user supplied table. When a subset is being extracted, any value displayed for the ‘new value’ parameter is ignored. “No data” and “other values” are also handled within the three options. These are described in the following description of the module settings. Figure 8-19 displays the settings page for the Shapes – Point Clouds /Point Cloud Reclassifier / Subset Extractor module.

Page 310: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

293

Figure 8-19. The settings page for the Shapes – Point Clouds /Point Cloud Reclassifier / Subset Extractor module.

There are two inputs. The primary input is for the ‘>>Point Cloud’ parameter. A Point Cloud data layer is chosen for this parameter. The ‘Attribute’ parameter is used to choose the attribute for the Point Cloud data the module will be applied. The output parameter is ‘<<Result’. The default entry for this parameter is “[create]”. When you click in the value field to the right of the ‘<<Result’ label, a list of Point Cloud layers available in the work session will display and the “[create]” option will be at the bottom of the list. If you choose an existing Point Cloud for the ‘<<Result’ parameter, it will be overwritten by the output. Generally, you will use the default. The name for the output layer will be the name of the input layer with “_subset” added as a suffix concatenated with the name of the attribute. For example, if the input layer is “CaseInlet” and the “intensity” attribute is chosen for the ‘Attribute’ parameter, the output layer will be named “CaseInlet_subset_intensity”.

Page 311: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

294

The “Options” section is where you choose which of the two general applications (reclassify or extraction) and which of the three options for selecting attribute values to use. The ‘Mode of operation’ parameter is for choosing which of the two general purposes of application for the module: “Reclassify” or “Extract Subset”. When the “Extract Subset” purpose is chosen, any values entered for ‘new value’ parameters will be ignored. The ‘Method’ parameter is where you choose which of the four options to apply to the chosen attribute data values. When you click in the value field to the right of the ‘Method’ parameter, a drop-down list shows four choices. The choices are single, range, simple table, and user supplied table. Note that the simple table and user-supplied table are variations of the same option. Each of the methods has a parameters section. Method single This section has three parameters. The single value in the chosen attribute data that is to be changed is entered in the value field for the ‘old value’ parameter. The new value to assign to the old value is entered for the ‘new value’ parameter. There are five choices for the ‘operator’ parameter: =, <, <=, >=, and >. A single value to replace a single value would use the “=” operator. The other four values will use the entry for the ‘old value’ with a conditional operator. This means that potentially more existing attribute values may be replaced with the single value entered for the ‘new value’ parameter depending on whether the less than (<) or greater than (>) operators are used. Method range The range option involves four parameters. The range to identify the range of old values is specified by two parameters: minimum value and maximum value. The new value parameter functions in the same way as described in the “Method single” section above. The ‘operator’ parameter has two choices: <= or <. The operator chosen is applied to the highest value of the data range defined by the values for the ‘minimum value’ and ‘maximum value’ parameters. When the “<=” operator is chosen, the ‘maximum value’ parameter is used as the maximum value for the range. If the “<” operator is chosen, the maximum value for the range excludes the entry for the ‘maximum value’. For example, if the values for the minimum and maximum values are 3 and 7, when the “<=” operator is used, values between 3 and 7 including 7 will be replaced by the entry for the ‘new value’ or that will be the set of values extracted if the ‘Extract Subset’ choice for the ‘Mode of operation’ has been selected. On the other hand, if the “<” operator is chosen, values between 3 and 7 excluding 7 will be used. Method simple table This method has two parameters: Lookup Table and operator.

Page 312: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

295

The ‘Lookup Table’ is a three-column table with each row representing a single or range of values with a column for a new value. The column titles are “minimum”, “maximum” and “new”. You can see that each row provides the same capability as the ‘Method range’ in combination with the ‘operator’ parameter. The ‘operator’ parameter has four choices: min <= value <max min <= value <= max min < value <= max min < value <max The ‘operator’ choices are applied to the minimum and maximum values entered in the ‘Lookup Table’. The “=” signs in the choices specify whether the actual value in the minimum or maximum column is used or whether is excluded. Method user supplied table This option is very similar to the ‘Method simple table’ option above. The difference is that a pre-existing table can be used if it includes corresponding columns to use for the minimum, maximum, and new values. The pre-existing table must be loaded for the work session using the File/Load Table command or loaded as part of a project. The table is chosen for the ‘>Lookup Table’ parameter. There are three parameters used to identify the columns in the table representing the “minimum value”, “maximum value” and “new value”. When you click in the value field to the right of each of these parameters, a drop-down list of the column names in the table displays. You choose the appropriate column for each parameter by moving the mouse pointer over the correct column name in the list and pressing the mouse button. It is not necessary that the column names equate to the actual names of the three parameters. Special Cases The last section for the module settings is named ‘Special Cases’. This section provides options for handling no data and other values. Figure 8-20 displays this area of the settings page.

Figure 8-20. The ‘Special Cases’ section of the Shapes – Point Clouds /Point Cloud Reclassifier / Subset Extractor module.

The check boxes in the value fields to the right of the ‘no data values’ and ‘other values’ labels determine whether the “special cases” will be applied. Using the “special cases” will not change the value used that represents “no data” for the Point Cloud layer. What it

Page 313: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

296

will do is convert anywhere the “no data” value is used into a valid data value. If you click on the box, inserting a check, the option is activated for the execution of the module. The value field to the right of the labels ‘no data values >> value’ and ‘other values >> value’ contains default values of ‘0’. This means that if you activate either of these special cases, the no data values and other values currently being used in the Point Cloud layer will be changed to “0”. If you do not want to use the default entry (“0”), you can click in the value field with the mouse pointer, select and highlight whatever value is showing, and enter a new value. In the single value and range of values methods, the “no-data” option is evaluated prior to the settings for the approaches. When you use one of the two table methods, the option is evaluated only if the “no-data” value is not included in the look-up table. The “other” values option is always evaluated after checking the settings entered for the method. Example This example uses a subset of a much larger Point Cloud covering an area in Eugene, Oregon USA. The subset is for Autzen Stadium, the football stadium for the University of Oregon and is named ‘AutzenStad’. I used the Point Cloud Cutter [interactive] module to create the smaller Point Cloud that includes the stadium The objective of this example is to create a subset of Point Cloud vertices consisting of second and higher return pulses.

Page 314: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

297

Figure 8-21. Settings to extract a subset of Point Cloud layer for returns 2 and greater.

In the settings page in Figure 8-21, you can see that the ‘AutzenStad’ Point Cloud layer has been chosen for the ‘>>Point Cloud’ input parameter. The attribute “number of the return” is chosen for the ‘Attribute’ parameter. Since the selection criteria is a single value (2), the method “single” is chosen for the ‘Method’ parameter.

Page 315: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

298

Two of the parameters in the ‘Method single’ options section are used. The first one is the ‘old value’ parameter. In this example, the value entered is “2” representing the second pulse return. The “>=” operator is used for the ‘operator’ parameter. This means that vertices with a pulse return attribute value of 2 or greater will be extracted. It is expected that values of 2 and greater depict vegetation and buildings. The ‘new value’ parameter is ignored since the “Extract Subset” choice was made for the ‘Mode of operation’ parameter. This means that the ‘new value’ parameters will be ignored regardless of their setting. The output (‘AutzenStad_subset_number of the return’) from this execution is compared to the input layer in Figure 8-22.

Figure 8-22. Comparing the Point Cloud with all points to the Point Cloud having only the second pulse return.

The input Point Cloud layer contained 4,324,648 Point Cloud vertices. The subset of second pulse return vertices only, contains 324,686 points. Visually you can see the difference in the display. The example output displayed in Figure 8-22 is the result of creating a subset of 2nd and greater pulse returns. This setting, all returns =>2 can be used to generate a vegetation mask. The output in Figure 8-22 contains vegetation and the edges of buildings and other infrastructure. Converting this Point Cloud to a grid and applying a morphological erosion filter will remove the building edges. A Morphological dilation, applied afterwards, will reconstruct the original extent of the vegetation (personal communication with Volker Wichmann, 2010). Thinning a Point Cloud The Shapes – Point Clouds/Point Cloud Thinning (simple) module is used for thinning Point Cloud vertices. The settings page for the module is displayed in Figure 8-23.

Page 316: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

299

Figure 8-23. The Shapes – Point Clouds/Point Cloud Thinning (simple) module settings page.

The ‘>>Input’ parameter is where you identify the Point Cloud layer that is to be thinned. The default entry for the output parameter ‘<<Result’ is “[create]”. You could choose an existing Point Cloud layer for this parameter. If you use an existing layer, it will be overwritten with the output from this module. Normally you will use the “[create]” option. The ‘Stepwidth’ parameter is used for identifying the level of thinning. The number entered will cause the removal of every “ith” point in the file. For example, if you enter a 7, it means that every 7th point in the file will be removed. The smaller the number, the more points will be removed. This module should only be applied to data that is ordered by gps time, otherwise the point removal is not even or uniform. Creating a Point Cloud Layer from Other SAGA Data Types The Shapes – Point Clouds /Point Cloud from Grid Points module is one of two modules that will create a Point Cloud layer from other SAGA data types. In this case, the module focuses on creating a Point Cloud layer using the X and Y coordinates for the layer grid cells and the data values stored in the layer for the Z attribute values. Additional attributes can be included. Figure 8-24 displays the ‘Point Cloud from Grid Points’ settings page for this module.

Page 317: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

300

Figure 8-24. The ‘Point Cloud from Grid Points’ settings page.

The grid system the input parameter data layers (the ‘>>Z value’ and ‘>Additional Values’ parameters) are a part, must be chosen for the ‘Grid system’ parameter. When you click with the mouse pointer in the value field to the right of the ‘Grid system’ parameter, a list of loaded grid systems for the current work session displays. Moving the mouse pointer over a list entry highlights the entry. Clicking the mouse button while the entry is highlighted chooses the grid system. The ‘>>Z Value’ parameter is for choosing the grid data layer that will provide the X, Y, and Z data values for the Point Cloud vertices. The individual grid cells of the grid layer provide the X and Y coordinates for the output Point Cloud vertices. The grid cell data values provide the Z data for the vertices. The grid data layer chosen must be a part of the grid system chosen for the ‘Grid system’ parameter. The ‘>Additional Values’ parameter is used for adding attribute information to the output Point Cloud layer. Remember, the Point Cloud layer does not have a linked attribute table like shapes data layers. Instead, it is more like a multi-variable grid data layer. SAGA grid data layers are single theme oriented. That is, only one theme of data values is stored in a grid data layer. A Point Cloud layer, however, has attribute data stored for each “point” or vertex. One or more grid data layers can be chosen for the ‘>Additional Values’ parameter. Each layer chosen will be included as an attribute for the output Point Cloud layer. The output parameter for this module is the ‘<<Points’ parameter. The default is “[create]”. If you want the output of the module execution to overwrite an existing Point Cloud layer, you can choose a layer from the pop-up list that displays when you click in the value field with the mouse pointer. Generally, it is a good idea to use the “[create]” option. The default name for the output Point Cloud layer is the name of the input layer. The output Point Cloud layer will be listed in the ‘PointCloud’ section of the ‘Tab’ area in the Workspace.

Page 318: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

301

The Shapes – Point Clouds /Point Cloud from Shapes module is the second of two modules that creates a Point Cloud layer from another SAGA data type. In this case, the module will output a Point Cloud layer using a shapes data layer as input. Unlike a grid data layer that is made up of a “continuous” layer of grid cells, a shapes data layer contains vector objects. A point object is defined by a single x and y location. A line object is defined by a series of connected points and a polygon object by a series of x and y coordinates defining a closed object having the same beginning and ending coordinate. The points defining the objects are the only coordinates in a shapes data layer file. Thus, when you produce a Point Cloud data layer from a shapes data layer, the Point Cloud X and Y coordinates for vertices will consist of the X and Y coordinates in the input shapes data layer used to define the layer objects. This is different from a grid data layer where each grid cell “object” has a point defining the cell location. When you execute the module, the settings page in Figure 8-25 displays.

Figure 8-25. The ‘Point cloud from Shapes’ settings page.

The ‘>>Shapes’ parameter will accept any shapes data layer as input, i.e., point, line, or polygon. When you click with the mouse pointer in the value field to the right of the ‘>>Shapes’ parameter, a list of loaded shapes data layers for the current work session displays. Moving the mouse pointer over a list entry highlights the entry. Clicking the mouse button while the entry is highlighted chooses the layer. The ‘Z Value’ parameter is where you choose the attribute in the table linked to the input shapes data layer that is to provide the “Z” values for the output Point Cloud layer vertices. When you click in the value field to the right of the ‘Z Value’ parameter, a small triangle appears on the right side along with a drop-down list of the attributes in the attribute table. Moving the mouse pointer over a list entry highlights the entry. Clicking the mouse button while the entry is highlighted chooses the attribute.

Page 319: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

302

The ‘<<Points’ parameter is the output parameter. The default entry in the value field is “[create]”. If you want the output of the module execution to overwrite an existing Point Cloud layer, you can choose a layer from the pop-up list that displays if you click in the value field with the mouse pointer. Generally, it is a good idea to use the “[create]” option. The default name for the output Point Cloud layer is the name of the input layer. The output Point Cloud layer will be listed in the ‘PointCloud’ section of the ‘Tab’ area in the Workspace. The module will use the attribute chosen for the ‘Z Value’ parameter to provide Z values for the Point Cloud vertices. The ‘Output’ parameter in the ‘Options’ section provides the opportunity to output all of the attributes in the attribute table linked to the input shapes data layer as attributes in the output Point Cloud layer. The default entry for the ‘Output’ parameter is “only z”. Using this choice limits the output for the Point Cloud layer to X, Y, and Z coordinates for vertices in the output. The other option for the parameter is “all attributes”. Using this option will result with all attributes that are numeric in the attribute table linked to the input shapes data layer output as attributes for vertices in the output Point Cloud layer. Attributes containing alpha data will not be output. Earlier it has been pointed out that one of the differences between the Point Cloud data type and the shapes data layer is how they each store attributes. The shapes data layer has an attribute table (in the dBase format) linked that contains attribute data for the stored objects in the layer. The Point Cloud layer data file contains X, Y, and Z data for points and possibly additional attribute data. Thus, the attribute data is stored as part of the Point Cloud layer and not in a linked table or file. If you choose the “all attributes” choice for the ‘Output’ parameter, all of the attributes in the attribute table linked to the input shapes data layer will be stored in the output Point Cloud layer. Figure 8-26 displays the ‘Point Cloud from Shapes’ settings page using a point shapes data layer as input. This layer contains point objects representing addresses. Each object has values for 21 attributes but only the elevation attribute will be imported.

Page 320: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

303

Figure 8-26. An example of the Shapes – Point Clouds /Point Cloud from Shapes module. The ‘>>Shapes’ parameter shows that the ‘MasonFD3addpts’ point shapes data layer is chosen for input. The ‘Z Value’ parameter has the “MasonDEM” attribute chosen. This attribute contains the elevation for each of the point objects. The “[create]” choice is used for the output ‘<<Points’ parameter and “only z” is chosen for the ‘Output’ parameter. Figure 8-27 displays the output using the settings in Figure 8-26.

Figure 8-27. Output from the Shapes – Point Clouds /Point Cloud from Shapes module.

The Point Cloud output is displayed in Figure 8-27. Remember that the X and Y coordinates that are the source of the Point Cloud X and Y vertex coordinates are the X

Page 321: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

304

and Y coordinates for the points defining point objects in the input shapes data layer. In this example, the objects were points. Converting a Point Cloud to a Grid Data Layer The Shapes – Point Clouds /Point Cloud to Grid module is used to convert a Point Cloud layer into a grid data layer. The ‘Point Cloud to Grid’ settings page is displayed in Figure 8-28.

Figure 8-28. The ‘Point Cloud to Grid’ settings page.

The ‘Skokomish2’ Point Cloud layer (a subset of the larger ‘Skokomish1’ layer) is chosen for the ‘>>Points’ parameter. This is an elevation Point Cloud. There are three options in the ‘Options’ section of the settings page. The ‘Output’ parameter has two choices: “only z” or “all attributes”. The number of outputs and their default naming will vary depending on which of the two options are chosen. When you choose the “only z” option for ‘Output’, two grid data layers will be created using the Point Cloud “z” for elevation data values and one showing the number of points encountered for each cell. This latter output is referred to as “Points per Cell” and can be used to evaluate the point density. The second option for the ‘Output’ parameter is “all attributes”. Using this option, two grid data layers will be created (as in the first option) and a grid data layer will be output for each attribute that was loaded into the Point Cloud data layer file. Thus, in addition to the X, Y, and Z attributes, if your Point Cloud layer contains 3 additional attributes, five grid data layers would be output from the module execution; one for “z” value, one for each of the three attributes, and one for the number of points encountered in each cell. In this example I choose “only z”. This means I only

Page 322: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

305

want to use the altitude values and do not want to convert any attributes (at this time) into grid data layers. The next parameter is called ‘Aggregation’. This is an important option. Due to the nature of the LIDAR sensor and the use of pulses for determining “elevation”, the capability exists to select for data the first value, last value, mean value, lowest z, and highest z. It is not known whether any of the values can be equated with ground or treetops but it is most likely that the highest z values resemble a digital surface model (DSM) and the lowest z values include ground. The lowest values could be used as the basis to create a digital terrain model (DTM) using the Grid – Filter/DTM Filter (slope-based) module. The last option is ‘Cellsize’. The default ‘Cellsize’ parameter setting is 1. Using the default means that each cell will be a map unit on a side. In order to create a cell value for every grid cell in the output layer, the module would need to interpolate using some procedure. The module does not apply any interpolation scheme when the output resolution will result with cell values with zero values. These cells will be no data. Figure 8-29 displays the ‘z’ or altitude grid data layer output from this module using a cell size of 15 and “first value” for the ‘Aggregation’ parameter. The name of this grid data layer is ‘Skokomish2 [Z]’.

Figure 8-29. The altitude or ‘z’ grid data layer output using a ‘Cellsize’ of 15.

There is a second grid data layer output. The module calculates how many points from the input Point Cloud layer are mapped to each grid cell. Only the x and y horizontal coordinates are used for this task. This is valuable output, as it will show the point density of the coverage. For this example, this output was named ‘Skokomish2 [Points per Cell]’. SAGA has several modules specifically for interpolating data that could be used if interpolation is needed. For example, the Multilevel B-Spline Interpolation (from Grid)

Page 323: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

306

could be used. SAGA views the Point Cloud layer as a point shapes data layer. This means that the interpolation modules using point shapes data layers as input could be applied. Saving a Point Cloud Layer to Shapes Data Layer The Shapes – Point Clouds /Point Cloud to Shapes module is used to convert a Point Cloud layer to a point shapes data layer. The “z” attribute and any other attributes present will be output to the attribute table. Be forewarned, the high density of Point Cloud vertices results in a similar density of point objects in a shapes data layer. The point shapes data layer, compared to the Point Cloud, will use much more computer memory. I used the ‘Skokomish2’ Point Cloud as input to the Shapes – Point Clouds/Point Cloud to Shapes module. In this example, there will be three attributes: altitude (z), gps-time, and number of the return in the attribute table linked with the output point shapes data layer. The ‘Point Cloud to Shapes’ settings page is displayed in Figure 8-30.

Figure 8-30. The ‘Point Cloud to Shapes’ settings page.

The input chosen for the ‘>>Points’ parameter is the ‘Skokomish2’ Point Cloud layer. The only other parameter for this module is the output parameter ‘<<Shapes’. The default entry for this parameter is “[create]”. As with other modules, if you want the results of the current calculation to overwrite an existing shapes data layer, you can choose a shapes data layer from the pop-up list that displays if you click in the value field with the mouse pointer. Generally, it is a good idea to use the ‘[create]’ option. You can rename the new grid data layer to an existing grid data layer later if desired.

Page 324: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

307

Once I chose the entries displayed in Figure 8-30, I clicked on the ‘Okay’ button and the module executed. The output point shapes data layer is named ‘Skokomish2’ using the name of the Point Cloud layer chosen for the input ‘>>Points’ parameter. The attributes in the Point Cloud layer are output as columns in the linked attribute table for the shapes layer. In this case, the ‘z’ attribute for elevation is in the first column. The two other attributes are output in the next two columns of the attribute table. Figure 8-31 displays the output point shapes data layer, renamed ‘Skokomish2_Point’. It appears mostly black due to the density of the input Point Cloud layer. The right side of the figure displays a zoomed in portion.

Figure 8-31. Output from the Shapes – Point Clouds /Point Cloud to Shapes module.

Transforming a Point Cloud Layer The Shapes – Point Clouds /Transform Point Cloud is used to adjust the overall spatial location of the Point Cloud x and y positions. When you execute the module, the settings page in Figure 8-32 displays.

Page 325: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

308

Figure 8-32. The Shapes – Point Clouds /Transform Point Cloud module settings page.

The ‘>>Input’ parameter is for choosing the Point Cloud layer the options are used applied. In order to be chosen, the point layer must be loaded in the current work session. When you click with the mouse pointer in the value field to the right of the ‘>>Input’ parameter, a list of loaded Point Cloud layers for the current work session displays. Moving the mouse pointer over a list entry highlights the entry. Clicking the mouse button while the entry is highlighted chooses the layer. The module output is a new Point Cloud layer with adjustments in the x and y coordinates. The output is chosen using the ‘<<Output’ parameter. The default for this parameter is “[create]”. If you want the output of the module execution to overwrite an existing Point Cloud layer, you can choose a layer from the pop-up list that displays if you click in the value field with the mouse pointer. Generally, it is a good idea to use the “[create]” option. The default name for the output Point Cloud layer is the name of the input layer concatenated with “[Transformed]”. The settings page for the module displays seven options that can be used in making an overall adjustment to the input Point Cloud layer x and y coordinates. The ‘dx’ and ‘dy’ parameters identify an amount, in coordinate units (meters or feet), to add or subtract to each x and y coordinate pair. For example, if the coordinate units are in meters, if you enter a +10 for the ‘dx’ parameter and a -10 for the ‘dy’ parameter, every x coordinate will be incremented by 10 meters and every y coordinate will be decremented

Page 326: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

309

by 10 meters. This will result with an overall shift of 10 meters in the x direction and a negative 10 meter shift in the y direction. The ‘Angle’ parameter is used for applying an angle adjustment for transforming coordinates. The angle represents an angular amount clockwise from north. The two parameters ‘Scale Factor X’ and ‘Scale Factor Y’ are used to adjust coordinates in the x and y directions by multiplying the coordinate by a scale coefficient. For example, if you wanted to increase the scale 150 percent, you would use a scale factor of 1.5 for both the x and y parameters. The scale factors don’t have to be identical. They could be used to make a minor adjustment in only one area if a consistent scale offset needs to be corrected. The ‘Anchor Point’ option is used to choose a different point, other than coordinate 0,0 for adjustments to be based. The Shapes – Point Cloud Viewer/Point Cloud Viewer Module A Point Cloud viewer is used for generating a three-dimensional view of a Point Cloud layer. The Point Cloud Viewer module provides access to this viewer. Many of the options you can use with the viewer are similar to the SAGA 3-D viewer function but the two viewers are different. Figure 8-33 displays the ‘AutzenStad’ Point Cloud layer using the Point Cloud Viewer module.

Figure 8-33. Using the Point Cloud Viewer tool to view the ‘AutzenStad’ Point Cloud file.

Page 327: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

310

The expected commands to rotate the view around the three axes are located in the sidebar on the left side of the graphic in Figure 8-33. As with the SAGA 3-D function, the three rotation commands can be controlled using the mouse left and right buttons and the mouse wheel with the mouse pointer. If a large volume of data is being displayed, however, it might be easier to use the point bars due to the lag time in performance. Figure 8-34 displays a larger view of the sidebar.

Page 328: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

311

Figure 8-34. The Point Cloud Viewer sidebar.

Page 329: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

312

The settings in the sidebar, in Figure 8-34, are the ones resulting with the display in Figure 8-33. Notice that the “Extent” window at the bottom indicates that the graphic in Figure 8-33 results from selecting a subset within this window, containing the stadium. The red rectangle surrounds the area selected as a subset by dragging a box with the left mouse button (you can use the right mouse button in the “Extent” window to clear the selection). You can also see that the ‘Z Attribute’ parameter is set to the “Z” attribute for elevation and the “intensity” attribute has been chosen for the ‘Color Attribute’ parameter.

Figure 8-35. The ‘Advanced Settings’ page for the Point Cloud Viewer tool.

Figure 8-35 displays the ‘Advanced Settings’ page that is displayed when you click on the ‘Advanced Settings’ button on the sidebar. You can see that a grayscale color pallet has been chosen for the ‘Colors’ parameter. The last figure for this chapter is a stereo anaglyph of Autzen Stadium. This was created by clicking in the box to the left of the “Anaglyph” label on the sidebar.

Page 330: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

313

Figure 8-36. Stereo anaglyph of Autzen Stadium, University of Oregon.

Page 331: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

314

APPENDIX I – Volume 2 Example Data Layers Nearly 200 data layers are used throughout the chapters in examples. This is the list for Volume 2, by chapter. Volume 2, Chapter 1 Grids 104.355; 539x 585y; 460552.807768x 5213286,940169y MCnonPovPop MCpoverty MCpopulation MC1AllTer MC1channels MC1SlopeDEG MC1aspectDEG MCshoolDist MCcensustracts MCdem30 MCwaterbasins 104.355; 171x 158y; 462118.132768x 5256489.910169y WSBasinDEM WSview50 Basin-DistZones Basin-Campground BasinMask Basin-VisualZones2 Shapes Polygon MCwaterbasins MCwatersheds WSviewbasins Volume 2, Chapter 3 Grids 30; 1092x 1268y; 1032087x 715710y ROWlu30 30; 6301x 7066y; 887337x 648000y MFD3genLU30 Rd60 Rd90 Rd120 ROW60 ROW90 ROW120 MFDrdsROW 90; 2101x 2356y; 887337x 648000y

Page 332: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

315

MasonFD3genLU 104.355; 236x 253y; 462118.132768x 5246576.185169y LCchannelnet LCdem30 LCslopeDEG Note: “LC” refers to sub-study area around Lake Cushman, Washington. 104.355; 539x 585y; 460552.807768x 5213286,940169y MCbuffersRoads MClakes MClakesBuffers MCroads10 MasonForestLU MasonGenLU MasonSlpDeg MasonStrmGT6GR MasonStrmBuf MasonStrmLUBuf MasonDirtGraRdsGr MasonForRdDist MasonForRds MasonSlpClasses Shapes Line MasonFD3roads MasonTrans MasonDirtGraRds Point PointSource Polygon MasonFD3ROWs PointDistZones Volume 2, Chapter 4 Grids 104.355; 539x 585y; 460552.807768x 5213286,940169y MCdem30 MC1AllTer MC1AspectDEG MC1AspectRad MC1ridges MC1SlopeDEG MC1SlopeRad Shapes Line MC1contours

Page 333: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

316

Volume 2, Chapter 5 Grids 104.355; 539x 585y; 460552.807768x 5213286,940169y MCcatchmentArea MCchannelNet MCdem30 MCdem30-0-sinks MCdem-diff MCwaterbasins Shapes Line MCchannelNet Polygon MCwaters-Poly Volume 2, Chapter 6 Grids 90; 2101x 2356y; 887337x 648000y FDthree GVOpSpgr MasonGenLU MasonGVgrid MasonSchoolDist MasonSDgrapeview GVOpSpEDGEgr GVOpSpEDGElanduse GVOpSpRoads MasonRoadsGraPav GVOsites MasonSlopesLT3 MasonSlpDeg GVOpSpviewers MasonDEM Site01Vis through Site10Vis Viewer01 through Viewer10 Vzones01 through Vzones10 SeenZones01 through Seenzones10 Shapes Line MasonRoadsGraPav Point GVOpSpObserve Polygon MasonFD MasonSchoolDist

Page 334: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

317

MasonGV MasonCountyBound MasonSDgrapeview FDthree GVOpSpEDGE GVOpSpPoly Volume 2, Chapter 7 30; 1872x 2032y; 460552.807768x 5213286.940169y Grids MCL720020922_1 MCL720020922_2 MCL720020922_3 MCL720020922_4 MCL720020922_5 MCL720020922_7 MCL720020922_8 Pass1 Pass2 Sobelgrid MCfcir MCL7ndvi MCL7ratio MCL7rvi MCL7tvi MCL7ctvi MCL7nrvi MCclusters10 TM12 TM34 TM37 TM52 30; 2595x 2437y; 628995x 3757425 Grids AL71990926_1 AL71990926_2 AL71990926_3 AL71990926_4 AL71990926_5 AL71990926_7 AL71990926_8 AZfcir AL7ndvi AL7ratio AL7rvi AL7tvi

Page 335: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

318

AL7ctvi AL7nrvi ARTM12 ARTM34 ARTM37 ARTM52 30; 8341x 7441y; 345615.000000x 514985y Grids L720020922_1 L720020922_2 L720020922_3 L720020922_4 L720020922_5 L720020922_7 L720020922_8 L720020922_FCIR2 Shapes Point MasonPoints2 ArizPoints2 AZsamples2 MCLsamples2 Polygon L7trainsites Tables MCclusters10LUT Volume 2, Chapter 8 15; 534x 382y; 1088250x 129698y Grids Skokomish2 [Z] Skokomish2 [Points per Cell] PointCloud Skokomish1 AutzenStad AutzenStad_cluster Skokomish2 Skokomish2_METERS SubPugetSound1 AutzenStad_subset_number of the return Shapes Point Skokomish2_Point Tables Cluster Analysis PC_AutzenStad

Page 336: SAGA User Guide Vol2 Cimmery Version 2.0.5 20101209

319