One setting that's quite useful when you're working with Raster data is the mask, and while I'm talking about that in introducing this idea, I think it's a good place to also tell you about NoData cells. So, let's have a look. If we have a digital elevation model for Toronto, also referred to as a DEM, there's different tools that we can use to work with this dataset. I'm just going to give you an example of one quickly which is the Reclassify tool, where I can take the range of cell values that we have here between 71 and 306, and I'm going to group them together into separate classes. So here's my Reclassify tool, I'm not going to go into details about this here, I'm going to discuss that in more detail in another video segment. But just quickly, I've got my DEM input here, I'm using the values from the cells to do the reclassification. These are the old values, so I'm going to take for example 71 to 100, that's going to get a value of two. So, each of these is a class range that I'm then assigning to a new cell value here. Let me create a new dataset called dem_reclassified. So, when I do that, this is what I get. This is a classified version of that DEM. There's various reasons why you might want to do this. You may be trying to isolate certain things or often, with reclassification, you're simplifying or generalizing the data. So, the main point here is that I'm just trying to show you how this works without a mask, and then I'll show you with a mask. Now a mask can be any dataset, it can be a Raster dataset, it can be a vector dataset. Here, what I'm using is the boundary for the City of Toronto, and what I'm going to do here is use this to mask out data that I'm not interested in keeping in any of the outputs that I use for any of my Raster operations. One thing that may not be intuitive when you start depending on how you think of masks, is that in this software, when you apply a mask, what's being kept is what's inside the mask. So, any data that falls inside this gray area that represents the masked area, that will be kept in the output of any Raster operation that I do. Anything that's outside the mask will be discarded. Okay, that's all I'm a mask is for. You don't have to use it all the time. Sometimes when I mentioned this, people think, "Oh, then I must use a mask all the time." No, it's purely just something for convenience depending on what it is that you're doing, whether that's helpful for you or not. In fact, maybe it's a good time to mention this as well, is that there's always a temptation to whether it's Vector or Raster to treat your study area as though it's this thing that's floating in space with nothing around it. Often you'll see maps of study areas where there's a thing that's mapped and everything around is blank. I understand the temptation to want to do that, because it gets the person that's looking at your map to focus on just the things that are inside your study area. But often, there may be things that are adjacent to your study area that should be taken into consideration. So, for example, if you are mapping the locations of fire stations in terms of things like response times to an emergency, would you really do that in a way where the city would be completely treated in isolation? So, in other words, if we had a fire station here near the edge of a city, and there was a fire taking place over here, would you say, "Oh well, we can't respond to that fire because it's outside of our jurisdiction or outside of the city limits or whatever?" That's highly doubtful. Even if it was, you as a researcher or data analysts would want to be able to take that into consideration. So, maybe you want to know that there's a fire station right over here that's just outside of your study area. So, you have to think about this and make a conscious decision. Is it helpful or useful for you to include data that's outside of the study area as context that's related to what it is that you're studying? Or sometimes, if that's not necessary and you really want a simplified version of the data, then you can leave things out and have it as a floating island. I try not to do that, I used to do a lot more. Now, I find that even if the background is just something like the major roads or bodies of water, something like that, it provides a little more geographic contexts, and actually I think better map design when you're putting this together. That seems like a bit of a side bar or a tangent, but I do think it relates to a mask because as soon as you apply a mask, really what you're doing is deciding whether you are thinking about it consciously or not, that I'm not going to include anything outside of my study area. One thing I want to mention as well is that I'm using one big polygon for my mask here. You can use as many different things as you want. So, for example, maybe you have patches of something around a city, maybe they're, I don't know, low-income areas or restaurants, catchment areas for customers, those could be a mask. So, altogether, they would be considered one mask. So, you can get creative with this, it all depends on what you're trying to do. Here, I'm just doing a simplified version of it to show you how it works. So, how do you use a mask anyway, now that you know what it is? Well, in ArcMap, what you do is you go into the environment settings that are set for anything that you're doing, and you'll notice here that there's actually a thing for mask. Here, I've set my Vector feature class for Toronto as the mask, and then you literally just select that and click okay and close, and that's it. So, from that point onward, any Raster operation that you do, that mask will automatically be applied. So, use this with caution, is that it's easy to forget about it. I know I do sometimes, is I'll set that and then I'll be happily going along doing my analysis, and then realize later "Oh, wait a minute, I didn't want a mask for this." So, you have to take it off or put it on as you need it. If you want to do that, there's ways to take it up later if that's more convenient for you, but this is how you're basically doing a blanket application of that masks to everything else that you do going forward. So, now that I've set that mask, I'm going to show you the same Reclassify operation I did a minute ago, and you'll notice that there's nothing in this dialogue box that refers to masks directly. It's just going to apply it automatically. So, I'm going to do my reclassifying, let's see what happens. So, this is the DEM before I do the reclassify, and here's the DEM afterwards. So, you'll notice as predicted that all of the cells, all of the data values outside of the mask are now gone. So, those areas that are white outside are what we would call NoData which I'll explain more in a second. But those are cells that are still there, they still exist but they don't have any value attached to them. So, how can you have cells that don't have a value attached to them? Again it depends on what you're doing and how you want to set things up and what's useful for you, so there is a distinction to be made between cells that have a value of zero and cells that are assigned what we would call NoData. In other software, sometimes they're referred to as null or void, they all mean the same thing. They're basically trying to tell you that these are cells that exist but don't have a data values associated with them. So, in this dataset, you'll see that we have different zones, we have a zone of zeros, ones, twos, and threes. So, those zeros actually have a value, okay? That's not the same thing as saying no data, and it's important to understand this distinction. If I have a zero there, what that means is let's say something like rainfall, is that if there's a zero in that cell, then we know for a fact that there was no rainfall at that location, that's been stored in there saying there was zero rainfall. However, we can have these NoData cells. So, what's happened here is I've replaced the zeros with no data, and what that means is we don't know what happened at that cell, we don't have any information about what the rainfall value was. So, we know for a fact that, let's say these are in millimeters, that there was one millimeter of rain, where there's ones two millimeters of rain, where there's twos and so on, but where there's no data, we don't know what the rainfall amount was. So, why would you want to have no data values then? Well, maybe there's something I should make sure is clear, is with a Raster dataset, it has to be either a square or a rectangle. You can't have a Raster dataset that looks like this, okay? Computers don't like working with that and neither does the software, you can't have just chunks of something missing like that. What it wants is to have something like this. So, even if the thing that you're studying, even if your study area is like this, you have to account for, that's why I think of it anyway, these other cells, they have to be built in there whether they have a value or not. So, this is a convenient way of saying, yes I know that there are cells there to fill out this dataset, but I'm not going to be dealing with them, I'm just going to have them as NoData. Another common thing is that for example, if you wanted to measure distances from certain cells, what we would call Euclidean distance, it's a common one, is that those distances will be measured from cells that have a value. So, for example, you could measure this is one cell distance away from this cell of two, this is two cells away, three cells away, whatever. So, you have to have NoData cells in order for it to fill those in with distances. If there were already values there and it's measuring distances away from cells with values, then it won't be measuring any distances. So, it's almost like you're leaving space or room for values to be put in for certain calculations. So, those are really the two main things. Sometimes you just want to be able to say I have cells here that I don't need a value for, other times you want those to be empty or with no data so that you can then add cells in or use them for something else.