engrg 59910 introduction to gis
TRANSCRIPT
![Page 1: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/1.jpg)
ENGRG 59910Introduction to
GISMichael Piasecki
November 4, 2016
Lecture 10: Raster Analysis
![Page 2: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/2.jpg)
GIS Related?
11/3/2016 ENGRG 59910 Intro to GIS 2
![Page 3: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/3.jpg)
• In our previous discussion of data models, we indicated that Raster GIS is often used because:
• Raster is better suited for spatially continuous data like elevations• Raster is better for creating visualizations and modeling environmental phenomena
• Other continuous data may include: air pressure, temperature, salinity, etc..
• Raster data is a simplified realization of the world, and allows for fast and efficient processing
•A raster GIS performs geoprocessing tasks on a grid based realization of the world
11/3/2016 ENGRG 59910 Intro to GIS 3
Why we use Raster GIS
![Page 4: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/4.jpg)
•Map Algebra Concept
• Typical Local Operation
• Typical Neighbor Operation• Moving Window (size, shape and margin erosion)• Common operations
• Typical Global Operation – Cost Distance
•Operations in ArcGIS• Spatial Analysis Environmental Setting• Toolbox
Outline Today
11/3/2016 ENGRG 59910 Intro to GIS 4
![Page 5: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/5.jpg)
• Map algebra and raster GIS is quite simple to visualize in a spread sheet. An example of multiplication and addition
• The use of arrays make map algebra and raster GIS very computationally efficient
• But, be careful of:• Layers that are not coincident• Different cell sizes
11/3/2016 ENGRG 59910 Intro to GIS 5
Map Algebra
![Page 6: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/6.jpg)
•Map algebra is a cell by cell combination of raster layers using mathematical operations
•Basic Mathematical Operations
• Addition, subtraction, division, max, min, virtually any mathematical operation you would find in an Excel spreadsheet
• Strong analytical functions
Map Algebra
11/3/2016 ENGRG 59910 Intro to GIS 6
• Some Map Algebra Commands in ARC/INFO• Outgrid = grid1 + grid2
• Outgrid = grid1 * 2
• Outgrid = sin(grid1)
• Outgrid = costallocation(sourcegrid, costgrid, accumgrid, backgrid)
• Outgrid = con(>5 (ingrid1),0,ingrid1)
• Outgrid = select(grid1, ‘VALUE = 10’)
![Page 7: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/7.jpg)
• It is a simple syntax similar to any algebra
• Spatial Analysis language
•Developed by C. Dana Tomlin (1990)
• Implemented in many grid analysis packages, including ArcGIS, Idrisi, ArcView Spatial Analyst;
• The implementation in ArcGIS is “Raster Calculator”
• Four classes of operations:• Local, Focal, Zonal and Global
Map Algebra
11/3/2016 ENGRG 59910 Intro to GIS 7
![Page 8: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/8.jpg)
Raster Calculator
11/3/2016 ENGRG 59910 Intro to GIS 8
![Page 9: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/9.jpg)
Raster Operations
11/3/2016 ENGRG 59910 Intro to GIS 9
![Page 10: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/10.jpg)
Local Operations
10
•Work on single cells, one after another, value assigned to a cell depends on this cell only
• Examples:• arithmetic operations with a constant, or with another grid• also logical operations, comparisons (min, max, majority, minority, variety, etc.) – same location but different layers
•Reclassification
11/3/2016 ENGRG 59910 Intro to GIS
![Page 11: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/11.jpg)
Local Operations
11/3/2016 ENGRG 59910 Intro to GIS 11
![Page 12: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/12.jpg)
•Assign data value to a cell based on its neighborhood (variously defined)
•Neighborhood: a set of locations each of which bears a specified distance and/or directional relationship to a particular location called the neighborhood focus (D. Tomlin)
• distance and directional neighbors• immediate and extended neighbors• metric and topological neighbors• neighbors of points, lines, areas...
12
Focal Operations
![Page 13: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/13.jpg)
41
43 6
1
43 6
41
43 65 2
3 441
43 65 2
3 4
11/3/2016 ENGRG 59910 Intro to GIS 13
Define Neighborhoods: Shapes
![Page 14: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/14.jpg)
• shape of neighborhood: | Circle | Rectangle | Doughnut | Wedge | Star
• size of neighborhood: radius (circle), inner and outer radius (doughnut), radius, start and end angles (wedge), width and height (rectangle)
•Operation: | Minimum | Maximum | | Mean | Median | Sum | Range | Standard Dev. | Majority | Minority | Variety |
11/3/2016 ENGRG 59910 Intro to GIS 14
Neighborhood Statistics in Spatial Analyst
![Page 15: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/15.jpg)
Moving Window:
A “window”: cells used to specify the input values for an operation.
11/3/2016 ENGRG 59910 Intro to GIS 15
Define Neighborhood: Moving Window
![Page 16: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/16.jpg)
Focal Operations
11/3/2016 ENGRG 59910 Intro to GIS 16
![Page 17: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/17.jpg)
Example of mean kernel
11/3/2016 ENGRG 59910 Intro to GIS 17
GIS Solution to Margin Erosion
![Page 18: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/18.jpg)
Neighborhood Operations
11/3/2016 ENGRG 59910 Intro to GIS 18
![Page 19: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/19.jpg)
• smoothing ‐ moving averaging
• edge detection
•Grade (slope)
•Orient (aspect)
• Profile
•High pass filter
• assessing variety, etc.
11/3/2016 ENGRG 59910 Intro to GIS 19
Neighborhood Operations
![Page 20: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/20.jpg)
Noise Highlight (high‐pass filter)
11/3/2016 ENGRG 59910 Intro to GIS 20
![Page 21: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/21.jpg)
Noise Reduction (low‐pass)
11/3/2016 ENGRG 59910 Intro to GIS 21
![Page 22: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/22.jpg)
Spatial Filtering ‐ Low and High Frequency Detail and Edges
11/3/2016 ENGRG 59910 Intro to GIS 22
High‐Pass filters emphasize high texture, low pass filters suppress, or minimize texture
543 Composite Result of ENVI 15x15 High Pass Filter – Edge Finding
![Page 23: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/23.jpg)
Directional Edge Detection
11/3/2016 ENGRG 59910 Intro to GIS 23
![Page 24: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/24.jpg)
Overlay functions in map algebra may be performed through addition and multiplication. Union operations with layer addition, clip operations through multiplication.
Union by addition:
Where cells don’t overlap (value + “no data”), new map unambiguous.
With overlap, attribute values are added, so be aware of consequences.
Overlay in Raster Map Algebra
11/3/2016 ENGRG 59910 Intro to GIS 24
![Page 25: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/25.jpg)
Layer A values multiplied by 10
No ambiguous products
(LayerA * 10) + LayerB
11/3/2016 ENGRG 59910 Intro to GIS 25
![Page 26: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/26.jpg)
•Make a new map of the area of interest with cell value = 1, others cell value = 0 or NODATA
•Multiply by existing map
Raster Clip
11/3/2016 ENGRG 59910 Intro to GIS 26
![Page 27: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/27.jpg)
Common Raster Command: CON
11/3/2016 ENGRG 59910 Intro to GIS 27
•Con: Condition, a command in ArcGISIf (layer1>5) then
Output = 1else
Output = 0End if
Nested Con operation:Con(layer1>5, Con(Layer1>10,2,1), 0)
Con(layer1>5, 1, 0)
If (layer1>5) thenif (layer1>10) then
output = 2else
output =1end if
Elseoutput = 0
End if
0 0 1
0 2 0
0 0 0
![Page 28: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/28.jpg)
CON is used for reclassfication
11/3/2016 ENGRG 59910 Intro to GIS 28
![Page 29: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/29.jpg)
•Contain the minimum cost of reaching cells in a layer from one or more source cells.
• The cost may be expressed in different units: $ money, time, or other units of merit.
•Cost = distance * cost per unit of distance (frication surface)• The distance from a source cell is combined with a cost per unit of distance (variable or fixed) to calculate a travel cost.
• Think simple: Distances—in cell dimension units— are measured to/from cell centers and calculated using RMS formulae that keep values positive.
Cost Surfaces – Global Operation
11/3/2016 ENGRG 59910 Intro to GIS 29
![Page 30: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/30.jpg)
• Another way to calculate travel costs• Cell values of a “friction” surface represent the (variable) cost
per unit travel distance for crossing each cell.• Define cell friction on elevation, land cover, etc. (or even friction:
icy slopes!)
Friction Surface: Cost per unit Distance
11/3/2016 ENGRG 59910 Intro to GIS 30
![Page 31: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/31.jpg)
Cost Surface: varied cost
11/3/2016 ENGRG 59910 Intro to GIS 31
![Page 32: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/32.jpg)
Land Use Friction or Cost Explanation
Agriculture 1 Base Cost
Deciduous Forest 4 Cut trees, removed and sold
Coniferous Forest 5 Cut trees, less return
Urban 1200 Conversion very expensive
Pavement 1 Base CostSuburban 1000 See UrbanBarren/Gravel 1 Base Cost
Cost of a new power line
11/3/2016 ENGRG 59910 Intro to GIS 32
![Page 33: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/33.jpg)
Existing Trunk Power line
Cost Surface
11/3/2016 ENGRG 59910 Intro to GIS 33
![Page 34: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/34.jpg)
Types of Raster Analysis
•Math•Distance • Surface analysis• Extraction•Water‐based analysis•Change cell values• Statistical Analysis•Conditional•Weighted overlay
11/3/2016 ENGRG 59910 Intro to GIS 34
![Page 35: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/35.jpg)
•Map comparison is easily facilitated using the Tabulate Area function in ArcGIS (or any decent raster based GIS)
• Determines the cross tabulation between two grid themes on a cell‐by‐cell basis
•Once the tabulations are made, the data is displayed in a simple matrix
• Map one is the X axis and Map two is the Y axis
Comparing Two Maps
11/3/2016 ENGRG 59910 Intro to GIS 35
![Page 36: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/36.jpg)
• Assume we have a 9 cell land cover map from 1990 with three categories: A, B, and C. We also have another map from 2000.
• You can see that the resulting cross tabulation provides a pixel by pixel comparison of the interpreted land cover types with the reference land cover. So, for the upper right hand cell, the 1990 data was B, and the 2000 data was also B. Therefore, this is a match between the two data sets. However, in the lower right cell you can see that the 1990 data indicated a value of C and the 2000 data set had a value of B
• We can now quantify the results into a matrix as shown below.
A BA
B C C
A A B
B BA
B B C
B A C
CrossTabulate
1990 2000
BA BBAA
BB BC CC
BA AA CB
Cross Tabulated Grid
2 02
0 2 1
0 1 1
A B CAB C
11/3/2016 ENGRG 59910 Intro to GIS 36
Cross Tabulation
![Page 37: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/37.jpg)
• The matrix on the right shows the comparison of two hypothetical data sets. The 1990 data set represents the land use in 1990, while the 2000 data set represents the land use in 2000
• As an example, geographic features that were A in 2000, and were A in 1990, represent the upper left hand matrix with the value 2 (there were two pixels that met this criteria). This means that 2 units in the overall map that was A in 1990, was also A in 2000. Similarly, the same exists for B and C. The diagonal represents areas that have not changed.
• But, there may have been times where in 1990 the value was A but in 2000, the value was B. In this case, the 2 represented in the top row of the matrix says that there are 2units of something we said was A in 1990 but is B in 2000
• We can begin to add these number up, by adding an additional row and column. But what do these numbers tell us?
2 02
0 2 1
0 1 1
A B CAB C
1990 Data
2000 Data
2 02
0 2 1
0 1 1
A B CAB C
1990 Data
2000 Data
2 5 2
4
3
2
5
11/3/2016 ENGRG 59910 Intro to GIS 37
![Page 38: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/38.jpg)
• The bottom row tells us that there were two cells that were A in both 1990 and 2000, five cells that were B, and two cells that were C. The rightmost column tells us that there were four cells that were A in 2000, three cells as B, and 2 cells as C. Adding up the Diagonal cells says there were 5 cells where we actually got it right.
• So, the similarities is really a function of:– Total cells on the diagonal / total number of cells.
• (2 + 2 + 1) / (2 + 2 + 0 +0 + 2 + 1 + 0 + 1+1) = 5/9 = .55% agreement
• The change is 45%.• We can also dig deeper and look at A. In 1990 there were 2
A’s. But, by the time 2000 came around there were 4 A’s. The A’s doubled. But, at what cost:
• Well, A grew by replacing 2 B’s. Therefore, we can see that B lost some ground to A. Imagine a real world example of being able to say that as Developed land grew, it actually grew by replacing Forested land: that’s the power of evaluating a cross tabulation.
2 02
0 2 1
0 1 1
A B CAB C
1990
2000
2 5 2
4
3
2
5
11/3/2016 ENGRG 59910 Intro to GIS 38
![Page 39: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/39.jpg)
•Define Extent in ArcGIS• Default is the intersection of your input data• Could be the union of input data• x, y coordinates for the bottom‐left and the top‐right corners.• Could use bookmark or data frame extent
Spatial Analysis Extent
11/3/2016 ENGRG 59910 Intro to GIS 39
![Page 40: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/40.jpg)
Define Analysis Extent in ArcGIS
11/3/2016 ENGRG 59910 Intro to GIS 40
![Page 41: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/41.jpg)
Solution: Resample one map (or both?), so layers have same cell size and are aligned
Incompatible Cell Sizes
11/3/2016 ENGRG 59910 Intro to GIS 41
![Page 42: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/42.jpg)
Analysis Mask
42
• You can specify a processing mask (either a raster or vector layer) to identify cells that will be set to NoData in the output.
Input Raster Analysis Mask Output Raster
11/3/2016 ENGRG 59910 Intro to GIS
![Page 43: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/43.jpg)
A tour of raster functions in ArcGIS
11/3/2016 ENGRG 59910 Intro to GIS 43
![Page 44: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/44.jpg)
•Raster processing extension to ArcGIS
• It has tools for performing a broad variety of spatial analyses, and is especially well‐suited to surface analysis.
•Used to• Create Data• Identify Spatial Relationships• Locate Suitable Sites• Execute sophisticated Path‐finding
•Comprehensive modeling and raster analysis capabilities
•Requires separate license from ESRI than ArcGIS
ArcGIS Spatial Analyst Extension
11/3/2016 ENGRG 59910 Intro to GIS 44
![Page 45: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/45.jpg)
• Convert vector features (point, line, or polygon) to grids
• Calculate distance from every cell to objects of interest (similar to buffers)
•Generate density maps from point features
• Create continuous surfaces from scattered point features
•Derive contour, slope, aspect maps, and hillshades for these features
• Perform cell‐based map and discrete cell‐by‐cell analyses
• Simultaneously execute Boolean queries and algebraic calculations on multiple raster layers
• Perform neighborhood and zone analysis
• Perform raster classification and display
•Use data from different image formats
Spatial Analyst capabilities
11/3/2016 ENGRG 59910 Intro to GIS 45
![Page 46: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/46.jpg)
Spatial Analyst Toolbar
11/3/2016 ENGRG 59910 Intro to GIS 46
![Page 47: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/47.jpg)
•ArcGIS Desktop Help (local computer)•ArcGIS Desktop Resource Center (ESRI website)
Quick Check Spatial Analyst
11/3/2016 ENGRG 59910 Intro to GIS 47
![Page 48: ENGRG 59910 Introduction to GIS](https://reader033.vdocument.in/reader033/viewer/2022051306/62799ee123989c30a10836bc/html5/thumbnails/48.jpg)
• Keep working on your Project!
•After Thx‐giving no more Assigned Labs!
‐> instead, work even harder on your project
Remember
11/3/2016 ENGRG 59910 Intro to GIS 48