Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GEOG 400, Advanced GIS, Fall 2020; Week 5 Lecture 1

alan.kasprak
September 21, 2020

GEOG 400, Advanced GIS, Fall 2020; Week 5 Lecture 1

alan.kasprak

September 21, 2020
Tweet

More Decks by alan.kasprak

Other Decks in Education

Transcript

  1. GEOG 400: Advanced GIS - Raster Week 5 – Lecture

    1 Local Raster Operations Many thanks to Mickey Campbell (University of Utah) for the concepts and figures behind these next few lectures!
  2. GEOG 400: Advanced GIS - Raster 1. Local Operations 4.

    Global Operations 2. Focal Operations 3. Zonal Operations There are four types of raster operations we’ll discuss this week and next: Operations that work on single cell locations one at a time Operations that work on cells within a neighborhood Operations that work on cells within particular zones Operations that work on all cells within the raster
  3. GEOG 400: Advanced GIS - Raster 1. Local Operations 4.

    Global Operations 2. Focal Operations 3. Zonal Operations There are four types of raster operations we’ll discuss this week and next: Operations that work on single cell locations one at a time Operations that work on cells within a neighborhood Operations that work on cells within particular zones Operations that work on all cells within the raster at the same time
  4. GEOG 400: Advanced GIS - Raster 1. Local Operations 4.

    Global Operations 2. Focal Operations 3. Zonal Operations There are four types of raster operations we’ll discuss this week and next: Operations that work on single cell locations one at a time Operations that work on cells within a neighborhood Operations that work on cells within particular zones Operations that work on all cells within the raster at the same time These might seem confusing…
  5. 1. Local analyses A spatial/mathematical operation is performed on every

    single cell, individually, independent of surrounding cells 81 59 2 65 35 50 53 73 82 23 97 47 48 72 39 38 input raster operation [divide by 2] output raster 40.5 29.5 1 32.5 17.5 25 26.5 36.5 41 11.5 48.5 23.5 24 36 19.5 19 There are four types of raster operations we’ll discuss this week and next:
  6. Slide #7 81 59 2 65 35 50 53 73

    82 23 97 47 48 72 39 38 input raster operation [mean] output raster 53.6 neighborhood 2. Focal analyses A spatial/mathematical operation is performed on every single cell, individually, based on some pre-defined neighborhood There are four types of raster operations we’ll discuss this week and next:
  7. [mean] 53.6 53.6 53.6 53.6 53.6 53.6 53.6 53.6 53.6

    3. Zonal analyses A spatial/mathematical operation is performed on groups of cells at the same time, based on some pre-defined neighborhood There are four types of raster operations we’ll discuss this week and next: input raster operation output raster neighborhood 81 59 2 65 35 50 53 73 82 23 97 47 48 72 39 38
  8. 81 59 2 65 35 50 53 73 82 23

    97 47 48 72 39 38 [distance from top left cell] 0 1 2 3 1 1.4 2.2 3.2 2 2.2 2.8 3.6 3 3.2 3.6 4.2 4. Global analyses A spatial/mathematical operation is performed on every cell in the raster (usually in relation to another cell) There are four types of raster operations we’ll discuss this week and next: input raster operation output raster
  9. There are two types of local analyses: 1a. Local analyses

    on a single raster dataset 1b. Local analyses on multiple raster datasets 1. Local analyses A spatial/mathematical operation is performed on every single cell, individually, independent of surrounding cells
  10. Slide #11 81 59 2 65 35 50 53 73

    82 23 97 47 48 72 39 38 input raster operation [divide by 2] output raster 40.5 29.5 1 32.5 17.5 25 26.5 36.5 41 11.5 48.5 23.5 24 36 19.5 19 1. Local analyses A spatial/mathematical operation is performed on every single cell, individually, independent of surrounding cells Performing Local Analysis on a Single Raster one input, one output example: division
  11. 81 59 2 65 35 50 53 73 82 23

    97 47 48 72 39 38 input raster operation [divide by 2] output raster 40.5 29.5 1 32.5 17.5 25 26.5 36.5 41 11.5 48.5 23.5 24 36 19.5 19 1. Local analyses A spatial/mathematical operation is performed on every single cell, individually, independent of surrounding cells Performing Local Analysis on a Single Raster one input, one output example: division Examples??
  12. 81 59 2 65 35 50 53 73 82 23

    97 47 48 72 39 38 input raster operation [divide by 2] output raster 40.5 29.5 1 32.5 17.5 25 26.5 36.5 41 11.5 48.5 23.5 24 36 19.5 19 1. Local analyses A spatial/mathematical operation is performed on every single cell, individually, independent of surrounding cells Performing Local Analysis on a Single Raster one input, one output example: division Examples??
  13. 81 59 2 65 35 50 53 73 82 23

    97 47 48 72 39 38 [1:33] = 1 [34:66] = 2 [67:100] = 3 3 2 1 2 2 2 2 3 3 1 3 2 2 3 2 2 1. Local analyses A spatial/mathematical operation is performed on every single cell, individually, independent of surrounding cells Performing Local Analysis on a Single Raster one input, one output example: reclassify input raster operation output raster Examples??
  14. 81 59 2 65 35 50 53 73 82 23

    97 47 48 72 39 38 [1:33] = 1 [34:66] = 2 [67:100] = 3 3 2 1 2 2 2 2 3 3 1 3 2 2 3 2 2 1. Local analyses A spatial/mathematical operation is performed on every single cell, individually, independent of surrounding cells Performing Local Analysis on a Single Raster one input, one output example: reclassify input raster operation output raster Examples??
  15. 81 59 2 65 35 50 53 73 82 23

    97 47 48 72 39 38 input raster 1 operation (arithmetic) [addition] output raster 147 128 58 87 80 69 78 86 105 122 194 72 141 135 42 136 66 69 56 22 45 19 25 13 23 99 97 25 93 63 3 98 input raster 2 1. Local analyses A spatial/mathematical operation is performed on every single cell, individually, independent of surrounding cells Performing Local Analysis on a Single Raster multiple inputs, one output example: map algebra
  16. 81 59 2 65 35 50 53 73 82 23

    97 47 48 72 39 38 [raster 1 > raster 2] 1 0 0 1 0 1 1 1 1 0 0 1 0 1 1 0 66 69 56 22 45 19 25 13 23 99 97 25 93 63 3 98 input raster 1 operation (arithmetic) output raster input raster 2 1. Local analyses A spatial/mathematical operation is performed on every single cell, individually, independent of surrounding cells Performing Local Analysis on a Single Raster multiple inputs, one output example: logic statements Examples??
  17. 81 59 2 65 35 50 53 73 82 23

    97 47 48 72 39 38 [raster 1 > raster 2] 1 0 0 1 0 1 1 1 1 0 0 1 0 1 1 0 66 69 56 22 45 19 25 13 23 99 97 25 93 63 3 98 input raster 1 operation (arithmetic) output raster input raster 2 1. Local analyses A spatial/mathematical operation is performed on every single cell, individually, independent of surrounding cells Performing Local Analysis on a Single Raster multiple inputs, one output example: logic statements Examples??
  18. Local Operations in ArcGIS Spatial Analyst extension In raster ArcGIS

    world, the Spatial Analyst toolbox is where the magic happens! We will not go over every tool in these toolboxes, but we will review some of the most widely-used and valuable tools in the Spatial Analyst Toolbox. Toolboxes containing primarily LOCAL operators
  19. Math tools Raster data are just gridded numbers. You can

    perform lots of mathematical functions on them Anything you can do to one number, you can do to a grid of numbers! Accordingly, ArcGIS has a vast array of mathematical raster functions built into the software Local Operations in ArcGIS
  20. Math tools Almost all are self explanatory Many of the

    tools can be applied on: a. A single raster e.g. Abs(temp) b. A single raster and a constant e.g. Divide(slope, 2) c. Multiple rasters e.g. Plus(totalPop2000, totalPop2010) Local Operations in ArcGIS
  21. Logical math tools AND Both conditions must be met Local

    Operations in ArcGIS EXAMPLE: I have a raster of mean temperatures in Colorado for 1950-1980 and 2000- 2020 Find those pixels where mean temperatures were over 50 degrees F in… BOTH time periods ONE or ANOTHER of those time periods ONLY ONE of those time periods NEITHER of those time periods
  22. Logical math tools OR One or the other condition must

    be met Local Operations in ArcGIS EXAMPLE: I have a raster of mean temperatures in Colorado for 1950-1980 and 2000- 2020 Find those pixels where mean temperatures were over 50 degrees F in… BOTH time periods ONE or ANOTHER of those time periods ONLY ONE of those time periods NEITHER of those time periods
  23. Logical math tools XOR One or the other condition, BUT

    NOT BOTH Local Operations in ArcGIS EXAMPLE: I have a raster of mean temperatures in Colorado for 1950-1980 and 2000- 2020 Find those pixels where mean temperatures were over 50 degrees F in… BOTH time periods ONE or ANOTHER of those time periods ONLY ONE of those time periods NEITHER of those time periods
  24. Logical math tools NOT Neither condition can be met Local

    Operations in ArcGIS EXAMPLE: I have a raster of mean temperatures in Colorado for 1950-1980 and 2000- 2020 Find those pixels where mean temperatures were over 50 degrees F in… BOTH time periods ONE or ANOTHER of those time periods ONLY ONE of those time periods NEITHER of those time periods
  25. Logical math tools “Boolean logic” Results in binary output (1

    = yes; 0 = no) Local Operations in ArcGIS AND OR
  26. Math tools Don’t worry about bitwise logic – rarely used,

    quite complex Trigonometric math tools are very useful in terrain and hydrologic modeling, so we’ll discuss them more later on The rest should be self explanatory… Questions? Local Operations in ArcGIS
  27. Map Algebra tools Not sure why it needs its own

    toolbox, but the one map algebra tool is the raster calculator Honestly, you’ll rarely use the Math tools on their own You will much more likely use them within the Raster Calculator Local Operations in ArcGIS The Raster Calculator contains all of the tools available in the Math toolbox, just in a more user-friendly format
  28. Local Operations in ArcGIS The Raster Calculator contains all of

    the tools available in the Math toolbox, just in a more user-friendly format
  29. Conditional tools What is a conditional statement? a.k.a. an “if-then”

    statement IF [condition is met] THEN [do something] Very common in computer programming • IF 4 < 5 THEN print “Duh” • Duh IF CONDITION TRUE DO SOMETHING DO SOMETHING ELSE FALSE Local Operations in ArcGIS
  30. Conditional tools For rasters, conditional tools operate on a local

    basis, such that every cell/pixel is assessed individually to determine if some criterion (or criteria) is (are) met • IF [input raster] [condition] THEN [output raster] ELSE [output raster] • IF InRas1 >= 2 THEN OutRas = 40 ELSE OutRas = 30 Local Operations in ArcGIS
  31. Conditional tools The ArcGIS Set Null tool… if a value

    isn’t in the specified range, then set it to NoData Local Operations in ArcGIS
  32. Conditional tools You can also apply conditional tools in the

    Raster Calculator… But you need to know the Python syntax for the tools Local Operations in ArcGIS
  33. Conditional tools Get familiar with the ArcGIS online tool reference

    material!! Local Operations in ArcGIS You are all now entering the realm of GIS professionals Try to figure out problems on your own before asking!! Your boss almost certainly won’t know, and there are times I won’t know either.
  34. Reclass tools We’ve already seen raster classification methods e.g. displaying

    a continuous raster (e.g. slope) as a discrete raster However, there is a difference between classified display (temporary) and reclassification (permanent) Local Operations in ArcGIS
  35. Reclass tools Reclassification is the analytical process by which some

    value (quantity or quality) is converted to another value (quantity or quality) based on a defined set of rules Non-spatial examples… Grades (quantity to quality) Number Grade Letter Grade 93 – 100 A 90 – 92 A- 87 – 89 B+ 83 – 86 B 80 – 82 B- 77 – 79 C+ 73 – 76 C 70 – 72 C- 67 – 69 D+ 63 – 66 D 60 – 62 D- 0 – 59 F Local Operations in ArcGIS
  36. Reclass tools Reclassification is the analytical process by which some

    value (quantity or quality) is converted to another value (quantity or quality) based on a defined set of rules Non-spatial examples… Grades (quantity to quality) Tax brackets (quantity to quantity) Income Tax rate ≥ $418,401 39.6% $416,701 - $418,400 35% $191,651 – $416,700 33% $91,901 – $191,650 28% $37,951 – $91,900 25% $9,326 – $37,950 15% ≤ $9,325 10% Local Operations in ArcGIS
  37. Reclass tools These are all called lookup tables (LUT) •

    Can be based on individual values • Can be based on ranges of values • Output values (right columns) are defined based on input values (left columns) Income Tax rate ≥ $418,401 39.6% $416,701 - $418,400 35% $191,651 – $416,700 33% $91,901 – $191,650 28% $37,951 – $91,900 25% $9,326 – $37,950 15% ≤ $9,325 10% Number Grade Letter Grade 93 – 100 A 90 – 92 A- 87 – 89 B+ 83 – 86 B 80 – 82 B- 77 – 79 C+ 73 – 76 C 70 – 72 C- 67 – 69 D+ 63 – 66 D 60 – 62 D- 0 – 59 F Local Operations in ArcGIS
  38. Reclass tools The ArcGIS Reclassify tool… Local Operations in ArcGIS

    MAKE SURE YOU ACCOUNT FOR YOUR WHOLE RASTER’S RANGE OF VALUES!
  39. Local tools The last set of tools containing local operations

    are… the Local tools Each tool takes a list of two or more rasters and performs some cell-by-cell (local!) analysis e.g. take the past 10 years of temperature raster data and determine the mean e.g. take the past 10 years of snowpack data and determine the minimum (…2017-2018) Local Operations in ArcGIS
  40. Local tools Others… • Combine the attributes every unique combination

    of cell values with a coded value • ______ Frequency compares all rasters to one reference raster • ______ Position determines raster with highest or lowest values • Popularity and Rank rarely, rarely used… don’t worry about them Local Operations in ArcGIS