Raster Analysis: Intro Basics Applying Boolean logic in raster Comparable vector operations Raster modeling and statistics Where raster distinguishes itself
Raster vs. Vector https://experimentalcraft.wordpress.com/tag/gis/ Source Source https://experimentalcraft.wordpress.com/tag/gis/
Raster always has dimensions—the pixel size
Converting points to raster Rasterised point layers are not ‘compact’ – one value per pixel Point has area equal to cell size
Lines to raster Lines are seen as contiguous pixels
Question: how would you calculate the area of forestland in the raster Vector has ownership data stored as an attribute http://blogs.lib.uconn.edu/outsidetheneatline/2009/08/17/did-you-know-6-raster-vs-vector/
Vector to raster conversion Similar to scanning – specify cell size (pixels) and the attribute used - Vector GIS handles attributes more effectively
Polygons to raster areas have similar adjacent pixels Attribute table shows the number of pixels in each value, these are graphed in a histogram
How to Really Mess up with GIS Regular grid, 16 per -> irregular shapes/sizes Numbers in vector are total count for area, not density, leading to serious visual misrepresentation https://mgimond.github.io/Spatial/pitfalls-to-avoid.html
Neighborhood Operations Operation: Summation (including value of focal cell) Neighborhood size: 3 x 3 rectangle Because an animal won’t use just one cell… e.g. to establish available food supply for wildlife
Neighborhood Operations Summation (including value of focal cell) Each cell’s neighborhood calculated in turn. Redundancy in system: you might have screwed one cell up, but it won’t matter as much Other common applications: Data simplification (smoothing) Terrain analysis (local relief / roughness) Site selection
Raster Pixel Depth Capacity for precision Size Camera runs on 8-bit https://mgimond.github.io/Spatial/gis-data-management.html
Boolean Logic in Raster Analysis “Create an expression reducible to true/false” Binary examples Landscape examples
Raster Math 2 + 2 = 4 2 + 3 = 5 2 + 4 = 6 2 3 4 5 2 3 4 4 5 6 7 8 9 Raster math is normal math
Boolean Logic: AND 0 * 1 = 0 (false) 1 * 0 = 0 (false) 1 * 1 = 1 (true) Looking for a “1” Input 1: Input 2: Output: 1 1 1 Objective: Quality Dining Good Reviews Open Tables Potential Dining
Boolean Logic: OR 0 + 0 = 0 (false) 0 + 1 = 1 (true) 1 + 0 = 1 (true) Looking for => “1” Input 1: Input 2: Output: 1 1 1 2 Objective: Food in stomach (but willing to wait if it’s good) Good Reviews Open Tables Potential Dining
Boolean Logic: XOR 0 + 0 = 0 (false) 0 + 1 = 1 (true) 1 + 0 = 1 (true) Looking for = “1” Input 1: Input 2: Output: 1 1 1 2 Objective: No second date Good Reviews Open Tables Potential Dining
Boolean Logic: NOT 0 - 1 = -1 (false) 1 - 0 = 1 (true) Looking for = “1” Input 1: Input 2: Output: 1 1 -1 1 Objective: questionable Good Reviews Open Tables Potential Dining
Raster Model: Roads vs. Cover Roads bad, conifer cover good Input 1: Input 2: Output: 50 100 75 120 150 80 50 100 20 75 10 40 60 80 100 200 70 150 130 140 180 170 Objective: questionable Road Distance Conifer Cover Habitat Quality
Now pick it apart, what’s the problem? What is a Habitat Model? Basic needs: food, water, shelter Each variable ranked 0-100 Sum of the inputs = overall quality Now pick it apart, what’s the problem? 100 50 75 40 100 50 75 50 75 100 40 200 150 225 300 180 Habitat Model Food Water Shelter
One Step Up: >0 Requirement Basic needs: food, water, shelter If any of the inputs are zero, output = 0 (as no shelter = dead) 100 50 75 40 100 50 75 50 75 100 40 150 225 300 180 Habitat Model Food Water Shelter
Euclidean Distance Straight-line distance from point, line, or poly 0 1 2 3 4 5 6 7 Point in the center of the 0 1m raster grid Symbology broken into 1m classes 1.4 2.8 4.2 5.6
Using Euclidean Distance Distance from roads vs. Distance to Rivers Input 1: Input 2: Output: 50 100 75 120 45 80 50 100 20 75 10 40 60 River Distance (under 80 good) Road Distance (under 80 bad) Acceptable Habitat
Clip vs Euclidian Distance Clip: Is it, or is it not, within distance X Yes or no Will chop a feature in half Raster: Average distance from pixel to X Distance at whatever precision specified But never absolutely precise (vs. point)
Pesky Parameter Problems The sly and elusive lynx avoids roads….
Expert-Based Habitat Modeling Ask a trapper where (s)he sees bears in spring Identify key characteristics Distance to roads Distance to eskers Distance to old forest Distance to swamp Extrapolate to the landscape Ex. the wolves used to be afraid of the roads, now they’ve gotten used to them (made up)
Work-Through Lacking experts, any parameters will do ‘Twas brillig, and the slithy toves Did gyre and gimble in the wabe; All mimsy were the borogoves, And the mome raths outgrabe. “Beware the Jabberwock, my son The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!” He took his vorpal sword in hand; Long time the manxome foe he sought— So rested he by the Tumtum tree, And stood awhile in thought. And, as in uffish thought he stood, The Jabberwock, with eyes of flame, Came whiffling through the tulgey wood, And burbled as it came! One, two! One, two! And through and through The vorpal blade went snicker-snack! He left it dead, and with its head He went galumphing back. “And hast thou slain the Jabberwock? Come to my arms, my beamish boy! O frabjous day! Callooh! Callay!” He chortled in his joy. The purpose of this is to show something that raster can do that vector can’t
Objective Identify routes that the Jabberwocky is likely to use as it travels from Purden Provincial Park to Aleza Lake Ecological Reserve and prioritize them according to the % of the landscape that may be devoted to Jabberwocky conservation
Toolset: Corridor Design Assumption: animal movement follows path of least risk (food, water, cover) Food, water, cover differ by species By finding routes that provide food, water, cover, we can maintain a travel corridor between patches
Parameters Jabberwocky will prefer to be During the summertime, when adventure-seeking knights (and graduate students) roam the countryside, the Jabberwocky tends to avoid travelled roads. Rivers and swamps are its preferred haunts, where Bandersnatches and Jubjub birds are present to keep watch for would-be heroes. Finally, the creature is easily scared off by its arch nemesis the feller-buncher, and does not return to a stand until the area has been successfully regenerated. Jabberwocky will prefer to be 100m or more from roads Less than 50m from a river Less than 100m from a swamp More than 500m from an not-successfully regenerated block But Jabberwocky will compromise as necessary
Coding the Parameters Variable Weight 100 = preferred habitat Road 0 50 : 12 50 100 : 45 100 500 : 64 500 15000 : 100 River 0 50 : 100 50 100 : 60 100 500 : 40 500 15000 : 10 Swamp 0 100 : 100 100 500 : 66 500 15000 : 15 NSR 0 100 : 10 100 500 : 50 Variable Weight 100 = preferred habitat 75 = good but not great 50 = acceptable 25 = avoided 0 = terrible Distance Range (m): Weight
% of Landscape Devoted to Corridor Under Different Constraints Stated differently, if you could devote only 1% of the landscape and all four variables were required = red If you could devote 1% of the landscape and only three variables were required = yellow
Projection Model: Pine Beetle Mountain Pine Beelte Projection 2016-2020 Parameters: Pine in a suitable biogeoclimatic zone Stand age >60 Local beetle pressure (powered flight) Regional beetle pressure (wind transport) At or below most northerly observed latitude Observed two years running KEY POINT From Adrian Walton: “The model defines the northern latitude of habitat suitability based on the latitude at which the beetle was observed by the AOS [Aerial Overview Survey] in two consecutive years. The model does not recognize those latitudes as “marginally” suitable habitat. In hindsight it may have been more appropriate to choose the northern latitude at which the beetle was observed for three consectuive years.
Observed Beetle Kill to Date
Projected 2016
Projected 2017
Projected 2018
Projected 2019
Projected 2020
What’s Missing? Mountain porcupine beetle? Topographical barriers Mountains tend to get in the way Fine-scale population data Marginal vs. optimal habitat Max. range defined by latitude alone Vs. effective latitude (incorporating elevation) No authorship or contact info given…
Raster Applications: Site C Dam is at elevation X; water finds its level Looking for any pixel at or below the elevation of the dam
Summary Raster math works like normal math (sorry) Boolean logic is foundational Remember those Venn diagrams! Wildlife applications next week
Colors: Consider the Following Red/green colorblindness 8% of men, 0.5% of women Color maps on B+W printer http://colorbrewer2.org/# Question 3
Lightness (Value) Lightness (value)
Saturation Saturation is a valid answer
Hue Can’t be all of the above
Printers vs. Photocopiers Colorbrewer2.org B+W photocopiers Older printers (where I got my trust issues) Newer printers do better (examples on hand)
Take-Home Lightness (Value) “always” works Saturation “should” work Safest bet if you can’t control the printer Saturation “should” work If you’re working in-house If you’re contracting a print job Hue sometimes works Some hues stand out, some don’t Mileage may vary
Scale bar in the wrong units Scale bar label abbuting labe boundary North arrow does not agree with provincial boundary Labels inconsistent and often tiny What exactly does green mean? Same for both provinces? Who is the contact person for this map?