 Hello. My name is Stacy. I'm a GIS analyst with the Natural Capital Project, and I'm glad that you've joined me to learn some techniques for working with the geospatial data that is used by the Invest Ecosystem Service Modeling Toolset. A reminder that this series is not an introduction to GIS in general, nor is it an introduction to GIS software, but it does cover specific topics that are useful for working with Invest 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 using ArcGIS, and we'll be working with some sample data. The web page for this video provides a link where you can download the sample data that we'll 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 an ArcGIS session before continuing. Okay, let's get started. At this point, you should have an ArcGIS session running, as well as an operating system window open to the folder containing the sample data for this tutorial. You can see both of these windows on my screen. The folder should be called raster symbology data ArcGIS. In this tutorial, what we'll do is bring some spatial modeling data into a GIS session that is in its raw form. It's not yet processed to work and invest. We will view the raster attribute table, symbolize it, look for a few 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 the same concepts apply to vector data as well. In the sample data folder, look at the file called lulcesanapol.tif. This is land use and land cover data from the European Space Agency, and it's a very commonly used global dataset. Land use and land cover data is required by many different invest models, so it's important to get used to working with it. The original dataset is over two gigabytes in size, and it is in net CDF format. So to make it easier to use for this tutorial, I've clipped out a smaller subset around our study area in Nepal, and I've saved it in TIFF format, and you can see the TIFF format in the file name .tif, and you can also see it under the type column here that it's a TIFF file. Now, other raster formats are also supported by invest, but I highly recommend using TIFF, because it is a very standard format that's commonly used, easy to work with, it doesn't have any major file naming limitations, and TIFFs are just well supported in GIS software. The easiest way to bring this layer into ArcGIS is to drag and drop the TIFF file, so let's do that. By default, the layer will be shown in shades of gray, based on the numeric land use codes. We can see these numeric codes in the legend, but this isn't particularly useful, since we don't know what the codes mean. Which code is forest? Which code is agriculture? What does the number 10 mean? We don't know, so we need more information to really be able to interpret this map. Now, one way to look at the unique land use codes is to view the raster's attribute table, but if we right-click on this layer, we see that the open attribute table option is actually grayed out, so it appears that the attribute table has not yet been created, and this is very common for data sets to not have a raster attribute table, but it's very useful, so there are several ways to generate a raster attribute table. One of these is to use a tool in ArcGIS called build raster attribute table, so let's look in ArcToolbox here. We'll go to the data management tools toolbox and open that up, then we'll go to the raster toolbox and open that up, then we'll go to raster properties, and under raster properties we see the tool called build raster attribute table, so double-click on that tool, and the only input to this tool is the raster that you want to create an attribute table for, so we can drag and drop the LULC map into the window, and one thing of note is that this tool will not build an attribute table for floating point data, but it will build an attribute table for many other types, including integers, which is what we have here, so now we can click okay, and the tool should run pretty quickly, so now let's look back at the folder where our sample data is located. Now we can see that there's not just one file related to the land cover map, we have this LULCnapol.tif, which is our original layer, but now we have several other files that have been created, and this is as a result of building the attribute table. The important file for our purposes is this .tif.vat.dbf file, that is the file that contains the attribute table data, and now that we have all of these files and they all have similar file names, it's really important to pay attention to the file types, which means noting the extension at the end of each file name, because when we enter a raster into an invest model, we must use the file that ends in .tif. None of the other files will work, okay, so none of these other files, CPG or dbf, none of these other files will work, the only one that will work and invest is .tif. So we need to be careful, and only use that original .tif file and invest. You can usually see these file types in the name itself, unless your operating system is set to hide file extensions. So right now, if you are looking at your folder and you do not see the CPG and dbf file extensions, then your operating system is set to hide those extensions. And if this is the case, I highly recommend changing the setting so that the file extensions are always shown. Now the other place that you can see the file type is under the type column, if you are using Windows. And the raster file that we want to use and invest is shown as type .tif file. So now let's go back to our GIS and actually look at the raster attribute table that we've created. Right click on the layer and select open attribute table. In this table, we will see a value field and a count field. The value field contains a unique integer code for each land use type. And the count field shows how many pixels have each integer value. However, by default, there is no text that describes what the different values mean. So we still cannot easily interpret the map. We still don't know which one is agriculture or which one is forest. So when I'm working in ArcGIS, I always add a column to this table with a brief description of each land cover type that can be used in the legend. Now your data source will provide some sort of mapping between codes and descriptions. Maybe that will be written in a web page or some other user documentation or maybe they will provide you with a table. In the case of our land cover data, the ESA has provided an actual table in CSV format that contains mappings between the land cover codes and descriptions. This table is included in our sample data. So let's open it in ArcGIS. Now for some reason ArcGIS does not let you drag and drop CSV files in. So we will need to go to the add data button and navigate to our folder raster symbology data ArcGIS and then select LULCESALegend.csv and then we can click add. Now let's open this legend table. Right click on the table and select open. We see a couple of columns in here. This first column called nblab contains the integer land cover codes that are also contained in the raster that we've been looking at. So we see a value for 10 and we see a value for 220 down at the bottom just like we see over here in the layer. The other column is LCC own label and that contains a description of each land cover type like we can see a text description. So now we know that a code of 10 corresponds with rainfed crop land. A code of 50 corresponds to evergreen broadleaf tree cover, etc. So this is very helpful because now we can use this nblab column to join to the raster's attribute table and copy over these text descriptions. That way we can understand the raster better and see where there's agriculture, forest, and other land cover types. So in this table window we can click on the tab for the land cover map right LULCESANapol.tiv so that we can work with its attribute table. First we need to add a new column which will contain the text descriptions for each land cover type. To do this we'll click on the icon in the upper left corner of the window and select add field. Now we can only use up to 10 characters so let's name the field Descript D-E-S-C-R-I-P which is short for description. You can name it something else if you'd prefer and choose a type of text. Now like you saw these land cover names are actually pretty long so let's give the length a value of 100 just to make sure we get all the characters in there right and click okay and it will create this new field. So now we have a new field to populate with land cover descriptions. To join our legend table to this raster attribute table we're going to click again in the upper left hand corner and go down to joins and relates and then click on the join tool. Now the first thing that it asks is what do you want to join to this layer and we are going to be joining attributes from a table so this default is just fine. The next question is what field in the layer the join will be based on and in this case we want to join it using the value. The value is our unique integer code for each land cover type. Next we're going to choose the table to join to the layer and because it's the only other thing we have in our map right now by default we should have l-u-l-c-e-s-a legend dot csv so make sure that's selected and then the third question is to choose the field in the table to base the join on. What we need to use is n-b underscore l-a-b because that is the unique integer code in that csv table and then for the join options by default it says to keep all records which is what we want so now we can just say okay now back in this attribute table window we can see that there are a lot more columns now. Some of these columns are from the raster's attribute table and the rest of these are from the csv table that has the descriptions in it. We want to copy these text descriptions from the table to the raster so the way to do that is to find the field called Descript that we created right click on that field and select field calculator. In field calculator we will see a list of all of the fields that are in this table. Let's double click on the field that's called l-u-l-c-e-s-a legend dot csv dot l-c-c own label. Now if you remember correctly this is the column that has all the text in it that we want to use. So if we double click on it it will put it down in this lower part of the window and what this is saying is that we want to set the Descript column in the raster to the text that's contained in the table. Okay so now all we need to do is click okay and you should see the field Descript being populated with these text names. Now if you've never used field calculator before I do highly recommend getting to know it. It is very useful tool for working with your tables. Now back in this raster attribute table we can see that the description field has been filled in and so we need to remove the joined table. In order to do that we go up to the upper left hand corner we go down and select joins and relates then remove join and then we will select l-u-l-c-e-s-a-legion dot csv. And now we're left with only the attribute table for the raster. So now that we're done populating this with the descriptions we can close this table window. Now the next thing we want to do is symbolize the map using these descriptions. Right click on the land cover layer and choose properties. In the layer properties window we will click on the symbology tab. By default the values are shown along a continuous or what's called stretched color gradient in shades of white to black and we can see that in our map but for land use data it's usually more useful to symbolize it by unique values. So up in this upper left hand box let's click on unique values. Now just to the right we have a drop down list under value field and this is where we can choose which field we want to use to symbolize. Let's select the descript field and what that should do is to populate the symbology area with all of the different descriptions that we have in our table and it will assign a random color to each one. Now 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 understand and intuitive for others to interpret so we might use blue for water green for forests etc but we won't spend time on that now that is a creative endeavor for you to do for homework. So what we'll do is just leave these random colors and hit apply to change the color scheme and now if we look we see that we have different colors in the map and they are maybe still not very intuitive but that's your homework but then we can also see in the legend that now we know which colors are associated with each land cover type and we have a text description for that land cover type so that just makes working with this data so much more easy. Now while we're in the layer properties menu I'd like to look at a couple of properties of rasters that are important to be aware of when working with invest. So let's click on the source tab. There's a lot of information in here so I'll just point out a few things that are particularly relevant for invest. The first thing is the cell size we can see in this case that the cell size is a very small value .00277 it does not list units here but the fact that this number is so small indicates that these are probably units of degrees and not units of meters. Most of the inputs to invest must be in a projected coordinate system where the cell size is given in meters so it does not allow you to enter inputs that are in a geographic coordinate system where the cell size is in degrees. Now there are exceptions to this like some of the inputs to coastal vulnerability so do be sure to read the user guide to find out the requirements for whatever model it is that you're using but to verify the units that we're working with we can scroll down in this window until we see the spatial reference section and what we can see is that there are no unit set for the linear units but we do have an angular unit set of degrees and we can also see that the XY coordinate system is set to WGS 1984 which is a geographic coordinate system that is very commonly used especially for global data sets. Now in order to prepare this particular land cover raster for use and invest we would need to reproject it to a projected coordinate system but we won't do that now. 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 when it needs to be. While scrolling back to the top of this window we can see that the pixel type is an unsigned integer and this is correct for land use codes. We can also see that the no data value is set to zero. When working with invest it is important that your spatial data have a no data value set. The specific value is not really important but it does need to have a value set. In this case the value is zero and that is valid. Now most data sets that you'll be using do have a no data value set but if one is not set it can cause errors when running invest and these errors can be a little bit tricky to troubleshoot so when you're first looking at your data layers be sure to check that a no data value has been set. Okay enough of that let's click on the okay button and we can exit the properties window. Now that we can interpret the map a little bit easier let's zoom in to look at some more detail. Now one option is to use the scroll wheel on your mouse just to zoom in and out as much as you want. Another option is to click the magnifying glass tool in your toolbar and click on the map or draw an area and you will zoom in to be able to see the pixels better. Now once we're zoom in maybe we want to know what land cover class a particular pixel isn't. Now hopefully we have symbolized our raster so that this is more intuitive but right now we it's the colors are not that intuitive so we can use our identify tool. So let's click on this blue i button that says identify and then click on some pixel in your map it doesn't matter which one. This will bring up the identify window at the very top it allows you to choose which layers you want to identify from. I highly recommend setting this to visible layers because then you will receive information for all of the layers that are turned on in your table of contents. So if that's not set already choose visible layers and then we will click on the map again. Now when we click on the map we get information for a particular pixel whatever pixel we clicked on we get a location we get and we also get the information that's in the attribute table so we have the description where we find out that that is a bear area there's no vegetation there and we find out that the pixel value or the land cover code is 200 so all of this will help you understand your your maps better and this tool is also useful for getting to know your your getting to understand your 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 under help you understand how land cover affects your results. Okay that is enough for this session you might want to save your ArcGIS 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 on the webpage for the video and there you can search for previous posts or create a new post. There is a specific category for training and you can assign your new post to that category of training and I and other techies at NatCap will see your post and we will respond as soon as we can. Thanks for following along I do hope you found it useful.