Sustainability: Future Geoscientists and African Minerals ...
Geol 588 GIS for Geoscientists II -...
Transcript of Geol 588 GIS for Geoscientists II -...
Geol 588 -
GIS for Geoscientists II
Lecture 1, Jan. 14. 08
1
Today
• (Day/Time for lecture / lab)
• Syllabus
• Introductions
• Using the GIS lab’s Delphi server
• WebCT
• Making screenshots
2
Syllabus
• Full syllabus on WebCT
• Format: Lecture + Lab (exercises)
• Lecture may include “follow along” activities
• Thu.: 1 hr lecture, pause,1 hr lab
• Tue. 2 hr lab (with pause)
• No text book (Arc pdf manuals are online)
• Start with chapter 15 of Mastering ArcGIS *
3
• Lab: class exercises (together)
• No regular home work assignments
• Graded exercises: during lab (I’ll be present to help) + on your own time (if needed)
• Documentation-only exercise (~ 10 pts)
• describe GIS methods and results of a class exercise (text + screenshots)
• Grade: effectiveness of your description
• good explanation > good understanding
• Time: 1 week
4
• Variation exercise (20 - 30 pts)
• work on a variation of a class exercise
• same data, use more/different methods
• document the results (screenshots)
• differences? explain/speculate
• Grade: results + clarity of documentation
• Time: 1 week
5
• Mini-project (30 - 50 pts)
• new data + series of tasks
• use many different methods as you see fit
• document methods used + results (text + screenshots)
• Time: 1-2 weeks
• Your advantage to keep good exercise notes!
•All graded exercise: may use Word or Powerpoint
•Additional points for intelligent thoughts about methods and results: good/bad aspects, caveats, alternatives, real-world connections,
6
• Quiz:
• 2 quizzes: open book (notes), test theory
• 20 min to answer 3 of 4 questions (write text)
• Midterm, Final exam (open book)
• Multiple Choice part (15 min.)
• Practical part (90 min. - should only need 60 min.)
• Class (final) project (last 3 weeks)
• poster (only electronic form needed!)
• 10 min. oral presentation (10 powerpoint slides)
• Material up to you (your research?), start early!
7
• Lecture feedback (WebCT) (class participation)
• Best/Worst of last lecture
• Clearest/Muddiest point of last lecture
• “What I learned today”
• Intelligent* question about material
• Total Grade:
• quizzes: 10%
• midterm: 20%, Final Exam: 20%
• graded exercises 20%
• class project (includes oral presentation): 20%
• class participation 10%
8
Topics
• raster data concepts (general)
• types of rasters: ERSI Info grid, images, DEMs, satellite img., int vs. float vs. categories
• images: color-indexed, RGB vs greyscale(luminance), statistics, histograms,
• raster analysis setup (temp/perm rasters, mask, env., raster information)
• using the ModelBuilder interface (ArcToolbox)
• raster symbolization (color-ramp, stretching, classified, histogram)
• raster projection issues
9
• raster import/export/conversion: vector data, TIN, raster file types (geotiff, grid, ASCII)
• map algebra/Raster Calculator (boolean overlay, mask, NoData)
• cell statistics (map stack math)
• neighborhood stats (moving kernels)
• zonal (summary) statistics
• distance analysis (straight line, least-cost-path)Interpolation (IDW, natural neighbors, Spline, (((kriging)))
10
• Terrain (surface) analysis:
• DEM, TINs (3D analyst), slope, azimuth, contour, cut-fill, viewshed, hillshade
• (hydrological analysis: flow direction, accumulation, watershed delineation)
• Suitability analysis
• Volume/thickness analysis
• Data sources for rasters (Iowa DNR, USGS seamless)
• Geo referenceing
11
Instructor – Chris Harding
•Masters Degree in Geology (Geoinformatics)
•Worked for Lynx Geosystems (Vancouver, Canada) writing GIS software
• Ph.D. in Geology from University of Houston
•Assistant Professor Geoscience Department.
•Contact info: [email protected], tel. 4-4868,
Office: 2635 Howe Hall, Rm. 2635
Introductions
12
Your turn, tell us:
• Name ?
• Major ?
• Advisor ? Thesis project ?
• Prior GIS involvement ?
• Why are you taking this course ?
13
Wrap-up
• Week of March 17: Midterm
• Week of May 5: Final Exam
• Until next session: read p. 523 - 532 in Chapter 15, Mastering ArcGIS
• WebCT: GIS materials folder
• Delphi: geol588\data\MGIS_chpt_15.pdf
• Try WebCT, delphi
14
Geol 588 -
GIS for Geoscientists II
Lecture 2, Jan. 17. 08
1
Today
• Assignment: making screenshots (clear?)
• Examples of using raster (Spatial Analyst)
• Raster concepts (intro)
• Pause
• go through first part of MGIS Ch. 15 tutorial
2
• Derive new information
• Visualize/analyze properties
• Find area most suitable for an objective
• Suitability analysis
• Identify the best path between locations
Examples of Raster GIS tasks
3
• Perform distance and cost-of-travel analyses
• Perform statistical analysis for predetermined zones
• Interpolate data values for a study area based on samples
4
• Clean up a variety of data for further analysis
• Generalization (“image processing”)
• Has anybody used any of these fucntions?
5
• cells (pixels) in rows (vertical) and columns (horizontal)
• 2D matrix, 2D array
• cell: width hight (same?)
• resolution
• Cartesian (index)
• georeferenced (UTM)
• Extend
Inside a raster
6
• Surface (elevation)
• Continuous Data
• no clear boundary
• each cell:
• real lnumber, floating point value
• at center of cell
7
• thematic data
• nominal (categorical)
• class (name, “concept”)
• cell filled with whole number
• ordinal (ranked) data
• integer data (value) as index
Value Count Landcover
1 6 Forest
2 8 Lake
3 10 Urban
8
• image = raster (*)
• satellite image
• four ways of displaying raster/image
• colormap = 255 color ramp
• multiband: overlap 3 images
9
• NoData “values” (raster)
• “transparent” (image)
• no data (elevation) measured
• ArcGIS: word (NoData)
• internally” “magic” number
• any operation with NoData yields NoData
• set Cells to NoData
10
• Math with binary rasters
• presence = 1 (True, Yes)
• absence = 0 (False, No)
• Boolean function: AND, OR ... ; Math: +, -, ...
A AND B
A XOR B A NOT B
A OR B
A B
0
11
0
110
11
0
11
0
11
0
1
2
11
• Suitability Analysis
• Best site for new School
• define desired rules
• slope < 10 perc.
• close to recreation
• not close to other schoole
• Accept simplification
• closeness = straight line distance
• reclass inputs to 1 - 10
• weighted average of all inputs
• 10 = “perfect spot”
12
• Getting help:
• Public (P:) drive - ESRI folder
• Build-in help: F1, ArcToolbox Tools: right side panel
• Webhelp for ArcGIS 9.2: http://webhelp.esri.com/arcgisdesktop/9.2/
• Tutorials (flash video), including ArcGIS extensions:http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Tutorials
13
14
Class Exercise 1• model (predict) snail habitat via “rules”
• snails like (only):
• elevation 1200 m - 1600 m
• limestone
• coniferous trees
• snails hate:
• too-close-to-roads (squish!)
• Task: use boolean maps (like/hate)
• copy \\delphi\Geol588\data\MGIS_ch15 folder to your student folder (pdf with instructions)
• load MapDocuments/ex_15a.mxd
• follow along - make notes (graded exercise later)
15
Geol 588 -
GIS for Geoscientists II
Lecture 3, Jan. 24. 08
1
Today
• Topographic functions (surface analysis)
• Slope, Aspect, Hillshade, Viewshed
• (connect to delphi, start ArcMap)
• Pause
• Image/Raster manipulation via Python
2
• multiband: overlap 3 images
• Red, Green, Blue
• 3 intensities:
• 0 (black) - 255 (Red, Green, Blue)
3
Digital Elevation Model (DEM)
• Digital Terrain Model (DTM)
• topography: Elevation (ft. or meter)
• US Geological Survey:
• 7.5’ maps: 10 m, 30 m; 1degr.: 90 m
• National Elevation Dataset (NED): 10 m (?)
• Shuttle Radar Topography Mission (SRTM): 90 m
• raster values: large integers (1243 ft) or float (543.2 m)
4
Slope & Azimuth
5
Slope
• Based on elevation difference of cell to elevation of surrounding cells
• Gradient at cell (center)
• Gotcha: X/Y are in meters, elevation (Z) is in feet
• Solution: multiply elevation by 3.280 (Z-factor)
• Spatial Analyst -> Surface Analysis or ArcToolbox - Spatial Analyst tools (NOT TIN slope!)
• geol588\data\mgisdata\BlackHills\rasters\dem2
6
Slope
• How to symbolize?
• Properties - Symbology: Classified vs Stretch
• Apply a color ramp from elevation A (1230 ft) to elevation B (1423 ft)
• Gotcha: A and B are not always min and max !
• Types of Stretch: Standard deviations (2 sigma default), user sets min & max, none (data min & max)
• Select color ramp by name (right-click - Graphic View)
7
Aspect
• direction of cell center, when looking down towards max. (!) slope
• in degrees (0 - 360) from North, circular data type
• Problem: How to effectively convey direction?
• Looks like “3D” slopes (similar to hill shading)
• Spatial Analyst - Surface Analysis, ArctoolBox - Spatial Analysis Tools(!)- Aspect
8
Hillshading• Trick to fool our eyes to see 3D relief
• Simulate Sun from direction (0-360) and angle (0-90)
• Gotcha: Sun must be in the North (270 - 90), otherwise relief looks inverted (human evolution: sun from above)
• 10-50% transparent, drape over DEM
• graphical only(Symbolization) - less options
• Spatial Analyst - Surface Analysis, ArctoolBox - Spatial Analysis Tools(!)
9
Viewshed
• needs a shapefile with points (Sturgis -summits)
• Which cells can be seen from these points?
• Shoots rays from point to each cell, check for intersect with terrain
• Can be more complex - add more data to points: height, view angle, distance (more next lab)
• Spatial Analyst - Surface Analysis, ArctoolBox - Spatial Analysis Tools(!)
10
5 min pause
11
Python Exercise
• copy geol588/data/588_python_img_exercises to your folder (E:)
• on python code (.py), snake-icon: right-click - Edit with Idle)
• Idle: editor window (write code), shell window (output)
• Run code: click on editor, Press F5 (yes to save)
• will print output into shell window
• Abort (“hanging”): Press Control-F6
• Let’s look at 1_show_raster_true_elev_in_ft.py
http://www.monty-python.com/mp/cover.gif
12
Geol 588 -
GIS for Geoscientists II
Lecture 4, Jan. 31. 08
1
Today
• Ex. 2 solution
• Neighborhood & zonal functions
• (ch. 15 tut. pp 547 - 551)
• also: Regions vs. Zones
• Pause
• More about the raster calculator
2
• 3 binary rasters (Red, Green, Blue):
• Elev: (raster, int or float), Elevation > 1400
• Veg: (vector, cat.):TREE_SZ96 = ‘O’ OR TREE_SZ96 = ‘L’
• Soil: (vector, cat.) NAME = "Madison Limestone"
• SnailHab_1 = Elev * Veg * Soil or: Elev AND Veg AND Soil
• Min: 0 * 0 * 0 = 0, Max: 1 * 1 *1 = 1
• Area: 16886 cells, each cell is 50 m x 50 m, 16886 * 2500 = 42.2 Mio m2
3
• more levels of “happiness”
• SnailHab_1 = Elev + Veg + Soil
• Min: 0, Max: 3, Range: 4
• Caveat?
• Good colors?
• % for each level?
• 100 % is raster width x raster height
• 410 x 540 cells or ~540 Mio. m2
• 0: 40%, 1: 30%, 2: 26%, 3: 5%
4
Neighborhood functions
• each new cell: result of “using” cells “around” it
• typical: 3 x 3 square
• other shapes
• ArgMap menu, Toolbox and raster calculator
5
• Ex: 5 x 5 Majority ofSlope > 10 deg
• Effect of 2. pass?
• Majority: needs int or categorical raster!
• Gotcha for Majority for 3 or more possible values: tie results in NoData!
•
6
7
Block Functions:
• Similar to focal but fill area with same value
8
Zonal functions
• Needs 2 inputs:
• a zone layer:
non-float raster
or polygon
• a value raster
• Zones don’t need
to be continuous!
(see: regions)
9
10
Zonal functions
• for each zone do:
• get stat for value raster cells that are inside the zone
• Creates many types of stats per zone “id”
• creates a standalone table and a chart
• Table can be joined to zone layer
• example: get
• mean (min, max, etc.)
• elevation
• for each watershed
11
• more zone related functions in Toolbox and Raster Calculator
• for later: make regions (REGIONGROUP function)
• ex_15b.mxd:
• zonal layer - watershed
• (convert to raster)
• value raster: slope
• join result to watershed polygons
• (can also use points, lines as zones!)
12
More about the raster calculator
• About Building Expressions button
• so far we used mainly binary tests: [raster] <logical expression> ; result: 1 or 0, examples: [slope] > 0.2 , [landuse] == 3
• [Mygrid] = [input-raster] * 2 ( not == !)
• [Mygrid] will be in temp folder!!
• functions: ex: Int( [r] ) - set values of [r] to integers
• Usage: right-click - Usage (better: ArcGIS help)
1
• if-else function: (3 parts)IF <logic. expr.> THEN <yes-case> ELSE <no-case>
• CON( <logic. expr>, <Yes>, <No>)
• CON( [slope] > 10, 10, [slope] )
• test for NoData: IsNULL([raster]), returns 1 if NoData, else 0
• “convert” NoData to 1000: CON( isNULL( [r] ), 1000, [r] )
• binary NoData raster: CON( isNull([raster]), 0, 1)
• setting NoData: setNull( <logic. expr>, <no-case> )setNull( [r] < 1000, [r] ) setNull ( [r] = -9999, [r]( there is no explicit yes case, yes means: set to NoData )
2
• Masking: ignoring areas you don’t want to deal with
• Mask raster: Nodata for “outside”, any valid value (1, 0.32, -45, ..., even 0!) for “inside”
• Spatial Analyst - Options - General - Analysis mask
• sets result of any raster operations (raster calc., slope, ....) to NoData for the masks “outside” cells
• Visual-only mask: 2 x click on Data Frame (“Layers”)
• Data Frame tab - Clip to shape (enable)
• give shapefile (polygons) or extend
Masking
3
Geol 588 -
GIS for Geoscientists II
Lecture 5, Feb. 7. 08
1
Today
• Ex. 3 solution
• 2D spatial interpolation (theory)
• Pause
• Effects toolbar
• Interpolation in ArcGIS (examples)
• No lab Feb 26 (and Mar 11)
2
Ex. 3 - Many Peaks
• Where to build a lodge?
• flat ground (< 20 deg. slope)
• has a view of as many peaks as possible (13 of 18)
• viewshed analysis uses canopy (elevation + trees)
• possible cell values in initial viewshed: 0 to 13 (# of peaks)
• convert slope < 20 to 0,1 (binary), thresholding operation), good_slope
3
• Trick: filter viewshed with good_slope
• any 0 value cell in good_slope“flags” the same cell in viewshed as bad for lodge location
• (even if cell has lots of peaks!)
• viewshed (0 - 13) * good_slope (0,1) = lodgesite (0 -13) (0 has double meaning)
• viewshed: integer raster, attribute table, how many cells for each view?
• 5 or more views: add COUNT value for 5 to 13: 4233 cells
4
• Final result: one cell with 13 peaks and slope < 20
• hunt for cell: turn 13 red, rest ( < 13) black
• More data about cell (information tool, select correct layer!)
• Elevation:1728 feet? 1716 feet! (not canopy, not meters)
• Slope: 1.58 degrees (very flat)
• Aspect: 174.8 degrees (approximately due south)
• Viz tips: smooth rasters, good contrast for points
5
Spatial Interpolation
• point samples (x,y, “value”)
• fill each cell (center) in raster with an “appropriate” value
• Principle: the closer together points are, the more similar their value (should be)
• (depends on many factors: type of underlying phenomenon, etc.)
• Examples?
• general: distance and sample value matter
6
Thiessen (Voronoi) polygons
• Interpolation? Space division scheme?
• Assign each sample “its fair share” of space around it
• Raster: fill this space (polygon) with same value
• Problem?
7
(Thiessen polygons: not in spatial analyst but keep in mind for later)
8
Moving “Averaging”• Simple form: grab all
the point samples within the sample radius
• Cell value is Sum of these points’ values divided by their number (mean)
• problem?
• (interpolated value at sample location?)
9
Related topic: point density
• NOT a value interpolation scheme!
• How dense are the samples together?
• count all the point samples within the “circle”, divide by circle’s area
• “kernel” method: different math, smoother
10
Inverse Distance Weighted (IDW) interpolation
• grab all the point samples inside a radius
• When calculation the cell’s value, take the sample distances into account (“weight”)
• Weight of each sample point is an inverse proportion to its distance to the cell
• The further away the point, the less the weight it gets (contributes less)
• effect of exponent (1,2,3, ..)?
Zi is value of known pointDij is distance to known pointZj is the cell value (unknown)
n is a user selected exponent or power (often 1,2 or 3)
exponent n is 1 here !
11
“linear”: exponent = 1“squared”: exponent = 2
• Higher exponents: less weight to distant points (point that are farther away)
• (closer point are more important)
• Use more samples: “smoother” distribution
• interpolated value at sample location?
Simple Averaging
12
IDW: search radius
• variable search radius: grab n (12) closest points, up to a distance of d (default 0, no limit)
• fixed search radius:grab ALL points within d (250) units distanceuse at least n points (default 0, use all)
• isotropic search (more options via geostatistical analyst)
13
IDW: using break lines
• line features to limit (block) point “grabbing”
• samples “from the other side” of the break line will NOT be used
• use for: ridges, faults, ...
• Caveats: much slower, some NoData values (extrapolation issues?)
14
Splines• smooth surface, non-exact
• can over-shoot / under-shoot
• ArgGIS: 2 types - regularized and tension
• ArcGIS: Weight - smoothness “tweak” factor
• gotcha: both have different meaning of weight
• tension (0.1 - 15): low = smooth, high = coarse)
IDW: squared,
12 nearest pointsSpline
15
16
5 min Pause
17
Interpolation class exercise
• copy geol588\data\interpolation_excercise folder
• new ArcMap, add elev_pts_samples_100 only!
• IDW fixed: fixed search radius 5000 m
• IDW variable: variable search radius (12 pts)
• Tension spline, weight 0.1
• Tension spline, weight 10
• Color all with Temperature (spectral) color ramp (smooth)
• Activate Effects tool - compare results
• play with 10000 points, compare to “true” data (dem_steep)
18
Geol 588 -
GIS for Geoscientists II
Lecture 5, Feb. 14. 08
1
Today
• Ex. 4 solution
• Dealing with distance (cost) maps
• Pause
• Practical examples
2
Ex. 4 - Ski Areas• What values do the ski areas (zones) have?
• Look at elevation, slope, distance to roads
• dem_steep is a float raster: properties -source - statistics (last section)
• elevation:1301.556 m - 2277.573 m (avg.:1670.188 m)
• focal (neighborhood) statistics: 3x3 mean vs. 3x3 median: small differences only:
• mean: 1302.74 m to 2263.37 m, median: 1302.42 to 2264. 73 m
• Both: move extreme (min/max) towards “middle” (smoothing)
• Median: sort high-to-low, pick “middle” value
• Median: more robust to outliers
• Honest color comparison: same min/max
3
4
• Zonal statistics for
• Mean Slope: 5.5 deg. to 25.10 deg.
• Area: 265,000 sq. m. to 32,675,000 sq. m. (not pixels!)
• Absolute Min/Max Elevation: 1393.71 m - 2144.53 m
• Assign a color to each polygon according to a field (e.g., ski_area.RANGE)
5
• Coloring: 5 colors - 5 suitability ratings (rating 1 - rating 5)
• Can we compare ratings across maps?
• Simple approach: Average of the three ratings
• What is a “good” area?
6
• Lines as zones for zonal statistics:
• COUNT? AREA?
7
Dealing with distances
• Two types: Straight line (euclidean) distance + cost distance
• straight line distance needs: points or lines (many points)
• each cell knows: “what is my distance to the closest point?”
• NOT know: which (ID) or direction is that closest point?
• Allocation raster: Which point is the closest?
• Similar to ? (last lecture)
8
• Direction grid
• Each cell encodes: “which direction do I need to go to get to the closest point”
• Same scheme as aspect map (azimuth)
9
Real cost to traverse a cell
• Need to define “to traverse this cell, one needs to pay X”
• X on a scale of A to B
• Examples:
• slope: 0 (%) to 50 (%)
• land use (1 - 10):
• roads (city) cost 1
• fields cost 6
• water cost 10
10
Cost weighted distance with roads as sources
11
more outputs of cost weighted distance
operation
• Cost direction raster
• direction optional - but needed later for shortest path operation
• 8 possible choices (directions)
• “On this cell, which direction do I need to go to the next cell”
• next cell: closer to the source (feature), here grey pixel
• Repeat until hit the source
• (roads are not directly involved here)
• Also: Cost allocation raster (not needed for shortest path)
12
• Input 1: path to, “end point(s)”
• Gotcha : you may need to covert “end point” to a raster (?)
• Inputs 2 & 3: Cost distance raster, my “source point(s)”
• result: shortest (cost) line to go from any source point(s) to end point
Shortest path operation - School
Start point(s)
End point(s)
13
Start point (path to)
Source points (lines)
Shortest path operation - point to nearest road
14
Distance class exercise• copy geol588\data\distance_exercise folder
• load dist_ex.mxd, set extend to landuse cost raster!
• Spatial Analyst - Distance - Cost Weighted ...
• Weighted Distance to: schools (or schools_grid), Cost Raster: landuse cost, create direction:YES, create allocation: YES
• Distance - Shortest Path:
• Path to: (think: “Where do want to go?”): destination point (star)
• Cost distance and direction of source: .... to school (created in last step)
• (More? Make cost distance raster for roads (end), shortest path - use schools as start)
15
Geol 588 -
GIS for Geoscientists II
Lecture 7, Feb. 21. 08
1
Today• Ex. 5 solution (interpolation)
• How to use the Model builder
• Notes:
• No lab Tues. next week - but lecture
• Midterm March 13 (no lab Mar. 11)
• Final: Fri., May 9 !9:45-11:45 ?
2
Ex. 5 - Interpolation from points
• Inital data: bedrock elevation points
• visualize elevation (same color scheme as interpolation for comparison)
• shorten labels: use int( [elev]) in label expression (not in attribute table!)
• Where are samples “bunched up”?
• kernel density - histogram equalization for smooth color: bring out extremes
• no actual point at max. density!
• What’s the average distance between samples? ~ 1050 m (max: 4500!)
• Good interpolation up to 1050 m only?
3
IDW with fixed radius (~2100 m)
NoData assigned for cells beyond
2100 m away from any sample!
(“our comfort zone”)
4
IDW (12 closest points) power 2 vs power 3
5
IDW with break line vs.Tension spline
Close (duplicate?) points with different elevation!
IDW just “averages”, spline tries to “optimize” - and “freaks out”
6
TSpline - IDW (simple subtraction)
Better: absolute difference abs( Tspline - IDW) or Root-Mean-Squared (RMS)
How to get total difference (sum of all cell values)?
Shows smooth (spline) vs IDWs “linear patters” (why?)
Real measure of interpolation quality: subtract from true elevation (dem_steep)
7
5 min pause
8
Model Builder• Sequence of geoprocessing tools
• Flowchart story of geoprocessing operations
• Allows parameters for flexible models
• Allows to to show a process (on a poster)
9
10
Creating a new toolbox and
Model
drag
tool
Add data
drag layer from TOC
11
12
Validate & Run
13
Add to display and TOC
Text
Connect graphically
14
Model Builder: practical case• copy data/modelbuilder_ex
• change location for storing your tools in your folder (Tools > Options > Geoprocessing > My Toolboxes)!
• check: “overwrite output of geoprocessing operations”
• new ArcToolbox, (MyTools)
• new Model (Name: Interp_tool, Label: My Interpolation Tool, Store Relative path names!)
• Interpolate from bedrock_elevation points (different schemes and parameters) (call: samples
• Spatial Analysis Tools > Interpolation > IDW
• Connect Samples to IDW
• configure IDW tool, make sure output is saved locally (call IDW_result)
15
• output > Add to display (show changes). Save Tool and run model
• play with different IDW parameters(will overwrite!)
• Sp. A. Tools > Math > Minus Tool
• connect to IDW result
• add dem_steep, subtract IDW result from it
• check order: 2. input - 1. input
• Add result of subtraction to display
• Next: zonal statistics: sum of differences ( = thickness)
16
Geol 588 -
GIS for Geoscientists II
Lecture 8, Feb. 28, 2008
1
Today
• Suitability modeling in GIS
• Reclassification, Weighted Overlay tool
• Spatial Analyst Tutorial Excercise 2
• Notes:
• No lab Mar. 11 (in two weeks)
• Midterm March 27 (prep March 25)
• Final: Fri., May 9 !9:45-11:45 ?
2
Data Types
• continuos (floating point, floats)
• discrete
• whole numbers (integers, ints)
• names/categories (IDs, ZIP), encoded as integers with a lookup table
• What type is suitability?
3
• “Raw” Data sets
• Derived data sets
• Deriving new data is more than visualizing data in different ways!
• Ask: has the data base changed?(attributes, cells)
4
• Goal: combine derived and raw data
• Need: common measurement scale (1-10)
• Reclass(ify) into integers (!)
• (Tip: use the same color scheme, to compare unlike here!)
5
Reclassify• Numerical Input
• Classification Method (Equal interval, Defined interval, Std. deviations, etc.)
• “Direction”: high(low) input value to high or low reclass (scale) value?
• Slope (0 - 45.5) for engineering ( 1 - 10) ?
• categorical input (unique):
• assign a reclass value for each (or use ranges)
• reclass LU 1-3 to 1, LU 4-5 to 2, LU 7 to 3
6
The “restricted” value
• Used only in Weighted Overlay tool
• Means: cell not allowed (even if some derived values are very good!)
• Smallest suitability value - 1, here: suitability 1 - 9, therefore restricted = 1 - 1 = 0
• effect: result (overall suitability) is 0 (“restricted”) whenever it is involved
• Why use restricted value? Allows NoData for other meanings (i.e. true data errors)
7
Combining and weighing data sets
• Need weight factors for each reclassed data set
• A (worth 30%) + B (worth 20%) + ... = 100%
• use weighted overlay tool
• Raster calculator:A * 0.3 + B * 0.2 ...
8
Spatial Analyis Tutorial
• Data and tutorial instructions (pdf) data\spatial (copy spatial)
• New ArcMap, add data (pg. 2), look at data, go to page 14
• Shortcut: create slope (use 0.3048 as Z-factor, degrees), distance to recreation sites (EuD_rsites), dist to schools (EuD-Schools), all need to end up in the Results folder
• Add to model (canvas), toggle on “display got to pg. 24
• reclass slope only, Land use is already in integers (categories) 1 - 7 !
• Use Weighted overlay tool (p. 33) for slope and landuse
• Note the difference between NoData and Restricted! (p. 33), restricted will result in 0 here
9
• make sure to use the Landuse attribute as input field for land use
• Influence: reclassed slope: 30%, reclassed landuse: 70%
• Result: suite_areas (0: restricted, 9: optimal)
• Note: result are integers!
• Raster calculator: 0.3 * recl. slope + 0.7 * recl. landuse
• Call is suite_area2 - What’s its numeric type?
• Check if your new tool is saved in your student folder before you quit
10
Geol 588 -
GIS for Geoscientists II
Lecture 9, Mar. 6, 2008
1
Today• Surface Hydrology analysis (intro)
• solution to ex 6 (anchor hill) on Mar. 13
• Notes:
• No lab Mar. 11 (in two weeks)
• Midterm March 27 15 mult. choice questions, 60 min practical part
• prep session March 13 - need 3 questions from everybody (until Mar. 12)
• Final: Fri., May 9 !9:45-11:45
2
Surface Hydrology
• Disclaimer: I’m not an expert in this
• Basic principle: Water from above (rain), flows downhill
• Deals with sub-areas of terrain (DEM): basin, watershed
• Basics:
• Surface flow direction - how (where) does a drop of water move between cells (depends on what?)
• accumulation: each cell keeps count how many drops move through it
• get the geometry and size of streams
• delineate each stream “area of influx” basin)
3
4
5
6
Calculating flow direction
• Uses elevation - do NOT use a slope raster. Output is NOT an aspect raster
• go through all cells ...
• water will move from each cell “down hill” cell
• compares cell’s elevation to the elevation of the 8 adjacent cells
• result (flow direction) is coded with 1, 1 + 2 = 3, 1 + 128 = 129 (6? 7? 256?)
7
• what if a cell has the same elevation as one or more adjacent cells?
• could flow into 2 (or more) cells!
• expressed as sum of directions: 1 + 2 = 3, 1 + 128 = 129 (6? 7? 256?)
• Gotcha: Sink - all adjacent cells are higher
• Sinks need to be filled!
• also: elevation drop map:
• what’s the vertical difference to the downhill cell?
8
9
10
11
Finding & filling sinks
• local minimum - all adjacent cells are higher
• problem with accumulation:
• for each cell: run a drop of water downhill (using the flow direction)
• But: each cell need to be able to reach the raster’s edge!
• Sinks will simply “suck in” water (i.e. there is no “overflowing”)
• Sink map (Sink tool) Sink ID, rest NoData
• fill sinks (Fill tool) - will change the DEM - need to re-do flow direction
12
Flow accumulation • for each cell:
• run a drop of water downhill (using the flow direction) until the map ends (mini-stream), no losses (evapotranspiration, groundwater)
• each cell the drop touches on its way gets +1 added to its internal count
• effect: if a cell get run over by many mini streams, it will have a high count
• (optional weight raster - “rainfall intensity”)
• use stretched colors with good contrast and 2+ std. dev to bring out the “major streams”
13
Min: 0, Max: 20250
14
Problem with unfilled sinks - stream disappear suddenly
Good stream (reaches end of raster)
Sinks (black)
Same DEM but without filling sinks
15
Stream Channels - stream order
• on accumulation raster: use a threshold (cutoff) to define actual stream channels
• Raster calc: Flowacc > 140
• stream order tool: define magnitude (“size”) based on stream joins not on accumulation
• 2 methods: for defining magnitude:
• Strahler (low numbers), Shreve (large numbers)
16
Basins • ArcGIS: Basins are different from watersheds!
• Basin: completely define by flow direction raster
• Basin tool, creates zones
• Problem here: lots of small basins (COUNT < 65)
17
Geol 588 -
GIS for Geoscientists II
Lecture (Lab) 10b, Mar. 25, 2008
1
Today• solution to ex 6 (Road to anchor hill)
• lab: new exercise (Surface Hydrology)
• some pointers about layout of maps
• go around: class project ideas (group proj.?)
• IowaDNR data on P-drive (IA_State, IA_Regions, Basins, support, etc.)
• Midterm this Thursday
• class project presentations (10 min): Apr. 24
2
Exercise 6 solution
• How (where) should we build a road from the highway to Anchor Hill?
• Note: we don’t care where the new roads starts along the highway
• Straight Line distance: no effects on distance (terrain type, slope, etc.)
• The higher a cell value (yellow - blue) the farther away (yellow: “valley”)
• Straight Line Distance from the highway to AH is 13,211 m, to FM is 14,131 m
• How to get the precise value?
• Could you use the dist. measure tool?
3
• For more complex road, weighted cost distance
• need traversal cost raster
• need slope and forest cover
• need to “invert” rock %
• need rock% everywhere
• Stretched: “Display NoData as” red
4
• Assume that NoData cells mean 100% rock
• How to turn NoData into 100? rock_percent => rock_pct_all
• IF < is this cell’s value NoData? >THEN < make it 100 >ELSE < don’t change the value >
• IF < question >THEN < yes answer to question>ELSE < no answer to question >
• IF A THEN B ELSE C
• in raster calc: CON(A, B, C)
• isNull( [r] ) function - is the value of the current cell in [r] NoData (Null)?
• CON (isNull([rock_percent], 100, [rock_percent])
100% bare rock
0 -100% bare rock
How could we solve the NoData problem around
the forest fringes?
5
• create a traversal cost raster
• cost for traversing each cell (in isolation) depending on slope and density of forest
• Forest density: 100.0 - [rock_pct_all]
• (100.0 - [rock_pct_all]) + slope
• Min: 0.1, Max 211.6
• Calculate cost-weighted distance raster
• Need: traversal cost and point/line feature (“distance to”)
• Gotcha Alert: what is the feature here?
• Also creates a direction raster
• Again: creates a “valley” (Unit?)
0 -100% bare rock
6
• perform a shortest path operation to AH and FM
• we supply the path-to point
• also: uses weighted-cost distance raster and direction raster
• But: how does it know where we want to start?
• weighted-cost distance raster <= “distance-to” feature (badly named)
• Problem: path takes (unfair) advantage of the NoData gap around the forest
7
• Solution: constrain the weighted-cost distance raster and direction raster
• Use Mask raster (NoData vs. None-Nodata)
• How much does each new road cost?
• Use path a zone in zonal analysis (SUM)
8
• Cost for each road?
• Adding up the cost from highway to AH along the path
• But: need to use the cost raster, not the weighted-cost distance raster (my mistake)
• Reason: each cell in a weighted-cost distance raster is already “added-up”
• (same principle as the straight line distance operation “adds-up”)
• Unconstrained path: 25 km, $24 Mio. ($128 Mio. )
• Constrained (mask) path: 19 km, $19 Mio. ( $170 Mio.)
9
Layout mode
• Page setup: deactivate “Use printer settings, chose page size and orientation
• Multiple Data frames? Switch to layout mode, Copy/paste Data frame
• Wait until you have all layers before making multiple data frames (saves layer copying)
• Activating different data frames: Active (TOC), click in layout mode
• Scale: manually set to “nice” numbers
• zoom/pan data “inside” data frame
• Use guides to line up boxes (click inside ruler)
10
Geol 588 -
GIS for Geoscientists II
Lecture 11, April 3, 2008
1
Today• solution to ex 7 (Suitability)
• go around: class project ideas (group proj.?)
• Final Test: Take home (due May 9), related to your class project (so get started soon!)
• Exercise 8 solution next Tuesday (Midterm solutions?)
• Tuesday / Thursday 2 - 4: I’m available to help with project
• Rest of semester: no lecture/lab, work on class project
• I’m away next Thursday (April 10) and May 1
2
Final project:
• Put everything to learned together in a bigger
exercise
• OK to explore some new tools
• Should (mostly) use raster GIS data
• suggestion: suitability analysis (prediction map)
• OK to make up an “interesting” story
• Before you start: tell me a project outline
3
• Don’t get too hung up on finding the “perfect” data
• Look at: P-drive (ftp://pub.gis.iastate.edu/) DNR Iowa data (environmental, people, transport, commercial locations, water, soils, ...)
• Deliverables:
• Poster (36“ x 27” ) as 96 dpi jpg
• Poster’s Layout & ability to “tell the story” count!
• Powerpoint version (no more than 10 slides!)
• Poster due + 10 min presentation: May 9, 9 am
4
Exercise 7 solution
• Perform a suitability analysis
for building a new school at a
certain site with 4 factors:
A. Distance to recreational facility (small is good, 50%)
B. Slope of Terrain (small is good, 13%)
C. Distance to existing school
(small is bad, 25%)D. Type of land use (some good,
some bad, 12%)
• Reclassify each factor to go from 1
(bad) to good (10)
5
• Assign importance (weights) for each factor:
Suitability = A * 0.5 + B * 0.13 + ... + D * 0.12
=> cell value: 0 (bad) to 10 (good)
• Result: Overall suitability (reality: 1-9, no perfect 10)
• But: restrict “good” sites to very high suitability values ( cyan = 9)
• Experience with Model Builder (good/bad) ?
6
• Start: cells where Suitability = 9
• Earlier: removed very small (1 cell) sites (How?)
• But: Site needs to be “islands” (regions ! zones!)
• Use RegionGroup tool
• 4 way connectivity vs. 8 way connectivity (here?)
• Regions > 10 cells needed
• Use Extract by Attribute Tool (uses a SQL query)
• 4 connectivity:56 regions, 13 regions >10 cells
• 8 connectivity:36 regions, 14 regions >10 cells
• (Many different results given)
7
• Wanted: compact (chunky) shape (beside > 10 cells)
• C = 4" * (area) / (perimeter)2
circle: C =1square: C = " / 4infinitely narrow shape: C = 0
• Raster land:compare the area (sum of all cells) with the perimeter (sum of “fringe cells”)
• Cheap trick - just use:Compactness = Area / Perimeter
• Small Compactness => skinny
• Large compactness => chunky
• Does is work?
8
• Make sure the site is close (< 50) to any road
• Better done in polygon (vector) world
• Convert to regions to polygons
• (What happens during the raster-to-polygon conversion?)
• Use Select by Spatial attribute:
• Select polygons where:distance to road < 50 m
• Note: We don’t know where (which) road is the closest for a given polygon!
• (How could it be done with rasters only?)
• Pick your “best” site (add human judgement)
0 -100% bare rock
9
Questions?
10