So in the first module, we discussed the basics of GIS, what it can be used for,
and a little bit about the different data types that we use in GIS analysis.
And we discussed, particularly, two data models, the rastar data model and
the vector data model.
In the second and third modules,
what we're gonna do is discuss each one of these in a little bit more detail.
So I'm gonna begin with just going over the basics and
some of the things we can use raster data for here.
So raster data as I hope you remember, are data that are based on pixels.
So, we zoom in far enough on our raster data layer,
we eventually see the individual pixels making up that image.
We can't zoom in any further, on to those pixels.
They're always going to be a, a set amount of data.
Just like what we see in this image here,
we zoom in far enough on Notre Dame Campus we see the individual pixels of the image.
And the size of those pixels in real world coordinates is
something referred to as the spatial resolution.
So it's the length of one side of that pixel
in real world coordinates is what we call the resolution.
So if it's ten meters on the side we call it a ten meter resolution image.
That 10 meter resolution image means that each individual
pixel covers 100 square meters.
If it was 5 meter resolution it would be 25 square meters.
If it was one meter resolution it would be one square meter.
Now if we wanna see what this looks like across different data types,
across different resolution imagery, we can see that in this image here where we
have something that has 30 meter resolution,
we can barely make out the details of Notre Dame campus here.
Whereas we get through 15, 10 meter resolution down to 60
centimeter resolution, we begin to see a lot more detail in the individual image.
And just to show these in a slightly different way, as we zoom in on one image
we begin to lose these details, we begin to see the individual pixels in there.
And I have already mentioned a few times, we can't get in any further.
And that is just the nature of pixel based imagery is you can't really enhance
them very much beyond the individual pixel without asking for
some sort of outside data that really isn't present in the initial image.
But let's look a little bit about the basics of what this imagery is.
At its heart, essentially what we're looking at is a matrix of
Intensity values of how bright to display an individual pixel.
We can think about this just like we would a matrix of numbers,
cuz that's essentially what it is,
is it's a big matrix of numbers that the computer then uses to display
that particular pixel in how bright it is, and even in how colorful it is.
So if we want to look at these values what we can see is one image on the left here
and then the individual values of those pixels on the right.
Now just like we would be able to with any other matrix of numbers,
we can begin to do some matrix algebra and some different types of filters on
it that allow us to see some sort of neat things from raster data.
So just to review a little bit on the properties of a raster,
each grid cell holds a value.
It might be five, it might be 3.6, it might be blue.
And then that value controls how the computer displays that particular spot.
So it can be, the cell can hold an index, it could hold, say,
one, which would be translated to water, two would be forest, something like that.
It can be a scaled value, something like elevation, or
it could be the amount of light reflected.
And this is what a digital photograph is,
it's essentially the amount of light reflected back at the image.
So the resolution is then the size on the ground, so
that's how it scales that matrix of numbers to be real world coordinates.
Now the most common and
the most basic type of imagery that we deal with is what we call 8-bit imagery.
This is a grayscale image, so an image that's only in black and
white where each cell has a value of 0-255.
So 256 possible values.
Now for the people out there that are sort of mathy,
256 is 2 to the 8th power, this is why we get 8-bit imagery out of it.
So each cell has a value that corresponds to that color.
So a low value is going to be very dark and
a high value is going to be very light.
And we can think about this as being Scaled in the amount of color.
So the difference between 252 and 253, our eyes can't really pick up that difference,
but the computer can and these small differences are meaningful in some cases.
So we want to make sure that we understand that even with 256 possible values,
there are things beyond the ability of our eyes to pick them out.
Now the neat thing about this is we can begin to calculate some statistics on
an image just by looking at all the values that make up that matrix of numbers.
And the most common thing that happens is we put these into a histogram.
This histogram lets us understand something about the image.
So in this really, really simple basic one that I've been using as an example,
you can see that if you look at the histogram,
we see that there's an overwhelming preponderance of really light pixels.
That's all that white area that's in there.
There's a little bit less that's very dark and
there's kind of a little bit of a Bell-curvish thing in the middle there.
That's all those gray values that we see.
So from these histograms we can begin to do things like create a little bit of our
understanding of what the mean value might be, the standard deviation and any number
of other kind of basic things that let us understand something about the image.
Now if we look at this for a much more complicated image, or a bigger image with
a higher spacial resolution, you can begin to see that we have essentially the pixel
values across the x axis here, and then the number of pixels falling into each one
of those bins or falling into one of each of those values falling across the y axis.
So what we begin to see on this image is it looks like we have something that's
quite dark The section that's quite dark, and then a whole lot falling into this
sort of less than a hundred and twenty but more than probably 60 range and
almost nothing in the image that'a very, very bright.
This is common when we deal with things coming from different remote
sensing techniques or things coming from different types of imagery sources.
And this is what this image might look like, or
an image like this might look like.
Where we have kind of a histogram, most things are sort of dark in there, and what
we end up with is an image where we can't really see a whole lot of detail in there.
And even worse, what often happens is that we get something that looks like this.
Where we have, almost no detail that's visible, and if we look at the histogram
almost everything is falling almost within one little value,
our eyes can't really pick out the differences there.
Now what's really useful about a histogram is we can do something systematic to it
to sort of stretch out the differences and
begin to see those things in a way that our eyes can pick them out.
All right that's what we call a stretch, a histogram stretch.
And in this case what we call a linear histogram stretch.
So essentially what we're doing is we're taking the value that was previously 127,
sort of the maximum value in that really, really histogram,
stretching that out so that it becomes the maximum value, 255.
And then displaying what the resulting image might look like.
So we begin to see things that was previously say 60, has now become 80.
But what was previously 59, has now become 70.
So we actually can begin to see the differences between these things in a way
that we couldn't previously.
We can actually do the same thing with the low value as well.
So what was previously sort of in that gray area, maybe 100 or
so, has now been stretched out to be a much lower value.
So what we've actually done is we've created something that looks more like
a normal curve, more like a bell curve, and
begins to show us some of the differences in the image much more clearly.
So this is that linear unstretched one.
This means there was no stretch applied to it.
It's that image we saw from the very beginning where we just have this sort
of everything falling into this one little section.
And this is what it looks like when we begin to apply these standard
stretches to them.
Now, the standard deviation stretch, like what it says up here,
is essentially taking the mean value, going out two standard deviations.
That becomes the maximum.
Going two standard deviations in the other way, that becomes the minimum.
So it's a systematic way to apply these.
These are so common with remote sensing data, with satellite imagery,
with any sort of imagery that we're going to deal with in the GIS context.
That it's the default when you load something into the software we're
working with as it has these stretches on it.
There are other ones we can do that are more complicated.
This one is called a histogram equalize.
We'll talk about this a little more in the demonstration part of this module, but
a histogram equalize is essentially not doing the lineare relationship, so it's
trying to put everything into enough bins that we have a pretty bell curve in there.
So what about color imagery?
How is color imagery different?
We've been dealing with black and white, what we call grayscale imagery.
And we don't really take a lot of color photographs anymore so
this might be a little hard to think about.
But color imagery is essentially the same thing just repeated multiple times.
It's really common that we see color imagery from satellite sources.
Most of our raster data is gonna be color in some way or another.
And essentially what we can think about this is,
because the computer makes up color by combining three different types of light,
we can do the same thing when we build these images in a GIS context as well.
So computer screen, everything is made up of red, green, and blue light.
Any combination that you're seeing has some value for red,
some intensity value that's displaying that color for red, intensity value for
green and intensity value for blue.
This is what they kind of look like.
So we have an image here where we're seeing sort of
a yellow construction equipment with a blue sky and a few other things in there.
But you can see that the computer at its heart has three different layers in there.
It has a red layer, a green layer, and a blue layer.
And it's sort of the intensity of red, the intensity of green, and
the intensity of blue combined together is how it creates all the different colors.
And this is essentially, you can do this in Photoshop, you can do this in pretty
much any image manipulation program, you can play with these different things.
And you can do the exact same stuff in GIS.
So what we have, if we're looking at a a particular type of imagery here,
in this case, this is Landsat.
It's a type of satellite imagery, we'll get to this much,
much more in a later module.
We might have three different bands of
sensors that we've gotten from the satellite.
We can combine them together in the same ways.
We have band one, band two, and band three.
Each one goes into a particular color channel or gun,
sometimes you hear them called channels, sometimes you hear them called guns.
It's essentially just the way,
what that particular data is being displayed color-wise as.
So we can combine them into our red, green and blue.
And then we can mold those together into one image that shows us all
three of those different layers at once.
In this case green, red and blue are bands one, two and three.
So, what are the advantages and disadvantages of our Raster Data Model,
before we begin to look a little bit more at some of the different data sources we
might deal with?
The advantages are, it's continuous, it's a grid of numbers, it's a matrix of
numbers, so it's got to be continuous across the entire area that you have.
It may be that there's certain areas that we sort of flag as no data, or
we don't know, but there always, always is data for each pixel in a raster image.
We can perceive detail well beyond what our eyes can.
Again, that's why these stretches work,
cuz we can't see the difference between a 78 and a 79.
But the computer can, then we can begin to manipulate it so
that that actually makes it a little bit more clear.
It's very easy to manipulate raster data like this, we saw that from the stretches,
those happened lightning fast.
Some of the disadvantages perhaps, we have a fixed resolution, we can't
get in any further than the resolution that we had the image at originally.
It's just simply not possible.
Because they're continuous we tend to have a very large file sizes on raster data and
it can be kind of difficult to go in and to edit individual pixels.
So let's turn a little bit to talk about some of the things we can do with
these raster data.
And probably the most common one that we deal with is satellite imagery or
remote sensing data.
So before we get into too much about satellite imagery, I just wanna make sure
that everyone understands what makes a particular object a particular color.
It's essentially the, how much light is reflected of that color off of the object.
So a red object is actually reflecting red light back at you and
absorbing all the other different wavelengths of light.
So the same thing is even true in wavelengths of light that we can't see.
And because particular objects reflect differently in different wavelengths of
light, so this is actually, the same is even true in wavelengths we can't see,
across the entirety of the electromagnetic spectrum.
Whether it be the little tiny section in here that is visible light that we can
see, whether it be the ultraviolet, whether it be the near infrared.
Different objects, different types of cover, different things absorb
particular wavelengths of light and reflect other ones back at you.
We'll get into this a lot more in a later module on satellite imagery analysis but
I just wanna make sure that we can get through the basics of this so
we can understand the raster data that we're gonna be manipulating in the demos
for this particular module.
So because each object reflects different wavelengths of light in different ways,
we can create what's called a spectral reflectance curve.
And a spectral reflectance curve is essentially starting at a particular spot
in the electromagnetic spectrum, working our way up.
How much light, what percentage of light is reflected in different wavelengths?
So again, an object that's gonna be red, is gonna reflect very,
very strongly in the red, it might absorb all the other colors.
But this is even true in areas of
the electromagnetic spectrum that we can't see, like the near infrared.
And the near infrared is probably the most useful one for satellite imagery analysis.
Now I wanna make it clear here,
when I'm talking about near infrared, this is not Predator vision.
This is not infrared cameras and things like that.
This is a wavelength of light that's somewhere in between there.
It lets us see some different things.
You can notice this a little bit from the spectral reflectance curves that I have up
here, which show bare soil which is kind of grayish-brown,
vegetation which I have in green, and then water which is generally kind of clear,
maybe, with a little bit of a bluish or greenish tinge to it.
So this is the section that we see as visible light, and
you begin to see pretty quickly why trees are green.
There's a little hump right there in the green spectrum.
You begin to see why water's kind of bluish green,
there's a little hump right there.
And why other things tend to be lighter in general, they reflect more light overall.
Now if we're looking at a black and
white image, a grayscale image, this is what we would see, the sort of mean value
across this entire area controls what is light and what is dark.
So water's gonna be really dark, trees are going to be something in between,
bare soil's gonna be a lot lighter.
And that's exactly what we might see in something like this.
Where we see pavement, bare soil,
it tends to be quite light, the river in there tends to be very, very dark.
And everything else is somewhere in between.
Now, if we do that thing we're putting individual wavelengths,
individual bands in the different channels or guns to see a color image,
well, this is what we will do if we wanted a real color image.
We put the blue reflectivity in the blue band, into the blue gun,
the reflectivity in the green band into the green gun,
the reflectivity in the red band into the red gun.
And that's how we make a color image.
That's why we begin to see these colors sort of recreated on the screen like this.
But if you look out on that band, on that spectral reflectance curve,
there's lots of sections in there that reflect things that we can't see.
They are well outside of the visible spectrum,
that seem to be doing some pretty interesting stuff.
Vegetation starts reflecting almost everything when we get out of the visible
spectrum.
Water starts absorbing almost everything, reflecting almost nothing.
And soil kind of doesn't do much that's all that different.
It sort of gradually increases.
So let's look at this one little section right here.
Where we see that instead of vegetation having reflected less light than bare
soil, it's now flipped, so it's actually reflecting quite a bit more.
So things that are vegetated should be brighter than things that are not
vegetated at this point.
And that's as exactly what we see, is we see that crop fields in here are a little
bit brighter than water, than cities, than things like this.
And it's this near-infrared band that lets us figure out some really,
really neat environmental things from remote sensing data.
And very commonly,
what we end up doing is being able to see multiple stuff at the same time.
There's not a lot in nature that's particularly red.
So what we might wanna do is, instead of showing the red gun,
that red channel, showing red, we might wanna have it show near-infrared.
And that's exactly what we have here, so we're showing blue is still blue,
green is still green.
But we're not showing anything that's red,
we're showing a different wavelength of light in the red gun.
And this is a really common way to see satellite imagery.
Where things that are more red are generally more vegetated, or
at least reflecting more strongly in the near-infrared.
We're gonna deal with how to manipulate these things a little bit in
the demo today.
But, really, all of the same stretches, all of the same
things that we did on single-band data, we can do on these multi-band data.
We just have the advantage of being able to put different wavelengths of light,
different things into different guns, and
be able to see stuff that's well outside of our ability to see with our naked eyes.
There is one last little part of analyzing these data that I wanna talk about, and
it has to do a lot with the fact that these are matrices of numbers again.
So, really, the difference here between our single-band images and
our multi-band images, our black and white images and our color images,
are two kind of key terms that I wanna make sure that you guys understand
well before we get to the point in the modules that it's extremely important.
And that's the difference between these two types of data.
So we have our panchromatic image.
Panchromatic means it covers multiple chroma, or multiple set colors,
multiple sections of the visible spectrum.
A black and white image, essentially, an image that we just show in a single
black to white color ramp, and really is reflecting reflectivity or
sampling reflectivity across the entire visible spectrum, and
maybe even a little bit beyond.
And then we have our multi-band images, which are essentially a color image for
putting individual slices of light, individual reflectivity and
individual wave lengths into different color guns, and
then using that to recreate different colors.
Now regardless of which one we're dealing with, there are a few different other
things that we can sort of marshal the fact that these are matrices of numbers.
It might be three, five, seven matrices stacked on top of each other,
but their matrices of numbers we can begin to do some type of analysis on.
Now, the first concept
in here that's important is what we call spacial frequency.
And this is essentially the difference between pixels,
the kind of mean value of differences between pixels.
So something with zero spacial frequency is all the same across the entire thing.
If we took an image of blue just for the ocean, or
an image of green just for the Amazon, it would have very low spacial frequency.
It would be all basically the same across there.
If we had something with a very low spacial frequency it means
it kinda gradually fades from one thing into another.
You can see in that middle image up here where it sort of
goes from black to white very, very slowly and gradually.
Or something with very high spacial frequency is
very different between individual pixels.
So we might have something that's black in one pixel, white in another, and
goes all the way across sort of like this checkerboard pattern here.
Now, when we're analyzing the spatial frequency,
when we're doing these different types of things, the best way to understand these
is to do something we called a filter or sort of a manipulation of the image
that we do by looking at an individual pixel In relation to the pixels around it.
And what this lets us do is understand things related to the spacial frequency
cuz we can't really understand what the spacial frequency is just by looking at
an individual pixel.
We also have to look at the ones around it.
So what we're seeing here is, if we're looking at an individual pixel,
we're applying some function to it based on the values around it, and
then we're modifying the original pixel value based on the stuff around it.
This local neighborhood is something that we call the kernel.
So this is the area of pixels contributing to the new value.
And essentially when we're doing these filtering techniques, what we call
convolution filtering, we're looking at one pixel, looking at all the stuff around
it, and then moving on to the next one and looking at all the stuff around it.
And only the old values, so it's gonna have an old layer and
then a new layer that that filter has been run on.
And the kernel, the path,
will sort of move across like this in a very systematic way.
So the way that these convolution filters work is by, essentially, we have our
kernel, what we see up here with all of these -1s and a 16 in the middle.
The way that they work is we multiply each value
from the original image by its value in the kernel.
So the center 1 is multiplied by 16, all the others are multiplied by -1.
We create the sum of all of these values, and
then we divide it by the sum of the filter, itself.
This is complicated math and probably a little bit difficult to wrap
your head around, but it lets us begin to see some neat things in the image.
And we'll do these a lot in the demo for this particular module.
So we might have something like what we call a high pass filter.
What we see here, this is the exact one I was using in the previous slide,
where we have our original values,
and then we have our new values that we've created by multiplying them.
So we've taken -1 and multiplied it by 8, -1 and
multiplied it by 6, -1 multiplied by 6, all the way across.
The center one's the only one that's different, that's gonna be 16 times 8.
Then we're gonna sum all of those values together which is gonna give us 128.
We're gonna divide that by the sum of the kernel,
and that's gonna give us a new value of 11.
What this is doing is essentially
increasing differences based on the spatial frequency.
So if it's very different in there, it's gonna get a higher value.
So in this case we have 8, we have 2, we have 2,
we have low values and a higher value in the center.
So it's actually quite a bit different there.
It is a high spacial frequency between this pixel and
all the ones around it, with a couple of exceptions.
So there's a moderate, perhaps, so it's gonna increase that to be 11.
If they were all the same, it would actually decrease it down.
So if all the values around it were 8,
it would end up just being 8 even if the center one was different.
So this sharpens an image.
This is what happens if we apply our high pass filter, is it goes through,
and any place where there is a little bit of difference it makes it a bigger
difference.
So we begin to see very, very different areas in there.
And we can pick out some things that we might not have been able to see with our
naked eyes.
Now, in contrast is what is what we call a low pass filter,
which is essentially going to decrease the spatial frequency.
So if we look in there, I am not gonna walk it all the way through again, but
essentially what you see is that instead of increasing the value of 8 to 11,
it's actually decreased it.
So it's actually sort of blurring things out and making it so
that there's less difference in there.
So we're actually gonna see something that looks like this,
where it was larger differences before, and now it's much, much blurrier.
There seems to be a lot less difference in there.
Now, a frequent question when I show these low pass filters is,
why would you ever do that?
Why would you decrease your image?
Why would you blur out your image?
It's really useful if there's noise in the image.
If you're taking something from a remote sensing technique or something where
there's actually noise in there, where there's a problem with the sensor,
it's a way to kind of overcome that pretty well.
There are other ones, things that we call edge detect filters that are gonna
go through and either vertically, or horizontally or sort of diagonal.
We'll see if there's a big difference from one side to the other,
it'll give it a high value.
If there's no difference it'll give it a very, very low value.
So what you see here is from the middle image, is the original.
And the one on the left is a vertical edge detect, so anything that's very,
very different in east west is gonna be white, and
anything that's not very different in east west is gonna be black.
And the other one is a horizontal, so
anything that's very different north south is gonna be very white, and
anything that's not very different is gonna be black.
So that's really it for talking about for convolution filtering in ways that we
might begin to analyze some of these raster data.
In the demonstration this week we'll deal with these techniques in a lot
more detail.