Вы находитесь на странице: 1из 3

[MUSIC] Hello again and welcome back.

In this lecture, I'm going to show

you how to use the reclassify tool to take a raster and change all of the
values over to other values you specify. So here's our scenario, this is also a
situation I've personally
had to deal with and it's not uncommon. I have these two rasters
representing the same theme, they are both land cover rasters. This first one yo
u've seen before,
and it's at 30 meters and has a bunch of different classes in here,
and there are class definitions online. And then this other roster has fewer
classes, it still goes all the way up to 255 because it's using eight bits,
but it really has 17 class definitions, and it's at 250 meters, and
these class definitions are not the same. And so it's a larger cell size, and
it has different class definitions, and it even has a different color map,
but that's easy enough to deal with, we can always change
the colors that are displayed. But, this one is from 1961,
and this one is from 2011. And I would like to do a 50-year
analysis of land cover change here, and see what's the difference
between the two of them. In order to do that, I need to make
sure that the values of the pixels mean the same things, and
that's where the Reclassify tool comes in. I'm going to take the 2011
landcover raster and reclassify its values to
match the 1961 raster. And that's not always
the right thing to do, but I will need to normalize the cell
sizes and make their classes match. And the reason I'm using, or
turning 2011 one into the 1961, land cover rasters classes,
is because the 61 raster is less specific. So it has more general classes,
that it's easy to fit all of the data from the 2011 roster into, but
it wouldn't be easy to go the other way, because I'd have to break out data that
generalized in the 1961 roster into specific subclasses, and
that wouldn't work quite as well. So, looking at the metadata that came with
the 1961 raster here, let's bring in view. And with this to the right side and
shrink that, and what we can see is the definition
of each of these values, so 1 is Water, 2 is Developed, and
I know that in this raster 11 and 12 represent water and
21 through 24 represent developed. So they're trying to be somewhat similar
in some ways, but I have four classes for developed areas in the newer data,
and just one older data. So I'm going to condensed this, I've
already spent the time looking at the new data's metadata, and old data's metada
to kind of map these together. So I won't bore you with it, but basically
what you'd want to do in a case like this is to look at what the values
mean in the new data, and what the values mean in the old data,
and on paper or electronically We come up with some way
of saying okay, 21 goes to value two. 22 goes to value two. 23 goes to value two
. 24 goes to value two. 11 and 12 both go to value one and
do that for all of the values in this
raster via what you want. And once we have, we can go to our
toolbox which I'll shrink a bit. And in spacial analyst tools, if we go
down to the reclass tool set there is a reclassify tool and
we can reclass using files and tables and functions but this time we'll do it
manually to get the concept down. And I select the raster I want to
reclassify, which is my newer one, and it's the value field I want. And it gives
me some suggestions. It's not doing anything
particularly intelligent here, it's just trying to give me four groups. And I ca
n click the Classified button and I can use these sliders just like
I do when I'm using symbology. Which tells you that this is very
similar to the types of Reclassification that symbology does is it tries to
break your data into groups based upon a specific method here. But that's not wh
at we want here. We could do that if we wanted to, but

in this case we're really looking for a specific set of reclassification. So I'm
going to cancel out. We're going to edit the entries that
are here, and then add some new entries. So first,
I know that the old value of eleven goes to the value of
one on the 1961 roster. So in this case, we're kind of flipping
our characterization of old and new because it's the old values
the roster that we're looking at and the new value that we want it to be. So, I'
m saying value 11,
which is for open water. It's going to the value of 1,
which is for water in the new type here. But then value 12,
oop value 12 were pending a licence, now goes to 17 in the new format here. And
now we finally get to do a range here. So we're going to do values 21 to 24, go
to value 2 which is for
developed and value 31, I'm also going to class to developed
it's not quite a perfect match but it's going to work and
now you need the add entries, Okay and it didn't like what I
did there and that's because I didn't enter the range with spaces
around it so if I do this it's going to complain to me that I didn't
use a hyphen with spaces around so instead I need to do 21 -24 And the 2 and
now it's going to be okay with it. And then if I now go and add my 31 and
map that to 2 as well, that should work, And value 41 goes to value 8 and value
42 goes to W9 and these are different types of forests here. And then value 43,
now I can scroll down, goes to value ten, still forced. So we're making this map
ping here,
we often call these things mapping, not like creating a map, but
a mapping between values. This value maps to this value. In and I'm going to do
the rest of this
a little more quickly because I think you get the concept now. Okay, and now I h
ave my table
of values all set up here and the basing on the value field. And I can name it
2011_Land_cover_as_1961_values and run. Okay. And it failed, and I've seen this
particular error many times. The error at 999999,
aka it doesn't know what went on. And it gives you a few different things. It sa
ys the table name is invalid and
no special reference exists. Either or
neither of those is likely to be true. This is just a generic error where
something went wrong and what I usually end up trying in situations like this
is moving the data to a new workspace, whether to a new geodata base or
a new format and also Changing the names in some way
maybe I have to [INAUDIBLE] name even though I don't or I shouldn't end
it with numbers or something like that. Occasionally, these types of things
are just a really finicky thing by arch JIS and we just kind of need a little wi
it until we get it right and so the first thing I'll probably do is restart arch
see if I can get it working there. Okay, I'm back up, and
I bet I know what I did wrong. If I open this up, I started a file
geodatabase name with a number, and that's a no-no. It doesn't really tell you i
t's a no-no,
but it's a no-no. So let's change it to
NLCP 2011 as 1961 values. And change it back to the here. And try running it now
. And that's much better. It was stopping even sooner before. And we get a new r
aster back and once
again, once again, the color palette is different than it was here so what I nee
to do if I want it to look the same, even though this is very pretty as it is,
what I need to do if I want it to look the same is I need to import
the color mat or copy the color map. So I'm going to search for
colormap as all one word, and add colormap, and
change this raster, and use the template raster here,

and then click OK, and it locks the layer as

it add the colormap to it. And it doesn't change immediately
in the view again because, I need to reload in order
to load the color map. So I can remove this,and
then under add data, I can go find that layer and add it. And it looks a little
refined unless blocking, and that's because the cell
size is still much higher. So, this is a 30 meter raster and
this is a 250 meter raster. But we know how to resemble
using resemble tools so we could change the cell sizes
to match now for our analysis. Regardless, our classes now at least
closely match the classes in this raster. So, we could go on and
compare our data now. Okay, that's it for now. In this lecture, I showed you how
change the values of a raster to match another raster using the reclassify tool.
See you next time.