Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from...

82
Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI software

Transcript of Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from...

Page 1: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Spatial Analysis Using GridsGIS in Water Resources

Fall 2014

by Ayse Kilic with materials fromDavid G. Tarboton, Utah State University and from ESRI

software

Page 2: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Spatial Analysis Using Grids

• Continuous surfaces or spatial fields representation of geographical information

• Grid data structure for representing numerical and categorical data

• Map algebra raster calculations • Interpolation • Calculate slope on a raster using

– ArcGIS method based in finite differences– D8 steepest single flow direction– D steepest outward slope on grid centered triangular facets

Learning Objectives

Page 3: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

• http://resources.arcgis.com/en/help/main/10.2/#/Raster_dataset_zones_and_regions/009t00000008000000/ Raster and Images, starting from "Introduction/What is raster data" to end of " Fundamentals of raster data/Rasters with functions"

Readings – at http://resources.arcgis.com/en/help/

Page 4: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Readings – at http://resources.arcgis.com/ • What is the ArcGIS Spatial Analyst extension and Essential ArcGIS Spatial

Analyst extension vocabulary http://resources.arcgis.com/en/help/main/10.2/index.html#/What_is_the_ArcGIS_Spatial_Analyst_extension/005900000001000000/

Page 5: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

x

dx)y,x(f)y(f

x

y

f(x,y)

Two fundamental ways of representing geography are discrete (separated) objects and fields.

The discrete object view represents the real world as objects with well defined boundaries in empty space.

The field view represents the real world as a finite number of variables, each one defined at each possible position.

(x1,y1)

Points Lines Polygons

Continuous surface

Page 6: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Numerical representation of a spatial surface (field)

Grid or

Raster

TIN Contour and flowline

Fields can represent any number of two or three dimensional surfaces (any kind of gridded data)

Page 7: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Discrete (vector) and continuous (raster) data

Images from http://resources.arcgis.com/en/help/main/10.1/index.html#/Discrete_and_continuous_data/009t00000007000000/

Discrete is also called thematic, categorical, or discontinuous data

Discrete

Continuous

Continuous

Page 8: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Raster and Vector Data

Point

Line

Polygon

Vector Raster

Raster data are described by a cell grid, one value per cell

Zone of cells

Page 9: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Line as a Sequence of Cells

How do we define a line (stream) using grid cells?

Page 10: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Polygon as Zone of Grid Cells

http://resources.arcgis.com/en/help/main/10.2/index.html#/How_features_are_represented_in_a_raster/009t00000006000000/

When we use grid cells, we have to break down polygon shapes like lakes into individual grid cellsWe start on the left with a accurate picture of well-defined boundaries and we end up with a pixelated view on the right

Page 11: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Raster and Vector are two methods of representing geographic data in GIS

• Both represent different ways to encode and generalize geographic phenomena

• Both can be used to code both fields and discrete objects

• In practice a strong association between raster and fields and vector and discrete objects

Page 12: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

A grid defines geographic space as a mesh of identically-sized square cells. Each cell holds a numeric value that measures a

geographic attribute (like elevation) for that unit of space.

549 542 538 534 528 522 518 512548 541 536 530 524 518 515 511558 551 542 532 525 519 515 512571 559 551 544 537 530 524 514585 583 576 563 549 534 519 505606 593 578 563 546 530 513 497612 600 584 568 550 533 516 497611 600 586 568 551 533 515 498601 592 580 565 545 528 516 508594 585 577 570 560 547 534 521614 605 597 588 575 560 544 527622 611 603 595 578 563 545 527620 610 600 592 582 570 554 537627 616 604 593 584 574 564 551631 618 605 594 582 572 566 557628 616 603 591 577 566 558 552627 614 602 593 582 572 561 549617 610 600 590 582 573 562 549613 603 594 582 575 567 558 548610 601 590 579 568 559 553 546605 597 586 578 569 560 551 542

Elevation (meter) for part of Upper Klamath Basin, OR

Page 13: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

The grid values

There are two types of grids: integer and floating pointUse integer grids to represent discrete data (land use classes)Use floating-point grids to represent continuous data (elevation) Grids may have associated attribute table

Attribute tables describe overall characteristics for the entire grid

Page 14: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

The grid• Grid is defined by

extent, spacing, and perhaps a no data value

• Extent is – the Number of rows,

Number of columns– Top-left and bottom-

right coordinates

• Spacing is the Cell size (X and Y)

• NODATA is outside the extent or is undefined

Numberof

rows

Number of Columns

(X,Y) Cell sizeNODATA cell

Page 15: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

NODATA Cells

Page 16: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Networks Using Cells

The same number identifies cells that are in the same reach

Page 17: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Grids Using Floating Point (Decimal Numbers)

Continuous data surfaces using floating point or decimal numbersExamples are ET (evapotranspiration), elevation, precipitation

Page 18: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Integer valued grids to represent zones

Examples are Landuse classes, soil types, political units

Page 19: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Value Attribute Table (VAT) to summarize categorical (integer) grid data

Attributes of grid zones

Page 20: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

How are values for Rasters determined?

from Michael F. Goodchild. (1997) Rasters, NCGIA Core Curriculum in GIScience, http://www.ncgia.ucsb.edu/giscc/units/u055/u055.html, posted October 23, 1997

There are three ways that a “Value” for a grid cell is determined

Page 21: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Cell size of raster data

The cell must be small enough to capture the required detail but large enough so computer storage and analysis can be performed efficiently.

Discrete data

The level of detail (of features/phenomena) represented by a raster is dependent on the cell size. (Cell size matters!!!) Estimates of area

Page 22: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Integer Raster Generalization How do we determine the value for the cell?

Central point ruleLargest share rule

Whatever is happening at the centerWinner takes it all!

Page 23: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Map Algebra/Raster Calculation

Precipitation-

Losses (Evaporation + Infiltration)

=Runoff5 2

2 3

2 43 3

7 65 6

-

=

Cell by cell evaluation of mathematical functions

Example

5-3= 2

Page 24: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Runoff generation processes

Infiltration excess overland flowaka Horton overland flow

Partial area infiltration excess overland flow

Saturation excess overland flow

PP

P

qrqs

qo

PP

P

qo

f

PP

P

qo

f

f

Page 25: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Runoff generation at a point depends on

• Rainfall intensity or amount• Antecedent moisture conditions• Soils and vegetation type• Depth to water table (topography)• Time scale of interest

These factors vary spatially. That suggests using a spatial approach (GIS) to runoff estimation

Page 26: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Cell based generation of runoff and routing discharge

Radar Precipitation grid

Soil and land use grid

Runoff grid from raster-based calculations implementing runoff generation formulas

We use a DEM to show accumulation and routing of runoff within watersheds

Page 27: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Raster calculation – some complications

+

Sometimes different layers have different:

• Cell size

• Extent

• Projection

We need to tell Arc how to combine these data layers. We may need to reproject, and resample to a common cell size.

Page 28: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Raster calculation – some complications

Analysis extent

+

=

Analysis cell size

Analysis mask (Domain)

An Analysis Mask is used to tell Arc how to resample or interpolate (and reproject) inputs to the target extent, cell size, and projection

Page 29: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Spatial Snowmelt Raster Calculation Example

The grids below depict initial snow depth and average temperature over a day for an area.

40 50 55

42 47 43

42 44 41

100 m

100

m

(a) Initial snow depth (cm)

4 6

2 4

150 m

150

m

(b) Temperature (oC)

One way to calculate decrease in snow depth due to melt is to use a temperature index model that uses the formula

TmDD oldnew

Here Dold and Dnew give the snow depth at the beginning and end of a time step, T gives the temperature and m is a melt factor. Assume melt factor m = 0.5 cm/OC/day. Calculate the snow depth at the end of the day.

40 50 55

4347

414442

42

100 m

100

m

4

2 4

6

150 m

150

m

Page 30: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Lets Experiment with this in ArcGIS

temp.asc

ncols 2nrows 2xllcorner 0yllcorner 0cellsize 150NODATA_value -99994 62 4

snow.asc

ncols 3nrows 3xllcorner 0yllcorner 0cellsize 100NODATA_value -999940 50 5542 47 4342 44 41

Page 31: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

New depth calculation using Raster Calculator

“snow100” - 0.5 * “temp150”

Page 32: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Environment SettingsTell Arc how to resample or interpolate (and reproject) inputs to the target extent, cell size

Page 33: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Example and Pixel Inspector

Page 34: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

38 52

41 39

The Result for Snow Depth on Day 2

• Outputs are on 150 m grid.

• How were values obtained ?

Page 35: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

When input layers have different cell sizes

40 50 55

4347

414442

42

100

m

4

2 4

6150

m

38 52

41 39

When we have two different input cell sizes, we have to specify one of them for the output cell size. If you specify using the layer having the maximum cell size, then the input layers having the smaller cell size will be resampled. The default resampling in Arc uses Nearest Neighbor

The NN resampling grabs the input cell that is closest to the center of the output cell

150

m

See next slide

Output raster

Page 36: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Nearest Neighbor (NN) Resampling using Cell size based on “Maximum of Inputs”

40 50 55

4347

414442

42

100

m

40 55

42 41

The NN resampling grabs the input cell that is closest to the center of the output cell

There are Nine 100 m cells . Only 4 of them will be selected for the calculations (because we use NN). Note that some spatial information is lost during resampling.

Red symbols are centers of the 150 m cells

Resampling the 100 meter input to 150 meters using NN

Page 37: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

40 55

42 41

Nearest Neighbor (NN) Resampling using Cell size based on “Maximum of Inputs”

4

2 4

6150

m

40-0.5*4 = 38

55-0.5*6 = 5238 52

41 39

42-0.5*2 = 41

41-0.5*4 = 39

However, only 4 of original snow depths were utilized because we use NN.

Now we can make calculations with all the inputs and outputs at 150 meter

Page 38: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Nearest Neighbor (NN) Resampling using Cell size based on “Maximum of Inputs”

40 50 55

4347

414442

42

100

m

4

2 4

6150

m

40-0.5*4 = 38

55-0.5*6 = 5238 52

41 39

42-0.5*2 = 41

41-0.5*4 = 39

We could have combined the resampling and calculations into one step as shown here (this is what Arc Does)

There are Nine 100 m cells Only 4 of them will be selected for the calculations (because we use NN)

Red symbols are centers of the 150 m cells

Page 39: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

From: Blöschl, G., (1996), Scale and Scaling in Hydrology, Habilitationsschrift, Weiner Mitteilungen Wasser Abwasser Gewasser, Wien, 346 p.

Cell size and sampling frequency need to agree with the behavior of our data

We need to sample more frequently to capture high frequency changes

We need to sample a longer series to capture the full data extent

We need to use a smaller cell size to capture the full range of values

Page 40: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Interpolation and Resampling• Estimate values between known values• A set of spatial analyst functions that predict values for a surface

from a limited number of sample points creating a continuous raster.

Apparent improvement in resolution may not be justified

Page 41: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Interpolation methods

• Nearest neighbor• Inverse distance

weight• Bilinear

interpolation• Kriging (best linear

unbiased estimator)• Spline• Cubic convolution

ii

zr

1z

)dyc)(bxa(z

iizwz

ii eei yxcz

Known data points are large red circles

(For resampling only)

Page 42: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Resampling Methods in Arc

Page 43: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

4 6

2 4

5

3

3

54

4 6

2 4

Spacing & Support

Lets redo the calculations at 100 m resolution

Resample 150 m to 100 m to get consistent cell size

Black values are originalThe white values are resampled

Page 44: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Calculation with consistent 100 m cell size grid“snow100” - 0.5 * “temp100”

38 52

41 39

47.5

40.5

42.5

40.545

Page 45: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Cell by cell snowmelt calculations using 100 m cell size

40 50 55

4347

414442

42

100

m15

0 m

40-0.5*4 = 38

42-0.5*3 = 40.538 52

41 39

43-0.5*5 = 40.5

41-0.5*4 = 39

47.5

40.5 45 40.5

42.5

50-0.5*5 = 47.5

55-0.5*6 = 52

47-0.5*4 = 45

42-0.5*2 = 41

44-0.5*3 = 42.54

6

2 4

5

3

3

54

4

6

2 4 Two inputs on the left have the same 100 m resolution

Page 46: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Illustration of different Interpolation techniques

When you have to create a grid from a limited set of data points

Page 47: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Nearest Neighbor “Thiessen” Polygon Interpolation Spline Interpolation

Point to Raster Interpolation

Page 48: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Grayson, R. and G. Blöschl, ed. (2000)

Interpolation Comparison

ThiessenThin plate spline

Inverse Distance Squared Kriging (zero nugget, large range)

Sixth order polynomial Kriging (different nugget and range paramters)

Page 49: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Further Reading

Grayson, R. and G. Blöschl, ed. (2000), Spatial Patterns in Catchment Hydrology: Observations and Modelling, Cambridge University Press, Cambridge, 432 p.

Chapter 2. Spatial Observations and Interpolation

http://www.catchment.crc.org.au/special_publications1.html

Full text online at:

Page 50: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Spatial Surfaces used in Hydrology

Elevation Surface — the ground surface elevation at each point

Page 51: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Slope Handout

Determine the length, slope and azimuth of the line AB.

http://snr.unl.edu/kilic/giswr/2014/Slope.pdf

Page 52: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

3-D detail of the Tongue river at the WY/Montana border from LIDAR.

Roberto GutierrezUniversity of Texas at Austin

Page 53: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Topographic Slope

• Used to determine how water flows downhill and concentrates into streams

• Topographic slope can be determined from a DEM

Page 54: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Topographic Slope

• There are three alternative sets of inputs (choose one)– Surface derivative z (dz/dx, dz/dy)– Vector with x and y components (Sx, Sy). Slope in x and y direction.– Vector with magnitude (slope) and direction (aspect) (S, )

Page 55: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

• Calculates the maximum rate of change in value from that cell to its neighbors

• Calculated for each cell• Represents the rate of change of elevation for

each digital elevation model (DEM) cell. It's the first derivative of a DEM

• The lower the slope value, the flatter the terrain; the higher the slope value, the steeper the terrain.

ArcGIS “Slope” tool

Page 56: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Definition of X, Y, and Z in 3D space

Z axis is the direction that elevation changes (up or down)

Y axis is the direction that Y has a changing value (North-South in ArcGIS)X axis is the direction that X

has a changing value (East-West in ArcGIS)

Origin is the location of the point of interest (pixel or grid cell)

X, and Y are horizontal distancesZ is the vertical distance

The X, Y, Z axes are at right angles to one another

Page 57: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Definition of Slope

Run is the horizontal distance calculated using X and YRise is the vertical distance calculated using Z (elevation)Slope ranges (-900, +900) or (-infinity %, +infinity %)

(0)

* 100 (%)

𝑇𝑎𝑛(𝛳 )=𝑅𝑖𝑠𝑒𝑅𝑢𝑛

Page 58: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

How Slope works

Run is the horizontal distance calculated using X and YRise is the vertical distance calculated using Z (elevation)

(0)

* 100 (%)

When the angle () is 45 degrees, the rise is equal to the run, and the percent rise is 100 percent

When the slope angle ) approaches vertical (90 degrees), the percent rise (slope) begins to approach infinity.

Page 59: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Pythagorean theoremUsed to calculate Run where a =ΔY and b = ΔX

Page 60: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Definition of Aspect

Δ𝑥

Δ 𝑦 𝛼 = aspect, angle defined as degrees clockwise from North

𝑥

𝑦

If I pour water on the ground, which direction does it flow?Identifies the direction where slope is maximum (slope is the steepest)Aspect identifies the downslope direction of the maximum rate of change in value from each cell to its neighbors

Y axis is the direction that Y has a changing value (North-South in ArcGIS)

X axis is the direction that X has a changing value (East-West in ArcGIS)

This is my grid cell location

Page 61: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

𝑇𝑎𝑛(𝛼)=∆ 𝑋∆𝑌

𝛼=𝐴𝑟𝑐𝑇𝑎𝑛∆𝑋∆𝑌

= Aspect  

Invert that top equation and solve for α by Inverting the Tangent Function (ArcTan)

The other way to write ArcTan is Tan-1

Definition of Aspect

Aspect = Convert from radians to degrees (180/π)

Δ𝑥

Δ 𝑦 𝛼 = aspect, angle defined as degrees clockwise from North

𝑥

𝑦

Page 62: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

The rate of change in the y direction for cell e is calculated with the following algorithm

ArcGIS “Slope” tool

a b c

d e f

g h ix

y

gd

ah

eb

if

c∆

2∆ xy

The rate of change in the x direction for cell e is calculated with the following algorithm

Calculates slope for each cell. In this illustration, it is for Cell “e”For each cell, the Slope tool calculates the maximum of the rate of change in value from that cell to each of its eight neighbors

Page 63: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

dzd y

=(g+2h+i )− (a+2b+c )

8 ∆

ArcGIS “Slope” tool

gd

ah

eb

if

c∆

𝑎−𝑐2∆ 𝑑− 𝑓

2∆𝑔−𝑖2∆

2∆ xy

𝑎−𝑐2 ∆

+𝑑− 𝑓2∆

2+

𝑑− 𝑓2∆

+𝑔−𝑖2∆

22

The two equations for dz/dx and dz/dy are simplified from this first equation.The basis for that equation is illustrated in the Figure and represents an average of central finite differences over each of the three rows of cells, with the middle row counting twice as it appears in averages on each side.

=

Page 64: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

ArcGIS Aspect – the steepest downslope direction

dx

dz

dy

dz

dy/dz

dx/dzatan

In Arc, with grid cells it is easiest to calculate Aspect using the ratio of dz/dx to dz/dy.We use Arc tangent function to determine the aspect angle.

𝛼

Page 65: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Example for topographic slope

30

80 74 63

69 67 56

60 52 48

a b c

d e f

g h i

m/m 229.030*8

)4856*263()6069*280(

acing x_mesh_sp* 8

i) 2f (c - g) 2d (a

dx

dz

m/m329.030*8

)6374*280()4852*260(

cingy_mesh_spa * 8

c) 2b (a-i) 2h (g

dy

dz

o8.21)401.0(atan

145.2o

m/m401.0

329.0229.0)/()/( 2222

dydzdxdzSlope

Mesh spacing=30 mSlope/Aspect at cell e?

Slope in degrees

Page 66: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Example for Aspect30

80 74 63

69 67 56

60 52 48

a b c

d e f

g h i

m/m 229.030*8

)4856*263()6069*280(

acing x_mesh_sp* 8

i) 2f (c - g) 2d (a

dx

dz

m/m329.030*8

)6374*280()4852*260(

cingy_mesh_spa * 8

c) 2b (a-i) 2h (g

dy

dz

o

dydz

dxdzAspect 8.34

329.0

229.0atan

/

/atan

oo 2.145180

145.2o

Mesh spacing=30 mSlope/Aspect at cell e?

Page 67: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

The Atan function is multivalued on the full circle and only unique in a range of 180 degrees. To unambiguously determine the direction from two components you really need the atan2 function that keeps the sign on y and x components separately.

Specifically, let y = y component of a vectorx = x component of a vectoratan(x/y) gives the direction of the vector as an angle (with the ratio x/y since angle here is measured from north). But x/y is the same value if y is positive and x negative, or x positive and y negative. So once you take the ratio x/y, if you get a negative number you do not know which (y or x) was negative.

A way to resolve this isangle = atan(x/y)if(0 < angle < 180 and x < 0) then aspect = angle + 180 # flip the direction because x is negative if angle is in positive x directionelse aspect = angleendif

Page 68: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

32

16

8

64

4

128

1

2

D8 steepest single flow direction(Eight Direction Pour Point Model)

ESRI Direction encoding (ArcGIS)

In a gridded system, water can only flow to one of eight adjacent cells

The direction of flow is determined by the direction of steepest descent:

Maximum_drop = change_in_z-value / distance * 100

Page 69: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

80 74 63

69 67 56

60 52 48

30

45.0230

4867

50.0

30

5267

Slope:

Hydrologic Slope (Flow Direction Tool) Find Direction of Steepest Descent (ArcGIS)

80 74 63

69 67 56

60 52 48

30

For diagonal direction, the denominator for slope includes square root of 2

Slope:

Page 70: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

?

Limitation due to 8 grid directions.

The true flow direction follows the red arrow. However, we can only choose one of the blue arrows because we have to use one of eight adjacent cells.

Page 71: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Flowdirection.

Steepest directiondownslope

1

2

1

234

5

67

8

Proportion flowing toneighboring grid cell 3is 2/(1+

2)

Proportionflowing toneighboringgrid cell 4 is

1/(1+2)

The D Algorithm

Tarboton, D. G., (1997), "A New Method for the Determination of Flow Directions and Contributing Areas in Grid Digital Elevation Models," Water Resources Research, 33(2): 309-319.) (http://www.engineering.usu.edu/cee/faculty/dtarb/dinf.pdf)

Page 72: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Steepest direction downslope

1

2

1

2 3

4

5

6 7

8

0

The D Algorithm

If 1 does not fit within the triangle, the angle is chosen along the steepest edge or diagonal resulting in a slope and direction equivalent to D8

10

211 ee

eeatan

210

221 eeee

S

Page 73: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

D∞ Example30

eo

e7 e8

o

70

871

9.145267

4852atan

ee

eeatan

14.9o284.9o

517.0

30

5267

30

4852S

22

80 74 63

69 67 56

60 52 48

The tool is available at http://hydrology.usu.edu/taudem/taudem5/documentation.html

210

221 eeee

S

Page 74: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

ArcGIS.Com ready to use maps including elevation services

http://www.arcgis.com/features/maps/earth.html

Land Cover

Soils

Elevation

Page 75: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Elevation Services

http://elevation.arcgis.com/arcgis/services

Page 76: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

CyberGIS Apps

http://sandbox.cigi.illinois.edu/home/

Page 77: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Big Spatial Data

77

Page 78: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

A YouTube Videohttp://www.youtube.com/watch?v=hrJ_cZkG-Xs

Page 79: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Viewshed

From http://www.innovativegis.com/basis/mapanalysis/Topic15/Topic15.htm

The locations that are visible from a viewer location. Line of sight analysis. Useful for cell coverage and visual exposure analyses

Page 80: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.
Page 81: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Summary Concepts

• Grid (raster) data structures represent surfaces as an array of grid cells

• Raster calculation involves algebraic like operations on grids

• Interpolation and Generalization is an inherent part of the raster data representation

Page 82: Spatial Analysis Using Grids GIS in Water Resources Fall 2014 by Ayse Kilic with materials from David G. Tarboton, Utah State University and from ESRI.

Summary Concepts (2) • The elevation surface represented by a grid digital

elevation model is used to derive slope important for surface flow

• The eight direction pour point model approximates the surface flow using eight discrete grid directions.

• The D vector surface flow model approximates the surface flow as a flow vector from each grid cell apportioned between down slope grid cells.