0:00

[MUSIC]

Â Hello again and welcome back.

Â In this lecture, we're going to go over how we make streamlines out of a digital

Â elevation model.

Â And we're doing this for a couple of reasons, one is that you've all ready done

Â it in a few of your assignments, so you did it in a previous class

Â as an introduction to complex processing algorithms that require multiple steps.

Â And you did it in this class, as your model builder tutorial, and

Â I want to talk to you a bit, conceptually, about what we're doing at each stage,

Â to kind of demystify some of this as well.

Â I know that many of you aren't that interested in hydrologic processing.

Â It might not be specific to your area of work, but I still think that

Â clarifying what we did when we worked on this is going to be helpful.

Â So in this lecture I'm going to go over it all conceptually, and

Â in the next lecture will actually go through tool by tool.

Â So first off, we have a series of steps to find the locations that have higher flows.

Â So, in the past you used flow direction, and flow accumulation, and some

Â thresholding tools to find streamslines based upon a digital elevation model.

Â And these tools are specific to the hydrologic domain, and

Â we chain them together in order to make the algorithm, the process,

Â that we need in order to get the actual streamlines out of it.

Â Each of these tools in isolation only gets us some specific piece of information,

Â but together in order we get what we need.

Â And the last thing I want to point out here is that when we look at a digital

Â elevation model like this, we can easily see the streams in the landscape.

Â You probably see it even if you don't work with rivers and water all the time.

Â These low spots, these dendritic networks are sort of obvious to most of us, and

Â not all landscapes look like this, but it's very clear where the water flows.

Â The water flows down here into here and then down along here, but

Â how do you tell a computer what that looks like?

Â That's the problem we're dealing with.

Â So conceptually, just kind of before we really dig into it, just remember that as

Â water flows it can erode the landscape, that's how this dendritic networks form.

Â They don't just start dendritic in the mountains, that water slowly carries

Â away the sediment and creates that network of merging streams that we're used to.

Â So even though it says here that topography defines the drainage direction,

Â similarly, the drainage defines the topography.

Â And while you have some initial set of starting conditions to do the geology,

Â everything is kind of chaotic, and changes together.

Â So as the weather sculpts the terrain, the terrain continues to move and

Â changes the water flow too.

Â 2:48

So let's start with Pit Removal.

Â With a digital elevation model we aren't getting an accurate representation for

Â the landscape, remember we have a model of it.

Â And that in creating a DEM at 30 meters, or 10 meters, or whatever,

Â we get artificial pits and we need to fill them in,

Â because otherwise water just gets stuck.

Â The processing that we're working with has no concept of water flowing into one of

Â these and becoming a lake and filling it up and then flowing back.

Â It just says, okay, it flows into that cell and that cell doesn't flow anywhere.

Â So, in general when a cell doesn't flow into a cell around it, or

Â that has no downstream cells, we decide to fill it.

Â Otherwise, these pits become sinks and suck up all the water nearby,

Â and then our DEM doesn't actually work correctly for

Â water shed processing anymore.

Â So, when we fill it in, we get something like this where, originally,

Â this would have been a pit, and this would have been a pit, and each one,

Â coming from a slightly different error.

Â One where the DEM's a little taller than the surroundings should be, and one

Â where it's a little lower, and as you fill it in, you just kind of make it straight

Â across, and the water can flow across the surface, and will keep going downhill.

Â 4:05

And this does have an effect in the overall elevation of the digital

Â elevation model.

Â So if we were to trace water down the stream in this river,

Â this blue line on here is the original elevation of the river, and

Â you see it kind of going up and down, up and down.

Â And, an area that suppose to keep going down hill it really doesn't

Â do that in most cases, and so the pink line shows the effect filling it,

Â that it keeps kind of going straight across to bridge these fluctuations in

Â the landscape here, or apparent fluctuations in the model, rather.

Â Okay, so how do we actually, once we filled our DEM,

Â turned it into a set of streamlines.

Â Well, we start by determining the direction of flow for

Â each cell, and we used hydrologic flow direction calculation.

Â And what that means is, it's not just a slope calculation, it's specific to

Â which way the water will flow, and that's the direction of steepest descent.

Â And while it might initially seem like you would look at the cell in the center, say,

Â and look at the window of cells around it and just look for the lowest value,

Â that's not always exactly the case.

Â So, we know it's not going to flow up hill.

Â So it's not going to flow to any of these three here.

Â So the steepest descent would actually go probably from one of those into here.

Â But if we are evaluating this one cell, if flow direction goes through and

Â evaluates each cell with kind of a moving window through the raster,

Â if we're currently evaluating this cell in the middle here, and

Â the elevation values are these numbers, which direction is the steepest descent?

Â Well, if we actually do a slope calculation,

Â taking into account the distances between the cell centres,

Â we have to remember that the diagonals are the square root of two, length and

Â distance, and this is one, one unit of whatever the cells are.

Â So, this is about 1.41 in length, while this one, and

Â when we're doing our calculations of slope, we have to take that into account,

Â so, for slope we'd get this value minus this value.

Â Since that's our rise or fall, so that's y over x,

Â change in y over change in x, right.

Â So our change in y being our actual DM levels,

Â is the difference between these two values, and

Â the change in x is the cell size times our unit length here.

Â So, in this case, if it's a 30 meter DEM, then we have 30 square root of

Â 2 going diagonally and just 30 going straight, up, down, left, or right.

Â And our direction of steepest descent would turn out to

Â be in this direction of this 52 here.

Â Because, ultimately, 67 minus 52 gives us 15 over 30,

Â which gives us .5 for our slope.

Â Whereas, this one gives us 19 on top, but 30 root two on the bottom,

Â which ultimately calculates to about .45.

Â So it's a smaller slope going this way than it is going straight down.

Â 7:11

So once we calculate our flow direction, we get new values out, so

Â that this grid here is a little different.

Â This is showing the values that result from flowing to any one direction.

Â So the resulting raster, this cell in the middle here gets replaced with a value

Â based on which direction it flows.

Â So, if it flows downward in this encoding, this cell becomes four,

Â because flowing downward becomes four.

Â And if we go to the right, this value becomes one,

Â to bottom right becomes two and so on all the way around, but this isn't perfect.

Â We might get stair stepping, because if we look at this topo map here,

Â the direction of flow probably is straight down here.

Â The contour lines look like maybe the flow should go this way along the red line,

Â but if we can only go in eight directions based upon this encoding here, then,

Â we can only go to one of these two cells instead.

Â So, the direction is a little off and it might be that it chooses to go here, and

Â then it goes here, and then it has to stair step again from here to here,

Â something like that.

Â So, it's not perfect.

Â Again, we're working with a digital elevation model,

Â but our flow direction itself is also a model.

Â Ultimately, what we end up with is a grid of values based on the flow direction.

Â So if the arrows are our concept of which direction things flow in, and

Â things are kind of flowing along this way,

Â this grid here shows the numbers that would actually

Â be stored in the flow direction value that the flow direction tool gives us.

Â Or in the flow direction raster that the flow direction tool gives us when

Â we're done.

Â So these cells all flow down to the right and so

Â all three of these have the value of 2.

Â But then, when we start flowing down we get the 4's here and

Â we can match up these arrows in this grid all the way across.

Â 9:05

Ultimately, once we have our flow direction,

Â we have enough information to create a conceptual grid Because if we think of

Â this cell is pointing to this cell, then we can connect their cell centers.

Â And then this cell flows to this cell so we can connect the center there, and

Â then this cell flows to this cell, so we can connect that center.

Â And this cell flows down to this cell, and we can connect that center there.

Â And we can do the rest of this across the landscape of our raster.

Â And start connecting cells based upon which cell it flows into or

Â which cell it kind of points to if we have this arrow concept.

Â And all of a sudden we have what looks kind of like streamlines.

Â What looks like a grid network of some sort.

Â And that's where we start building the flow accumulation grid.

Â So when we have flow direction, the values represent which way the cell flows but

Â flow accumulation represents how many cells have Float into that cell.

Â So if we have that same grid here, that we built before, for once up top here,

Â these are all origin points so no cells flow into them so they get a zero.

Â But this cell here has two cells going into it this one and

Â this one both flow into it so it gets two and then as it flows down again all

Â this one has to get ten because it has one from here it has three from here and

Â it has another three from here makes six and seven and

Â then it has another three coming from up here all the way to ten.

Â So you got these merging and you can just count The up string cells.

Â The cells that are flowing in the direction that create this

Â network become the value of the actual cells themselves.

Â Now in the process of generating this flow accumulation roster, we don't actually

Â ever have anything representing this network or grid, or this network here.

Â We only have the flow direction raster which becomes the flow accumulation raster

Â but conceptually we can think of this as what's occurring is connecting

Â all these cells so that we can count up how many are upstream of it.

Â But this calculation of how many are upstream actually

Â is what is an intermediate product for

Â us to get a layer that has this kind of connection to it.

Â And how we end up doing that is once we have that flow accumulation rastor we can

Â start to count up the cells with the highest values.

Â So we might say that you need ten cells.

Â Maybe these are 30 metre cells so that makes them 100 metres square And so

Â then we have 9,000 square meters before we decide that it's a stream.

Â So we start the brush holding and

Â say okay any cell with more than ten upstream cells is really a stream line.

Â And the reason for that is the whole landscape does potentially receive

Â water falling on it but it doesn't all accumulate into a stream until

Â you have enough of it kind of flowing into the same spots.

Â To come together and have enough water to build up a stream.

Â Or, to put that better, water flows across the surface of the landscape, but

Â may not be noticeable as a stream until a lot

Â of water flowing on the surfaces comes together to a low point and

Â You have enough to make what appears to be a stream.

Â Enough water flowing across the surface there to turn into an actual stream or

Â river.

Â And at that point, our conceptual stream network here,

Â we can kind of highlight these lines through it because this is connected to

Â here still and then down to here and on that.

Â 12:34

And we can also generate watersheds based on that by saying, okay,

Â if we have this outlet and this network of streams that we have thresholded

Â saying this is really a stream.

Â But all of these cells flow into these cells down here.

Â If I want to know what flows into this polygon or this cell here,

Â then give me the polygon or set of raster cells that actually flow there.

Â And that's the water shed of this point right here,

Â is the set of upstream cells flowing into it.

Â And we have all that data based upon our flow direction and

Â our flow accumulation rosters.

Â So this works a little differently once we actually start using the tools and

Â we'll go through that the next time.

Â But the flow direction and

Â flow accumulation tools are the backbone of finding these river locations.

Â And the rest of its Kind of more just processing in order to get those to give

Â us what appears to be extremes.

Â And to summarize it all up we need to precondition the DEM by filling it first.

Â And then we can find the streamline locations using flow direction and

Â then propagating it across the landscape using flow accumulation.

Â And then getting the streamlines out of it really is about thresholding our flow

Â accumulation values to what actually is a meaningful river or stream to us.

Â Okay as I said, in the next lecture we're going to go through the tools required to

Â make this work.

Â So see you next time.

Â