So in the previous model we talked about general spatial modeling.
How we might combine multiple layers together to give us a model of some aspect
of the real world that we might be interested in investigating.
And in this module we're gonna focus on a particular type of spatial modeling and
that's hydrological modeling.
In contrast to general spatial modeling,
there's a lot of prebuilt tools that we are going to be using
to sort of create an idea of how water is likely to flow across a given landscape.
So what is Hydrology?
Hydrology is essentially the study of the movement, distribution,
quality of water on earth, including the hydrological cycle,
any water resources and environmental watershed sustainability.
So it's divided into surface and marine hydrology,
there's lots of different things that fall Go into the field of hydrology.
What we're really interested in here today is looking at surface hydrology,
how things are likely to flow across the surface.
What I have up here is the USGS water cycle.
It's sort of an info graphic of this.
And we're not going to be really focusing on a lot of these things.
We're not gonna focus much on evaporation,
we're not gonna focus much on anything underground or under water.
What we're really interested in is how things flow across the surface
of the Earth.
So just one thing that I want to define before we get into it and
that's the idea of a watershed.
When we're dealing with a watershed this is essentially the area that contributes
water to a particular feature on the landscape.
This will become important a little bit later on when we're talking about
the final stages of creating a hydrological model, but
this is essentially the physical area contributing to a particular spot,
to the water that flows through, a particular spot.
Sometimes you hear these called basins, catchments, or contributing areas.
So what do we do with hydrological modeling in GIS?
This really let's us answer a few key questions.
How much water might flow across a particular point on the landscape?
How is rainwater likely to flow?
Where is it likely to collect?
Where is it likely to perhaps begin increasing erosion?
What areas are likely to have higher water-based erosion?
Or what bodies of water might be impacted by a spill at a particular place?
So we do this largely through the hydrology tool set in our GIS.
And like I said these are already sort of pre-built tools so
we're just gonna walk through the process of how to do these.
And then in the demonstration we're gonna show the physical of what you might click
to get to each one of these particular tools.
So these are tools for modeling how water flows across a landscape.
And usually our base layer is elevation.
And it's almost always in the form of a DEM rather than a tip.
So if you remember from the earlier module that we talked about topography a DEM is
a raster based form.
And this lets us do some sort of interesting things where we can measure
say, the slope or we could measure the aspect.
All of these things based on the value for one pixel and
then all of the ones around it.
The hydrology tools work in a very, very similar way.
So the DEM is our base data.
And the hydrology tools can be very important again for
understanding rainfall, erosion, spread of pollutants, all of these different things.
So what we see here is a flowchart for what we do in a basic hydrological
analysis in our GIS where we start off with our DEM.
Or we might do some different processes to it, getting ourselves to a processed DEM.
And then we begin to move into the second stage where we're really creating
a lot of this sort of result layers that show us something about hydrology.
So our DEM is our base layer,
here we have an example of one with one of our standard color ramps.
This is an untreated ASTER DEM where you can see sort of low elevation in blue,
this is actually the edge of a river here, and then high elevations in white.
So, the first thing we might wanna understand is what direction is water
likely to flow at any given point.
We do this by creating a flow direction raster.
And this is a raster image where the only pixel value is the direction water is
likely to flow.
So, it's based on the slope again.
This is very similar to the calculation of slope.
Just instead of recording either what direction that pixel is facing aspect or
the angle that it's sloped,
we're looking at what direction water is likely to flow off of it.
So we use the surrounding cells to calculate this.
As you can see from these examples here, if we have a high elevation point and
then we have lower elevation points around it.
It's gonna flow towards the lowest elevations.
It's pretty simple analysis here.
Now the way that it's coded is a little bit interesting in our GIS.
You can see that they're coded with the value of 1 is east,
2 is southeast, 4 is south, 8 is southwest, 16 is west,
32 is northwest, 64 is north and 128 is northeast.
Now I went through all of that because I hope that some of you
immediately looked at that and said those are powers of two.
So that's 2 to the 0, 2 to the 1 all the way around to up to 128.
So this is essentially the first seven powers of 2, which is great if
we're dealing with an 8 bit image where we have our maximum value is to the eighth.
Now why do we have them coded this particular way?
Well, it let's us do something really really interesting.
If you look at this, if you can't tell which one is
likely to have water flowing to it, if it's ambiguous, if it's a flat area,
if the two pixels to the south and to the southeast are exactly the same,
we can add those together to give ourselves the value.
So, that can be seven, if it's south, and southeast.
There's no other combination of pixels of directions that would give us a 7.
So, we can actually understand a little bit about ambiguity in here as well.
So if we're not able to determine which one's likely to have water,
which direction water's likely to flow, we can record that in that pixel value.
So this is what one of these might look like if there is a lot of this ambiguity.
We have essentially an 8-bit image, 0 to 255, 1 to 256 are our values.
So each cell contains the direction that water's likely to flow from it.
Now the next thing that we wanna understand is where are these areas of
ambiguity?
And usually these areas of ambiguity are because of things we call sinks.
So essentially, DEM creations sometimes results in kind of artificial sinks where
one pixel value just happens to be lower than all the ones around it.
Where water might be just mathematically likely to collect.
However realistically we can't collect very much water there and
it's almost always gonna flow someplace or absorb into the ground.
So a sink is a set of one or more cells in which there's no place for
it to outflow, where it's lower than everything else around it.
So unless these are filled in in some way or
processed in some way, it's gonna isolate portions of the watershed and make it so
you can't really analyze how water's likely to flow across the entirety of it.
So usually filling sinks is an early stage in processing a DEM for use in hydrology.
So if we think about this, we also could have peaks,
we could have areas where it's higher than all the values around it.
These are much less of a problem.
It's really filling in these sinks that we end up wanting to do before we
get any further.
You can imagine this cuz if you just have one cell that's lower than everything
around it, all of the water from the entire image that might be thousands and
thousands of square kilometers mathematically, flows into that one spot.
Realistically, that's not gonna happen.
It's gonna fill up and things are going to keep going downstream.
So we want to make sure we process these so
we don't end up with these artificial locations of water collection.
So if we run the sink tool in our GIS, we end up with a series of locations
where water isn't likely to flow back out and we can see those here.
It's just they look like black spots, and when we do them in the demonstration,
they might be on a color ramp, they're just coded by number.
Some of these are actual locations where water would collect,
other ones are just part of the process of creating the DEM.
So we want to fill these in before we go any further.
If there are any sinks, we want to fill them in.
And then basically what this is gonna do is it's just gonna raise them up to
the minimum value.
So it's not gonna change how water would flow through that area,
it's just gonna make it so it doesn't collect any more in that particular spot.
So this is the raw DEM.
And this is what it looks like when we fill in each one of these things.
So if I go back and forth a little bit between these,
you can see that there are some areas that were much lower than
everything around them that have been filled in.
In this particular section of the Earth,
these are spots where water would collect if it rained.
But again, eventually it's gonna fill in and keep flowing downstream, so
we wanna model the entire process of water flowing across the surface.
So now we're left with this sort of middle stage of processing our DEM,
of doing a hydrological analysis, where we have the base data,
the DEM with the sinks filled in, what we call a depressionless DEM.
That's what we're gonna use to understand everything else afterwards.
So when we create our flow direction now when there are no more
syncs in the image, now we don't have any of those sections of ambiguity anymore.
Every pixel is gonna flow some place into another pixel.
So now we just have 1, 2, 4, 16, 32, 64, 128.
We have our directional coding sort of we would have for an aspect.
So when we've created our new flow direction, ready to go.
Now we can begin to look at something called flow accumulation.
So this is a raster image where the only pixel value
is the number of cells flowing into it.
So it gives a measure of how much water would flow into a given cell
based on what is upstream of it.
So if you look at the examples up here, if we're looking across when we
start creating our flow direction, it's essentially a count of how
many arrows point into that particular spot cumulatively.
So if five pixels flow in to one pixels and
then that one pixel flows in to another one that would be a six.
So it's five from the one before and
one more for the one that was previously coded as a five.
So we can build up pretty quickly into high numbers here.
And this again gives us a measure of how much water is likely to
flow through that particular spot.
So when we build our flow accumulations, they're built off of
the flow direction usually, with a little bit of the DEM data in there as well.
And this is what they end up looking like.
They very quickly begin to look like something that you might consider
hydrological where we have these kind of layers,
these lines that represent where water is likely to collect,
because these are the spots where lots and lots and lots of pixels are flowing into.
In this case, they're scaled from a zero value as black so no pixels flow into it,
it is completely black up to about 10,000 pixels flowing into the very edges.
And those are sort of shown as white with higher ones in there.
So it looks very much like a black and white image, but in fact,
it's kind of gray scaled in there.
There's just not a lot of values that are in between very low and very high.
Usually it builds very quickly to be high
numbers of pixels flowing into those particular spots.
So at this point we have a lot of stuff going on.
We have an entire raster image.
We have values for every single cell.
Nothing in there is no data.
A lot of them are zero, five pixels, ten pixels flowing into them.
That's not really very useful information.
What we're actually interested in,
in a hydrological sense is usually the areas where lots of water is flowing.
So we might wanna do something called a threshold.
Apply a threshold to this where we're just gonna throw out all those flow
accumulation values that are less than say 50 or a 100 or something like that.
This is not necessary.
You can do hydrological analysis without doing this, but
it makes the resulting images much cleaner.
It makes the resulting hydrological model much easier to process,
because you're just tossing out a lot of the very low values in there.
So what we see in this image is I've rescaled,
I've just colored the flow accumulation, so that anything that has a value of more
than 50 pixels flowing into it is red, everything else is black.
So what I can do is just remove those values.
Anything less than 50 I just delete it,
anything that's greater than 50 I code it as 1.
So once I've done this, I have basically what I would call a stream raster where I
have the streams that water is likely to flow and how they're likely to collect.
Now I can begin to order these things, so
previously I had some measure of order with my flow accumulation.
Areas with higher values were higher, areas with lower values were lower.
But what's really kind of important when you're creating a hydrological network is
not so much the individual values, but
how many other little channels flow into that particular one.
So this is where I begin to do stream ordering.
There are different methods, there's the Strahler Method and the Shreve Method.
The specifics of them are a little different in how they code.
But it's not really very important in this context.
If you're more interested in it I encourage you to look up,
in a hydrological textbook, what the differences between these are.
We're gonna stick with the default when we're doing this in the demonstration.
But basically, no matter which one you're using,
each stream feature is ranked by how many other streams contribute to it.
So if I have my stream raster I can do this order and
now they're coded based on how many others feed into it.
Now if you think about it when you look at this,
this is something that would be well represented by Vector Data.
Right now it's a raster, but it would be very easy to create a vector data model
out of this, because there's lots and
lots of sections of no data, the things that we have are linear.
So this is where we get to the Stream to Feature tool that we'll work with.
And we basically go through and create a feature layer,
a polyline vector layer, out of this ranked stream raster that we've created.
Now the method that it uses is a little bit different than just simply converting.
So if you're doing this for hydrologic data, you wanna use this Stream to Feature
tool, not a general convert raster to polyline tool.
So once we've done this, we can scale the width
of the features based on the order, the ranking of the streams.
And you see,
you get something very quickly that looks like a hydrological model.
And to be true, if we overlay it on the raster, on the DEM,
you can see that it follows the topography very, very well.
Now we can also do a few other things.
We can do what's called a Stream Link.
This is essentially assign unique values to each stream segment.
And from this we can create a more full water shed analysis of the entire region.
It's simple gone through and
each individual segment has its own unique identifier.
This again works with the stream raster.
We could also do things like what we call flow length and
what the flow length is going to give us is it's going to create a new DE, or
a new raster layer where each cell has a value that is how
far water there would travel before leaving the edges of the DEM.
So in a lot of these hydrological things, the edges of our DEM are gonna be
important, because that's the furthest out spot that we can model.
So it can either be upstream or downstream, but
if we were to drop a drop of water onto each individual spot in here,
it's just giving us a measure of how far it's gonna flow.
Now this could be useful if we wanted to understand how big of an impact
a spill at a particular place is gonna be.
So essentially it gives us some measure of how long water is gonna remain
in the DEM we have.
We can also do what we call a watershed analysis.
And we do this by going through and either measuring how many
areas are there going to be to the edge, how many different sections are gonna
flow out, how many different places along the edge of the DEM water's gonna flow.
Or we can do this for particular locations and
these particular locations are called pour points.
So one tool that we need to do before we
do this in something called snapping our pour points.
And our pour points are going to be a particular location.
It could be a location of an archaeological site,
it could be a location of something that is going to pollute a lot.
Or if we were going to build a building and
we didn't want it to be in a bigger watershed channel.
However the location of that point is a vector point so it's gonna be very,
very precise and it may be that we're just a hair over the edge of one pixel or
just sort of slightly within a higher one than we wanna be.
So usually what we want to do is move these things slightly so that they match
up with wherever the highest flow accumulation within a radius is.
This will give us a better measure of what's gonna happen at that
particular spot.
And what this does, is it kinda prevents the accidental creation of very,
very small water sheds, kind of on the side of a channel or something like that.
So if we create, it's basically going to move our point feature, so
if we have a series of point features across the area here.
If we were to run this watershed tool, and see what the catchment for each one of
those points is, if we do it for those particular points without snapping them,
some of them will hit it pretty well.
Some of them we won't, some of them will be very, very small,
some of them will be normal size.
But if we run the Snap Pour Points tool, and then afterwards
rerun that watershed analysis, you'll see that we get much, much bigger areas.
And these are more representative of how much area
actually does flow through that particular spot.
So that's an overview of a particular type of spatial modeling,
hydrological modeling where we're understanding something about how water is
gonna flow across the surface.
I've also given you an overview of the tools that we're going
to use during the demonstration.
So the way that we walk through the process of creating hydrological model
in our GIS.
Now in the final demonstration, we're gonna conclude with a little bit of
understanding of how to create three-dimensional data.
Some of this could be hydrological,
it could be coming from almost anything else that we've dealt with.
But it's usually going to be topographic in nature.