automating watershed analysis

Post on 08-Jan-2016

38 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

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

TRANSCRIPT

Automating Watershed Analysis

Francis Rengers, Theo Spinelli, Arthur Smith

IntroductionWatershed Wizardary, Let’s try to automate it!

West Bijou Creek

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

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.

Stream Order

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

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

Selecting Max Value

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

Final Stage of Generalization

The Francis Problem

Want dissolve our shape file to get ONE row.

Without getting a Multi-part shapefile.

The Francis Problem

This works perfectly

The Francis Problem

. . . but not Every time

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

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

?

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

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

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

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

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

Some Issues

Cross Sections

Works most of the time

Cross Sections

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

DiscussionToo Big to Not Fail

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.

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

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/

Questions Suggestions?

top related