 Hello, I'm 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's used by the Invest Ecosystem Service Modeling Toolkit. Now 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 coordinate systems. 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 ArcGIS, and we will be working with some sample data. The webpage for this video provides a link to 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. A coordinate system defines how the locations of a two-dimensional digital map are related to actual locations on the Earth. There are two types of coordinate systems, geographic and projected. Geographic coordinate systems define distances with angular units that are in degrees. And projected coordinate systems define distances with linear units, usually in meters. Most Invest models require that all of your inputs be in exactly the same projected coordinate system, where the linear units are in meters. One exception is coastal vulnerability, which requires that your area of interest have a projected coordinate system. But the other inputs may have a geographic coordinate system. But as always, it's very important to read the user guide to learn about the data requirements for each model. Now in this video, we will cover, first of all, how to identify your data's coordinate system. We will cover how to re-project your layers to a common projected coordinate system. We'll talk about how to verify that all of your layers do have exactly the same projected coordinate system. And we will also learn how to troubleshoot some common invest errors that are related to coordinate systems. In order to prepare your data for use in an Invest model, it's important to know, first of all, which projected coordinate system you need to use for your study area. Now this is mostly your decision, since Invest supports a wide variety of coordinate systems via the GDAL Python library. However, from time to time, we will try to use a coordinate system that is not well supported by GDAL. And in that case, we'll need to use a different one if we want to run these models. Now we won't cover the pros and the cons of different types of coordinate systems in this tutorial. You can find lots of that information on your own with a web search. But a good default is to find out which UTM zone is correct for your study area and use that UTM coordinate system for all of your input layers. There are times when you are required to or you prefer to use some other specific projection that is not UTM. And that's totally fine as long as it's supported by GDAL. For this tutorial, we will use UTM since it is widely applicable. The second thing you'll need to know for your project is which coordinate system your raw data later start out with. Now it is very likely that most or probably all of the spatial data that you collect from out in the world will be in a coordinate system that is not the same as the one that you are using for your analysis. As an example, let's start looking at our sample data in a GIS. Okay. If you are using the ArcGIS session that you saved from the previous tutorial, you'll already have the land cover data that we'll be using. So just hang out for a minute. If you're joining us for the first time, open an operating system window to the folder where you unzip the sample data. The data folder is called coordinate system data ArcGIS. And let's look at the file called LULCESAnopal.tif. We can see that it's a tif file by the .tif file ending, and we can also see it listed as type of tif file. 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. The original data set is over two gigabytes in size and it's in net CDF format. So to make it easier to use for this tutorial, I have clipped out a smaller subset around our study area in Nepal and saved it as tif format. Other raster formats are also supported by invest, but I highly recommend using tif because it is a very standard format that's easy to work with. The easiest way to bring this layer into ArcGIS is to drag and drop the tif file. In my version of ArcGIS, by default, the layer will be shown in shades of gray based on the numeric land use code that we can see in the legend. The color scheme in your GIS session may be different than mine and that's okay. In the first tutorial, we covered symbolizing this land cover raster, so we won't cover that again here. To see which coordinate system this layer currently has, right click on the land cover layer and select properties, then click on the source tab. If we scroll down to the section called spatial reference, we see that the XY coordinate system is GCS WGS 1984. There are no linear units and the angular units are in degrees. Now WGS 1984 is a very common geographic coordinate system. We can tell that it's a geographic coordinate system because there are no linear units defined, only angular units of degrees. If we scroll back up and look at the cell size, we see that it has a very small value of .0027 and this is a measure of degrees. When we see a cell size like that, it is a good indication that you are working with a geographic coordinate system, not a projected coordinate system. With a projected coordinate system, we do have linear units, typically in meters. And if the cell size was .0027 meters, that would be extremely high resolution, which we probably don't have. So just from looking at the cell size, we can tell that we're working with degrees. Alright, let's click the cancel button to close this window. In ArcGIS, the tool that is used to change the coordinate system of a raster is called project raster. Let's find it under data management tools, projections and transformations, and raster. On the tool, let's note that further down, there is a tool called batch project, and there is a tool called project. Both of those tools are used for vector data, not for raster data. So since we're working with rasters, we need to use project raster. The other tool that we should note is called define projection. And it's very important to remember that define projection is not the same as reprojecting. And the define projection tool should not be used for this purpose. Define projection does not translate one coordinate system into another. Instead, all it does is overwrite the layers metadata with new coordinate system information. And this can cause a lot of problems when trying to use it in both the GIS and invest. So we will not use define projection, but we will double click on the project raster tool. The first input to the tool is the raster itself. So let's drag in the LULC raster. And the tool will automatically show the input coordinate system as WGS 1984. For the output raster data set, let's navigate to our sample data folder. And let's call this layer LULC underscore ESA underscore Nepal underscore UTM.tif. We need to choose the output coordinate system. Click on the icon to the right of the box. And it will bring up the list of coordinate systems. You'll see that there is a folder for geographic coordinate systems and a folder for projected coordinate systems. We want to re-project this raster into a projected coordinate system. So click on the plus sign next to that folder. The first thing that we notice is that there are a lot of possible coordinate systems to choose from. Now we want to use UTM. And our sample data is a watershed in Nepal, which is in the northern hemisphere. So we're going to use UTM zone 45 north. For your study area, you can find out which UTM zone it is in by finding one of many maps on the internet. So let's scroll down to we get to UTM and expand that. Then let's go down to WGS 1984 and expand that. Then northern hemisphere. And then if we scroll down and down and down, we will get to WGS 1984 UTM zone 45 north. Just click on that and hit OK. The next thing in the tool is the geographic transformation. In this case, we do not need to apply a transformation. And since this is usually the case, I'm not going to talk about it anymore, but you can learn about it in the ArcGIS help system. The next option is the re-sampling technique. By default, it's set to nearest, which performs a nearest neighbor analysis to assign values to the re-projected raster. For categorical data like the land cover map, nearest is the technique that should be used. Now if you are re-sampling continuous data, like precipitation or an elevation model, you may want to consider other re-sampling techniques. In particular, when re-sampling a digital elevation model or a DEM, we should always use the bilinear or the cubic options. Otherwise, we will end up with some strange hydrology patterns when we look at flow accumulation and flow direction. And so it's really important to consider which re-sampling technique you choose. For the land cover raster, we'll choose nearest, and that way we know that we won't be making up any intermediate values like you would get with bilinear or cubic interpolation. Right, we'll only be using the original land cover codes that are included in the original map. Next, we'll choose the output cell size. The tool automatically populates these values, and you can use the defaults, but personally I prefer to choose round numbers for cell size. By default, the tool chooses 297.6 meters. But that's hard for me to visualize, especially when I'm trying to compare cell size of this layer with other layers that are different. Using the value of 300 meters is more intuitive for me to work with. And more importantly, it is the data resolution that is provided by the European Space Agency on their website. They specifically say that the resolution of this data is about 300 meters. Now you can choose other cell sizes if you want. In particular, it's sometimes useful to choose a smaller cell size that is the same as some other data layer. What I don't generally recommend is choosing a larger cell size than what the original data comes in, since that would cause you to lose information. In this case, let's type in 300, 4X, and 300 for Y. And we will have a 300 by 300 meter pixel. Now in this case, we do not need to use the registration point option. So let's just click OK. And that should run pretty quickly. If we click on and off this layer that we just created. It will appear that this new raster that's projected in UTM is the same place and overlaps with the original data set that is in WGS 1984. Yet they have different coordinate systems. So this is a good time to point out that ArcGIS does what is called on the fly reprojection. And this means that it will try to make all of your layers visually overlap by reprojecting them to a common coordinate system. And this happens behind the scenes. And this is done just for visualization and the rasters themselves retain their individual coordinate systems. Usually this is very helpful, but it can also hide the fact that your layers do have different coordinate systems in reality. So it's easy to think that just because several layers appear to line in ArcGIS, they actually align based on their coordinate systems. But if they do not have the same coordinate system, they may not actually align in space and invest will give you an error. So before to be sure to check the coordinate system of all of your layers and don't assume that just because they look like they overlap in the GIS, they all have the same coordinate system. All right, let's verify the coordinate system of the layer that we just projected. So right click on the new layer and select properties, then source. Now we see that the cell size is 300 by 300 meters. And if we scroll down, the XY coordinate system is now set to UTM zone 45 north. And it now has linear units of meters. So this is all correct. And we can click OK to close this window. Now as we've seen, there are a lot of coordinate systems available. And some of them look very similar. So getting them exactly the same for all of your spatial inputs can be challenging. To make this easier, we can use a layer that we have already projected into the correct coordinate system. And we can use this to define the coordinate system for our other layers. So let's try this out. First, we'll add a new spatial layer to our map. Let's go over to our sample data folder. And you'll find a layer called erosivity, Nepal dot tip. Let's drag and drop this into the GIS. This is a climate layer of rainfall erosivity, which is used in the sediment model. And we won't talk about it more at this point. Right click on the erosivity layer and select properties. And once again, we can see that it has a very small cell size. And if we go down to the XY coordinate system, it is also set to WGS 1984, a geographic coordinate system. So we're going to need to re-project this to UTM to match our land cover layer. Let's click cancel to close this window. Now, again, we're going to open the project raster tool. So double click on that. For the input raster, let's drag the erosivity layer into the input raster box. And again, the coordinate system will automatically populate with WGS 1984. For output raster data set, let's navigate again to our sample data set, sample data folder. And let's call the output erosivity underscore Nepal underscore UTM.TIF erosivityNapalUTM.TIF. Of course, you can name it something different if you want. For output coordinate system, again, let's click on the box to the right to bring up the coordinate systems. And this time we're going to open the folder called layers. This folder provides a list of the coordinate systems used by the different layers that are added to your GIS session. So once you have one layer in your project's coordinate system, it will be listed here, making it easy to find and making it easy to use exactly the same projected coordinate system for all of your layers. In this case, we see two coordinate systems listed, WGS 84, which is the geographic coordinate system that the raw data comes in, and UTM zone 45 North, which is the projected coordinate system that we are using for our study area. Now, if we click on the plus sign next to UTM 45 North, we can see a list of the layers that currently have this coordinate system. And this lets us verify that it's the proper one that we want to use. So we can click on WGS 1984 UTM zone 45 North and click on OK. Once again, we do not need to enter a geographic transformation. And for re-sampling technique, we can also use the default of nearest in this case, which is fine for climate data. For output cell size, this time we see that the default value is 892 meters. As discussed earlier, I prefer to use round numbers for cell size. And in this case, the Eurosivity data is based on climate data that has a resolution of one kilometer. So let's type in 1000 meters for the X and 1000 meters for the Y. So our output layer will also have a resolution of one kilometer. And let's click OK to run the tool. Once again, we can verify that the coordinate system is correct by right clicking on the new Eurosivity layer, going to properties and clicking on the source tab. The first thing that we can verify is that the cell size is 1000 by 1000 meters. And then if we scroll down, we see that the XY coordinate system is UTM zone 45 North. And if we type that all looks good, so we can click cancel to close this window. When you're creating data to go into invest, you will go through this process for each spatial layer, both rasters and vectors, making sure that they all have the same projected coordinate system. If they do not all have the same projected coordinate system, invest will give an error. Invest does try to catch data errors when you enter inputs into the user interface. And if you enter a layer that is in a geographic coordinate system, when it needs to be projected, you will see something similar to what you see on the screen now, which is a red X next to your input, as well as a red X in your run button. Now if you click on the X, there will be a message that says data set must be projected in linear units. This means that you need to re project this layer to have the same projected coordinate system as your other spatial inputs. Similarly, if you enter layers that need to have the same coordinate system but don't, you'll see red X is next to multiple inputs. And if you click on the X, you'll see the error, bounding boxes do not intersect. This means that invest compared the spatial extent of all of the input layers and found that they do not overlap. And this is most often caused by being in different coordinate systems. The error includes a listing of each input and their spatial extents. So if you look closely at the numbers in this list, you'll be able to find the layer or layers that are incorrect. When this error happens, go back to the GIS, look closely at the coordinate system of each layer, and find the ones that are not in the projection that you want to use for your project, and re project them to match the others. Okay, that's enough for this session. You might want to save your Arc GIS session so you can keep using it for later episodes. And 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 create a new post under the category of training. I and other techies at that cap will see your post and will respond as soon as we can. Thanks for following along.