[MUSIC] Hello again and welcome back. In this lesson we're going to cover different raster data formats. So we've already talked in previous classes about vector native formats, such as shape files and then personal geo database feature classes and file geo database feature classes. But in this lecture, we'll discuss the raster side of things and take a look at the many raster formats available to us, including file geodatabase rasters, ESRI grids, geo TIFFs, IMAGINE images and ASCII rasters. Just like with their vector data counterparts, these different data formats can infer different capabilities on the raster datasets. Now, the types of capabilities you get with the raster dataset are necessarily different than those that you have with the vector datasets. But with raster data, the difference is come down to things like how many values can be stored in a particular cell. That's called the bit depth. How many bits are used to store each cells value? We also have limitations in how many bands can be stored in each individual raster. And then it also involves how the data is stored on disks so that ArcGIS sees it differently and Windows sees it differently. So we'll go through a few examples of this right now. One of the best ways to take a look at this is to take this raster right here that you're probably becoming familiar with now. Which is the digital elevation model, or DEM for Valmeyer, Illinois. And trying to export it to one of these other raster formats. So if I right click on it, and go to data. Export data. We'll see a relatively new dialog box pop up. And it gives me the option to set the extent of the raster I want to export and the spatial reference. And if I leave it as the default it will show both as using the original extent and spatial reference of the Ball Myer DEM dataset. I can also set some other options here, but mostly we'll just leave these alone and focus on the bottom here, where it gives me the location, which is a folder or geodatabase to export it to, as well as the name. Now, by default, it's exporting to a file geodatabase. This is the one that it's stored in. But If I want to, I can try exporting to a separate folder. So, I'll give it a name, Raster exports, and I will Click on it and then click Add. It's one of those times where you have to select the folder without being inside of it. Now, when I'm inside a folder, it gives me a different set of options for the type of raster to export. By default it chooses a tiff format, that's a tagged image file format. And these are commonly used in photography because by default they are lossless, that means the way they store the imagery or the raster doesn't result in any loss of data. So they're a high quality way to store raster data that can be both viewed in your operating system usually such as Windows or Mac but also edited in major photo editors, so they are a widely compatible image format. And I can select a compression type to shrink the file size. But note that some of them are not lossless formats. So the JPG format is a lossy file format, that is that it transforms the data in such a way that we can't always reconstruct the original data. So we lose some precision or some specificity of our data when we choose a JPG compression type. So avoid that for your data unless you really know what you're doing. The LZW compression type is much closer to like zip compression, and we can select that if we want to compress our TIF to store it in a smaller file format Without losing data. So I'll leave that selected right now and then I'll click Save at the bottom there, it went by pretty quickly, but it did a quick little export bar and then it will add a toy map document. As long as I say yes. And here's where I want to note that the display really didn't change much even though a different layer is top of the table of contents. And that's because, just like with vector data, once we load it into ArcGIS, it loads it in this raster layer and does the translation that's necessary for us to use the data set as it's loaded in. So once it's loaded in, it's all the same to us, which is great. Or at least mostly. If we stored a dataset that had multiple bands in a data format that could only accommodate single-band data, then we're certainly not going to have the same data if we load it back in our JS. But that's a transformation that occurs on disc. If we were then to load that data in from the drive, we can still operate it on as a standard raster. Now, if I'm curious about what formats different rasters can support, I can look that up in ArcGIS help, so let's do that now. So I'll look at ArcGIS supported raster formats, and it gives me a few different options but I also like the one for ArcGIS Pro because it's the closest to what we're using. I could add 10.3 to specify the version we're using for this course too. And right here I'll get the version I'm looking for. And it gives us a little bit of definitions up front, but then it gives us a table of all of the different supported raster types, as well as whether it can write them, or read and write them, and then what data types are supported. Whether it supports multiband, compressions or color maps, which we haven't talked about yet. And I can scroll through this very large list and find out lots of information about these file formats. But if we take a look down here at the tiff, we can find out answers to any of our questions about those features. Tagged image file format, TIF or geo TIF. So the specific thing is that since TIF's are not by default a spatial file, they tend to come with a TFW extension, most times or the geographic information is written into the meta-data but TIF world file is what specifies the geographic side of it. And then you need that file along with the standard .tif or .tiff extension in order to get your TIF format. And what I want to note is that a few of the TIF formats that are supported support multiple bands, but not all of them. So again, these things break out by exactly how it's implemented in GIS. Now let's take a look at a few other formats here. I can also export this raster to a grid format. It's an older format but you'll occasionally encounter it still. We'll leave it going to that folder that we just exported to but instead I'll select the format of grid. And I'll just give it a different name. And again I can select compression type. And this time I won't select any and I'll click Save. And it's failing to upload it right now so I know that there's another way I can do this if that's failing. So let's just do a quick work around here. And in the toolbox Under Conversion tools, To Raster, there's a Raster To Other Format tool here. So if I double-click that to bring it up, I can't drag and drop, notice that it doesn't have a layer drop down, but I can select Rasters on my drive and I can go to my File Geodatabase Raster here And select that. And then select the Output Workspace, that's the same folder that we were just in. And then select my output just like I did. So, in this case, I'll select, Grid. And it will convert that Valmeyer DEM file to your database raster, to a raster grid for me. And so it's running in the corner like that, just as usual. And in this case, when it's done, we don't get it added to our map document. It just finishes, and gives us a notification. So, first let's take a quick look at what it looks like if we try to add that to our map document. If I go to Raster Exports, I see my valmeyer.dem1.tif that we exported, and then I just see a raster data set called valmeyer.dem. Now let's go take a look at these both in the folder. What's interesting here is that both of them end up being multiple files, so the tif sort of like the shape file ends up having more information. We have the tif and the tif world file that we talked about before, but we also have a .OVR file which is a pyramids file, it's sort of that shortcut that lets it display data at multiple resolutions on your screen as you zoom in or our much more quickly. Then we have.aux.xml file, which is metadata, and for the grid, we have a different mix of things. So this is actually the grid right here, that we just exported. Valmeyer.dm, and it's a folder. And has an info folder that goes along with it, as well as its own aux xml metadata file. And if we look inside the folder, it's just a bunch of files that we haven't seen before. We won't talk much about these right now. But know that just like with a shape file, if you want to send somebody this data, you have to send them the entire folder. In fact, I would send all of this as a zip file if I was going to try to send it to someone. Similarly, if I wanted to export an imagine image, I could do the same thing here that we just did and select valmeyer.dem from my file G database, or from one others I just exported, and then in my export folder here, I'll select it and then I'll select imagine image here. And then click OK, and it will export an image for me. Just another raster format that we can use. And once again if I go take a look at adding it, it's similar to the tif, it shows up as just one item with a .img extension. But if we look in the folder, once again we have multiple files. We have few of them before, but the most import is .img. If we had a larger than two gigabyte raster image, we'd also have a .ige file associated with it. That is sort of the extension of the raster data. And then lastly, if I want to, I can export ASCII rosters. And let's close this down and let's just find that tool here. ASCII. And we'll select raster to conversion tool, and I'll select my input raster. Valmeyer.dem, and then select an output folder here, of the raster exports. And I'll call it valmeyer.dem. And ASCII files are text files. So it's kind of an odd thing to think of as converting a raster to a text file. But it will make sense in a moment, I'll show you what it looks like. And just for now, on the other end, if we wanted to bring an ASCII into ARCJS, we'd have to use a geoprocessing tool to convert it to a raster first. So this is a nice data interchange format for sending to other pieces of software, but it's not a natively usable format. So I could use an ASCII-to-raster tool here In order to import an ASCII file as a new raster, if I received it from someone else. Now, on disk though, we have a text file. So valmeyer.dem.txt. And notice that's a little bigger than the others. It's about twice the size to write it out as text, versus the binary format that's used by these others. And if I edit this ASCII or go look at it, I see a few things. First, I see some header information. It tells me the number of columns and the number rows, and it tells me where the corners of the bottom left corner, lower left corner here are located, and it tells me the cell size. And from there it can then figure out exactly how this rasters laid out. And then it says that the no data value, the null value, is negative nine, nine, nine nine. So that's what were seeing here, and that's why this raster's curved is that it's actually a rectangle remember like all rasters, but it has null values around the edges. But if we kind of look through, it we can see that there are values elsewhere and that we can read them, and it just gives us these numbers. And it's a stream of numbers and spaces that ultimately becomes a raster when it interprets these numbers and runs out of each row. So it goes through each value until it gets to 453 values, and then it goes to a new row until it runs out of rows. These are nice because you can write them out from other pieces of software or receive them from people. But ultimately, they're not used that much. So don't focus too much on them. But they're a nice way to send people data and you can also zip compress them. Okay, that's it for this lecture on raster data formats. I hope you're more familiar with the different types of raster data that you'll be using in GIS, and that you might receive from other people. In this lecture, we covered geo tifs, file database rosters, images as regrids and ASCII rasters. Thanks, see you next time.