28
Automating Watershed Analysis Francis Rengers, Theo Spinelli, Arthur Smith

Automating Watershed Analysis

  • Upload
    zinna

  • View
    37

  • Download
    2

Embed Size (px)

DESCRIPTION

Francis Rengers, Theo Spinelli, Arthur Smith. Automating Watershed Analysis. Introduction. Watershed Wizardary , Let’s try to automate it!. West Bijou Creek. Methods. The only way of finding the limits of the possible is by going beyond them into the impossible. ~ Arthur C. Clarke. - PowerPoint PPT Presentation

Citation preview

Page 1: Automating Watershed Analysis

Automating Watershed Analysis

Francis Rengers, Theo Spinelli, Arthur Smith

Page 2: Automating Watershed Analysis

IntroductionWatershed Wizardary, Let’s try to automate it!

Page 3: Automating Watershed Analysis

West Bijou Creek

Page 4: Automating Watershed Analysis

MethodsThe only way of finding the limits of the possible is by going beyond them into the impossible.~ Arthur C. Clarke

Page 5: Automating Watershed Analysis

Stream Generalization

This is the result of stream creation.As you can see, it is very detailed andwe really only want to see the effectsof the major channels.

Page 6: Automating Watershed Analysis

Stream Order

STRAHLER METHODStream order only increases when two streams of the same order connect into another, then a new order is created.

Page 7: Automating Watershed Analysis

Calculating Max Stream Order

Stream Order Raster Attribute Table

We want a value of 3.Actually, whichever isthe max value.

Summery Statistics on Value Field, Max

The code

Page 8: Automating Watershed Analysis

Selecting Max Value

*Take Note, the script example for Select by attributes in ArcHelp is WRONG! Not to mention tricky…

Page 9: Automating Watershed Analysis

Final Stage of Generalization

Page 10: Automating Watershed Analysis

The Francis Problem

Want dissolve our shape file to get ONE row.

Without getting a Multi-part shapefile.

Page 11: Automating Watershed Analysis

The Francis Problem

This works perfectly

Page 12: Automating Watershed Analysis

The Francis Problem

. . . but not Every time

Page 13: Automating Watershed Analysis

Cross-Sections

Goal:•Create points perpendicular to the stream channel that have elevation and distance info

-10 -8 -6 -4 -2 0 2 4 6 8-50

0

50

100

150

200

Page 14: Automating Watershed Analysis

Cross-Sections

q

q Is the same up here

Locate Cross Sections:•User specifies the distance interval to cut cross-sections (e.g. 15 m)•If Total Dist> Specified Dist, the Cross Section is on the current segment.•Get X,Y coords for Cross Section location.•Need Hypotenuse•Hyp=Line Segment Dist-(Total Dist-Specified Dist)•Find the angle of the line segment

• Tanq=|x2-x1|/|y2-y1|•Xcenter=(-1b )Cosq*hyp+x1•Ycenter=(-1c )Sinq*hyp+y1

If x2>x1, b=2, else b=1. If y2>y1, c=2, else c=1.

hyp(x1,y1)

(x2,y2)

15m

?

Page 15: Automating Watershed Analysis

Cross-Sections

q

Make Cross-Sections:•Create a unit vector that represents the Line segment.

•Now centered on (0,0). Note this only works on square projections like UTM.•Normal Vector (just flip and switch):

•If (i>0 and j>0) or (i<0 and j<0) •Quadrant 1 or 3.•If (i>0 and j<0) or (i<0 and j>0)•Quadrant 2 or 4

hyp(x1,y1)

(x2,y2)

• 𝑣Ԧ= 𝑥2−𝑥1ඥ(𝑥2−𝑥1)2+(𝑦2−𝑦1)2 𝑖 + 𝑦2−𝑦1

ඥ(𝑥2−𝑥1)2+(𝑦2−𝑦1)2 𝑗

• 𝑁ሬሬԦ= − 𝑦2−𝑦1ඥ(𝑥2−𝑥1)2+(𝑦2−𝑦1)2 𝑖 + 𝑥2−𝑥1

ඥ(𝑥2−𝑥1)2+(𝑦2−𝑦1)2 𝑗 (0,0)

x

y

stuff i

stuff j

I

IIIII

IV

Page 16: Automating Watershed Analysis

Cross-Sections

Make Cross-Sections:•Tan(a)=|j|/|i|•Determine Endpoints:•xe1=Xcenter + Cos(a)*XSlength•xe2=Xcenter - Cos(a)*XSlength•If Quadrant 1 or 3•ye1=Ycenter + Sin(a)*Xslength•ye2=Ycenter - Sin(a)*Xslength•If Quadrant 2 or 4•ye1=Ycenter - Sin(a)*Xslength•ye2=Ycenter + Sin(a)*Xslength•Xnew=x1- Cos(a)*PntDist•Ynew=y1 +/- Sin(a)*PntDist•Append Xnew and Ynew to a list, then dump in a shapefile

x

y

Normal i

Normal j

I

IIIII

IV

a

XSlen

gth

(xe1,ye1)

(xe2,ye2)

a

Page 17: Automating Watershed Analysis

Longitudinal Profiles

Input Data: 1m Filled DEM, cross section center points

Process: Use GP tool to extract raster elevation value for stream polyline nodes

Output Data: Elevation and distance fields added to attribute table of stream nodes

Use: Plot elevation vs. distance to create stream profiles

Page 18: Automating Watershed Analysis

Longitudinal Profiles

From cross section center points, locations are known, but not distances between them.For loop shown below calculates distance from current point to last point and keeps track of the cumulative distanceCumulative distance and elevation, for each stream, are dumped into a textfile for further analysis or graphing

Page 19: Automating Watershed Analysis

Results60% of the time it works 100% of the time

Page 20: Automating Watershed Analysis

Some Issues

Page 21: Automating Watershed Analysis

Cross Sections

Works most of the time

Page 22: Automating Watershed Analysis

Cross Sections

Page 23: Automating Watershed Analysis

Longitudinal Profiles: Challenges

Main Issue: Displaying data automatically

Textfiles of data can be a pain to graph, it would be nice to output graphs automatically

This is possible using matplotlib(see image), however we ran into difficulty with multiple profiles in one graph and compatibility issues

Page 24: Automating Watershed Analysis

DiscussionToo Big to Not Fail

Page 25: Automating Watershed Analysis

Discussion

Splitting code up into more modules that are easier to debug (366 lines of code).

Maybe should change XS code so it works on multipart.

Problems with vector analysisMight be easier to use Numpy arrays

to extract the main channels.We want an extra module for

Matplotlib for an automated display.

Page 26: Automating Watershed Analysis

ConclusionsMomma always said, life is like a box of chocolates . . .

Page 27: Automating Watershed Analysis

Final product

We can generate streams and watersheds

We can create cross-sections and longitudinal profiles

Can Plot our cross-sectionsSome editing must occur in between.http://watershedmapping.wordpress.

com/

Page 28: Automating Watershed Analysis

Questions Suggestions?