Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Lecture 5: Introduction to Raster Spatial Analysis ------Using GIS-- By.

Similar presentations


Presentation on theme: "Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Lecture 5: Introduction to Raster Spatial Analysis ------Using GIS-- By."— Presentation transcript:

1 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Lecture 5: Introduction to Raster Spatial Analysis ------Using GIS-- By Austin Troy and Weiqi Zhou, University of Vermont

2 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster data-A Refresher Raster Elements –Extent –# rows –# columns –Coordinates –Origin –Orientation –Resolution –Grid cell

3 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Data Structuring Methods for storing raster data in a more computationally and memory efficient way. Where a raster layer is random noise, this does not work. Requires repetitive patterns or areas of homogeneity. The fewer z values, the easier to compress. Simplest method is cell-by-cell encoding where cell values are stored by row and column number; This is essentially uncompressed. DEM’s and satellite images generally use this structure because there is typically so much variation.

4 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Data Structuring Run-length encoding (RLE): –Compression method that records cell values in groups called “runs.” –It records the starting and ending pixel for a “run” with the same value for a given row, so hundreds of pixels could be recorded with only two values, if they all have the same value and are adjacent. –However, because it measures runs along rows, it is not efficient for two dimensional areas of homogeneity. –RLE can reduce file size by 10:1, depending on data.

5 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Data Structuring Runs: –Row 2: 3,4 –Row 3: 2, 8 –Row 4: 4,7 –Row 5: 5,7 –Row 6: 2,6

6 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Data Structuring Chain code: –This is a more efficient method for dealing with two-dimensional compression –This defines a homogeneous two-dimensional area using cardinal directions and units movements to define bounding perimeter in relative terms from a known point –For instance, go 2 N, 1 W, 1N, 3 W, 1S….etc.

7 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Data Structuring Here, starting from the lower left, the computer would define that coordinate then code 1N, 3E, 1N, 1W, 1N, 2W, 1N, 1E, 1N, 2E etc….. This would define the perimeter of a homogeneous area. All must have exactly the same value

8 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Data Structuring Block code: –A method that uses square blocks to represent areas of homogeneous values –Each block is encoded only with location of one corner cell and the dimensions; since they are square, only one dimension needs to be given –Uses medial axis transformation technique

9 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Data Structuring Quad tree: –Divides a grid into hierarchy of quadrants –Starts with four quadrants; any quadrant that has totally homogeneous cells will not be subdivided further, but is stored as a “lead node” which is coded only with that value and the id of the quadrant. –Any quadrants with more than one value are subdivided again into four more quadrants and again the computer checks for homogeneity. –It keeps on doing this until it has generated all its leaf node or until it gets down to the pixel level –This is known as recursive decomposition –This is good where one part of a grid is very uniform and the rest is heterogeneous.

10 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Data Structuring Quad tree: Homogeneous (all one value) Not homogeneous: more than one value within quadrant

11 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Data Structuring Quad tree: now we break down those quadrants with non-homogeneous values into four sub quadrants Not homogeneous: more than one value within quadrant

12 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Data Structuring Quad tree: and we keep doing this until we’ve come down to the point where there are only homogeneous quadrants, even if those are one cell in dimension Not homogeneous: more than one value within quadrant

13 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Data Structuring Quad tree: One value (leaf node) Mixed values (non-leaf)

14 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Converting vector to raster ------Using GIS-- Slide by Weiqi Zhou

15 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Converting vector to raster ------Using GIS-- Slide by Weiqi Zhou

16 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster Overlay Queries The raster data model performs overlay operations more efficiently than the vector model Raster cells have a one- to-one relationship between layers Raster overlay queries involve the combining of two or more separate thematic layers to identify relationships between them such as: –Areas that are common to all layers –Areas that meet criteria from each layer Query example: [elevation > 2500] AND [Slope>20] ------Using GIS--

17 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Overlay Calculations Map algebra can be performed to identify relationships between layers, or to derive indices that describe phenomena Map calculations create a new layer Calculation example: (Soil_depth_1990) – (Soil_depth_2000)=loss in soil between 1990 and 2000 ------Using GIS--

18 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 ------Using GIS-- Source: ESRI

19 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Query Examples Single layer numeric example: elevation > 2000 ft ------Using GIS--

20 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Query Examples Results in a binary True/False layer

21 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Query Examples Multi-criteria, single layer, categorical map query: looking for all developed land use types, using attribute codes (11, 12, 13) and OR ------Using GIS-- Vertical lines mean OR

22 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Query Examples Results in a 1/0 binary layer, showing urbanized areas ------Using GIS--

23 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Query Examples One can then convert this to a vector shapefile or feature class ------Using GIS--

24 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Query: 2 layer Examples Multi-layer queries are use criteria across two or more layers; in this case we’ll query land use (categorical), elevation (number) and slope (number) ------Using GIS-- Let’s say we want to find identify potential habitat for a rare plant that grows at higher elevation, on steeper slopes and in coniferous forest

25 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Query Examples First we would generate a slope map from out Digital Elevation Model by going to Surface>>Derive Slope ------Using GIS--

26 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Query Examples Let’s say our criteria are elevation >800, slope >20% and land use category= coniferous forest (42) ------Using GIS--

27 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Query Examples Again we end up with a 1/0 binomial query layer ------Using GIS--

28 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Calculation We can also run calculations between layers: here we’ll multiply the k factor (soil erodability factor) by slope; let’s just imagine this will yield a more accurate and spatially explicit index of erodability that factors in slope at each pixel ------Using GIS--

29 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Calculation Now we simply type in the equation and a new grid is created that solves that equation ------Using GIS--

30 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Calculation The darker areas are those with both steep slope and erodable soils. This has the advantage over map query in that we now have a continuous index of values, rather than just a “true” “false” dichotomy ------Using GIS--

31 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Map Calculation and Query We could then, for instance, run a map query to find areas that have high erodability factors and urban land use. ------Using GIS--

32 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Zonal Statistics Now, say we had a proposed subdivision map (this one is made up). We could overlay it on our new index layer and figure out which proposed subdivisions are problematic ------Using GIS--

33 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Zonal Statistics Using Zonal Statistics we could summarize the mean, max or sum of the soil index for each of those units, even though one is grid and one is polygon. Here we summarize by mean the subdivision zones by the soil erodability calculation layer. ------Using GIS--

34 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Zonal Statistics This will create a DBF table that summarizes the pixel values by mean, median, max, min, etc., of all the pixels falling within a given polygon. Each row represent a polygon and each column represents a different summary statistic ------Using GIS-- Polygon layer with zones Unique ID for polygons This joins the DBF table to the polygon layer Statistic by which your data will be charted

35 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Zonal Statistics It gives us a DBF table with values of mean, max, min, stdv, etc. in the table, plus a chart summarizing the means; ------Using GIS--

36 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Zonal Statistics Now we can plot out the subdivision boundaries (zones) by a soil erosion statistic. In this case, clearly the most meaningful one is the mean of the soil erosion statistic. This represent the mean value, by polygon, of all the soil erosion pixels underlaying that polygon ------Using GIS--

37 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Reclassification with Grids ------Using GIS-- Here we reclass to 3 classes, based on natural breaks

38 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Reclassification with Grids ------Using GIS--

39 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Reclassification with Grids ------Using GIS--

40 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Reclassification with Grids ------Using GIS--

41 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Neighborhood Statistics

42 Fundamentals of GIS ©2007 Austin Troy Low Pass filtering Functionality: averaging filter –Emphasize overall, general trends at the expense of local variability and detail. –Smooth the data and remove statistical “noise” or extreme values. Summarizing a neighborhood by mean –The larger the neighborhood, the more you smooth, but the more processing power it requires. –A circular neighborhood: rounding the edges of features. –Resolution of cells stays the same. –Using median instead of mean, but the concept is similar.

43 Fundamentals of GIS ©2007 Austin Troy High Pass Filter Functionality: edge enhancement filter –Emphasize and highlight areas of tonal roughness, or locations where values change abruptly from cell to cell. –Emphasize local detail at the expense of regional, generalized trends. Perform a high pass filter –Subtracting a low pass filtered layer from the original. –Summarizing a neighborhood by standard deviation –Using weighted kernel neighborhood

44 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Neighborhood Statistics Min, max, mean, standard deviation, range, sum, variety Window size/shape

45 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Low pass filtering: filtering out anomalies Bathymetry mass points: sunken structures Low pass filter with bathymetry

46 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 After turning into raster grid We see sudden anomaly in grid Say we wanted to “average” that anomaly out

47 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Try a low-pass filter of 5 cells We can still see those anomalies but they look more “natural” now

48 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Try a low-pass filter of 25 cells The anomalies have been “smoothed out” but at a cost

49 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 We can also do a local filter in that one area

50 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 What about high pass filters? Say we wanted to isolate where the wreck was All areas of sudden change, including our wrecks, have been isolated

51 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Low pass filter for elevation

52 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 A low pass filter of the DEM done by taking the mean values for a 3x3 cell neighborhood: notice it’s hardly different DEM Low pass

53 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 10 unit square neighborhood

54 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 20 unit square neighborhood

55 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 In this high-pass filter the mean is subtracted from the original It represents all the local variance that is left over after taking the means for a 3 meter square neighborhood

56 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 We do this using the map calculator

57 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 If we do a high-pass filter by subtracting from the original the means of a 20x 20 cell neighborhood, it looks different because more local variance was “thrown away” when taking a mean with a larger neighborhood Dark areas represent things like cliffs and steep canyons

58 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Using standard deviation is a form of high-pass filter because it is looking at local variation, rather than regional trends. Here we use 3x3 square neighborhood

59 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Note how similar it looks to a slope map because it is showing standard deviation, or normalized variance, in spot heights, which is similar to a rate of change. Hence it is emphasizing local variability over regional trends. The resolution of the slope is quite high because it is sampling only every nine cells. When we go to a larger neighborhood, by definition, the resulting map is much less detailed because the standard deviation of a large neighborhood changes little from cell to cell, since so many of the same cells are shared in the neighborhood of cell x,y and cell x,y+1.

60 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Here is the same function with 8x8 cell neighborhood. Here, the coarser resolution due to the larger neighborhood makes it so that slope rates seem to vary more gradually over space

61 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Later on we’ll look at filters and remote sensing imagery, but here is a brief example of a low-pass filter on an image that has been converted to a grid. This can help in classifying land use types

62 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster terrain functions in Arc GIS Arc GIS allows you to take a digital elevation model and derive: Hillshade Aspect Slope Contours

63 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster terrain functions in AV DEM + Hillshade = Hillshaded DEM ------Using GIS-- +=

64 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster terrain functions in AV This is done by making a hillshade using Spatial analyst, putting the hillshade “under” the DEM in the TOC and making the DEM transparent ------Using GIS--

65 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Raster terrain functions in Arc GIS Slope: Contours:Aspect: ------Using GIS--

66 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Viewshed analysis This is a multi-layer function that analyzes visibility based on terrain. It requires a grid terrain layer and a point layer and produces a visibility grid layer that tells you where the feature can be seen from, or alternately, what areas someone standing at that feature could see (remember, line of sight is two way). If there are more than one point feature, then each grid cell tells you how many of the point features can be seen from a given point. However in that case, you lose information about the other direction; You don’t know which features can see a particular grid cell. Viewshed analysis can use “offsets” to define the height of the viewer or of the object being viewed; designated using a new field in the input layer’s attribute table.

67 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Viewshed analysis Let’s say we’re local planners who are considering putting in a new waste treatment facility in valley where the vacation homes of five rich and powerful Hollywood executives are located. We want it in a place that won’t ruin anyone’s views, since they comprise 95% of the local tax base. This generates a grid with three values, representing how many houses can see a given pixel

68 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Viewshed analysis This is done in ArcGIS 8, but can also be done in ArcView. Red represents areas that can be seen by 1 house, blue by 2 or more

69 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Viewshed analysis In order to compare the viewability of several facilities, separate viewshed analyses need to be done for each feature. In the next example we will look at three candidate sites for a communications tower. Each will produce a viewability grid. This grid can then be superimposed on a layer showing residential areas. Since each grid will belong to a different tower, we can tell which tower will be most viewable from the residential areas through simple overlay analysis.

70 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Viewshed analysis In this case, red is for tower 1, blue for 2 and green for 3

71 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Proximity ------Using GIS-- Introduction to GIS Can use raster distance functions to create zones based on proximity to features; here, each zone is defined by the highway that is closest

72 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Distance Measurement Can create distance grids from any feature theme (point, line, or polygon) ------Using GIS--

73 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Distance Measurement Can also weight distance based on friction factors, like slope ------Using GIS--

74 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Combining distance and zonal stats Can also summarize distances by vector geography using zonal stats ------Using GIS--

75 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Combining distance and zonal stats Here we summarize by the mean ------Using GIS--

76 Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Density Functions We can also use sample points to map out density raster surfaces. This need to require a z value in each, it can simply be based on the abundance and distribution of points. Pixel value gives the number of points within the designated neighborhood of each output raster cell, divided by the area of the neighborhood

77 Fundamentals of GIS Density Functions Lecture Materials by Austin Troy except where noted © 2008

78 Fundamentals of GIS Density Functions Lecture Materials by Austin Troy except where noted © 2008


Download ppt "Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Lecture 5: Introduction to Raster Spatial Analysis ------Using GIS-- By."

Similar presentations


Ads by Google