 Hello, I'm Stacey. I'm a GIS analyst with a natural capital project, and I'm glad that you've joined me to learn some techniques for working with the geospatial data used by the Invest Ecosystem Service Modeling Toolset. Now a reminder that this series is not an introduction to GIS in general, nor does it provide an introduction to GIS software. But it does cover some specific topics that are useful for working with investment models. This episode provides an overview of rasters, raster properties, and symbology. To get the most out of this tutorial, I highly recommend following along in your own GIS session. In this video, we will demonstrate techniques in QGIS, and we will be working with some sample data. The webpage for this video provides a link to the sample data that we will be using. So if you haven't already, now is a good time to pause this video, download the sample data, unzip it, and bring up a QGIS session before continuing. All right, let's get started. You should have a QGIS session running, as well as an operating system window open to the folder that contains the sample data for this tutorial. The folder is called raster symbology data QGIS. Now in this episode, we will bring some spatial modeling data into a GIS session that is in its raw form, it is not yet processed to work in Invest. We will symbolize it, look at some of its other properties, and use the information tool to look at pixel values. Since a lot of invest data is raster based, we will focus on raster data, but many of these same concepts apply to vector data as well. So let's go to the operating system window where you have unzipped the sample data. Again, this should be called raster symbology data QGIS. So let's look at the file called LULC esanapol.tif. This is land use and land cover data from the European Space Agency, and it's a very commonly used global data set. Land use and land cover data is required by many different invest models. So it's important to get used to working with it. So the sample data set from ESA is over two gigabytes in size, and it's a net CDF format. So to make it easier to use for this tutorial, I have clipped out a smaller subset around our study area, which is in Nepal, and I saved it as a tip format. Now other raster formats are also supported by invest, but I do highly recommend using TIFF, because it is a very standard format. It's commonly used. It's easy to work with. There aren't any major file naming limitations, and TIFFs are generally well supported in GIS software. Now the easiest way to bring this layer into QGIS is just to drag and drop the TIFF file. By default, the layer will be shown in shades of gray based on the numeric land use code, which we can see here in the legend. But this isn't particularly useful, since we don't know what these codes mean. What does a code of 10 mean? Is that forest? Is it agriculture? We don't know. So what we need to do is label our legend with some useful descriptions. So we'll right click on that layer and select properties. Then we'll click on the symbology tab in the left side of the window. Now at the top of the screen is a dropdown called render type. If you are using a recent version of QGIS, then one of your options will be palleted and unique values. So select this option. And then for the color ramp, we can leave this at random colors. And then down below this white window, we click classify. Now, if you are not using a recent version of QGIS, I do highly recommend updating because it's free to update, and we will not be covering older versions in these tutorials. Now we have each of the land cover codes assigned to a random color. So if we were working on a real project right now, we would definitely want to choose these colors carefully to create a map that's intuitive for us to use and intuitive for others to interpret. Maybe we would use blue for water, green for forests, things like that. But we're not going to spend time on that right now. We can all do that for homework. So now we have colors and we have codes, but we still don't know what each numeric value means. So we will need to add descriptive text in the label associated with each value. Now, usually your data source will provide some sort of mapping between codes and descriptions. It may be written in a web page or in user documentation, or they may provide you with a table. Now in the case of our land cover data, the ESA has provided a CSV format table that contains a mapping between the land cover codes and descriptions. This table is included in our sample data. So you will see ESA legend dot CSV. Let's open this file in a table editor. I'm going to use Excel, but you can use whatever table editor works for you. Now this first column called NB underscore LAB contains the integer land cover codes that are also contained in the raster that we've been looking at. We can see a couple of these. A value of 10, we can see in the symbology table, a raster of 11, we can see in the symbology table. Right, so we have a mapping between these values in the table and the values in our raster. And then the next column is LCC own label. And that has a text description for each land cover class. Now we can see that a value of 10 corresponds to rain fed cropland. So that's very useful. And what we can do is we can copy this text. And we can go over to our symbology table. Double click on this label for 10 and paste in cropland rain fed. We can copy the same for number 11. We can go over here to the table. The text for 11 is herbaceous cover. We can copy this, go back to our symbology table, double click on the number 11 and paste in herbaceous cover. Now we're not going to spend time together typing in all of the descriptions. I'll just type in these two here, but I recommend pausing this video. And then we will finish entering the values on our own. And then when we're done, come back to the video and we'll see how to save them for use later. Now that you're done entering the land cover labels, we can hit OK. And see the colors change in the map. Now note that your colors may be different than mine. They probably will be since we chose the random color map. If we click on the arrow next to the land cover layer, we'll see all of the land cover types. And if you typed in all of the labels, then we'll see them as labels. So now this is really useful because we know that, for example, this whole area in red up here corresponds to evergreen shrubland. And the dark blue areas here correspond to a broadleaved evergreen tree cover. Now when we put colors in, that's of course going to be much more intuitive. But at least now we have a mapping between text and color. Now, since we worked so hard to enter these labels, we can save this layer symbology by right clicking on the land use layer, clicking on export, and then save as layer definition file. Let's navigate to the sample data folder. And we will type in the name LULCESANAPAL.QLR. The QLR file type indicates that it is a QGIS layer file, which contains symbology information, including those labels. So when you bring this file into QGIS, it will show the land cover map with the symbology that you created. So we'll hit save. All right, let's go back to the properties window for this layer, right click and select properties. And let's take a look at some of the other properties of the land cover map. Now if we click on the information tab, we'll see that there's a lot of information here. So I'll just point out a few things that are particularly relevant for preparing your data for invest. The first is CRS, and that stands for coordinate reference system. The coordinate system here is WGS84, which is a geographic coordinate system that is very commonly used, especially for global data sets. Now, most inputs to invest must be in a projected coordinate system where the cell size is in meters, not a geographic coordinate system where the cell size is in degrees. There are exceptions to this, like the coastal vulnerability model. So be sure to read the user guide to find the requirements for whatever model it is you're working with. Now, if we look at the units, we'll see that they're in degrees. So this confirms that the layers distances are given in degrees, not meters. We can also look at the pixel size information down here at the bottom. These are very small, .0027. And these very small values also indicate that the distances are in degrees, not in meters. Okay, so in order to prepare this particular land cover raster for use in invest, we would need to reproject it to a projected coordinate system, but we won't do that now. And in a later episode, we will talk a lot more about coordinate systems and reprojection. But for now, it's just good to know where to find this information, since many people run into problems when their data is not in a projected coordinate system, and it needs to be. Another thing toward the top of this window, we have a data type of integer. And this is correct for land cover codes. They should be integers. And then one final property to consider is the value for no data. To find this, we look in the transparency window. And we see near the top of the screen that there is a no data value of zero with a checkbox next to it. Okay, that means that we have a no data value, and that value is zero. Now, when using data in invest, it is very important that the no data value be set. The specific value for no data does not usually matter. In this case, it's zero. That's fine. Most data sets do have a no data value set. But if one is not said, then it can cause errors when running through invest, and those errors are not always easy to troubleshoot. So be sure to check for that. All right. That's all for that. Let's click on the OK button to exit the properties window. Now the last thing we'll do is to zoom in to look at the map in more detail. One option is to use the scroll wheel on your mouse to zoom in and out. Another option is to click the magnifying glass tool. If I click on the one with a plus on it, we can zoom in. And it doesn't really matter where you zoom in if you're following along. And once we're zoomed in, we can see each pixel better. And maybe we want to know what land cover class a particular pixel is. Now hopefully you will symbolize your raster in a more intuitive way. So you just have to look at the color and you know what the class is. But in this case, we need to use our identity tool in order to learn this information. So if we go to the top of the screen and click the blue I button up here, it'll be for identify features. And let's click on a pixel on the map. Again, it doesn't matter which pixel you click. When you click on that pixel, you will get another window that's called identify results. And it will show the value of the pixel that you clicked on. In this case, the value is 130. Right. So this is land cover code 130. Now, this tool is useful for getting to know your input data and for evaluating the modeling results. For example, if you view the land cover map, along with an invest output map, when you click on a pixel you will see both the land cover type and the model output value. And that will help you understand how land cover affects your results. So this is a useful tool. Okay, that's enough for this session. You might want to save your QGIS session so you can keep using it for later episodes. If you have any questions or comments about this episode, we'd love to hear from you on our community forum. There's a link to the forum in this video's webpage, where you can search for previous posts, and you can create a new post under the category of training. And I and other techies at NatCap will see your post and respond as soon as we can. All right, thanks for following along.