 Welcome to remote sensing and GIS for rural development. This is week five, lecture five. In this week, we have looked at the raster data set and raster tools in detail. Some examples were taken from the QGIS toolbar. You can use any software you want. The theory is the same. The raster data is the same that can be applied across the platforms. And more importantly, the theory behind the application of the tools are the same. What we will do today is we will continue with the manual for raster calculators and others which are listed in the QGIS manual. It's a working document where they keep on updating the software tools as the software gets updated and the toolbar gets updated. Examples are given in these manuals and tutorials that you could use for learning the new tools. GIS is an evolutionary software, which means it keeps on evolving. There is a lot of interest in the software and hence a lot of people spend time on developing new tools and upload it for free. Like any other software, QGIS evolves. And with that, the learning curve is also available, which means you have to spend time to learn. So the point here I'm trying to get at is you will have to spend time, even though the lecture series is over, to learn new tools and update. I am here to show you where to get the information. How do you learn the tool and apply? Which tool that doesn't make any importance now? Because the tools get updated. So the base is how do you access the information, which are the websites, which are the tools? How do you find where to get help? How do you use the tool? And what is the buttons that explain on using the tool? So let's start with today's lecture on the link that has been shared already. If you click the link, you will have the Working with Raster Data chapter of the QGIS manual. In the previous week, we saw the 15th chapter, which was working with vector data. Now we will look at the 16th chapter, which is working with raster data. So please allow me to share my screen. There you are. So we have the 16th chapter loaded. As I said, above is vector data. Now it's raster data. So let's look at what are the tools, important tools that we'll be looking. So 16.1 discusses the raster properties, wherein you can look at the properties of the raster. You can right click on a raster data set and look at the properties. Or you can go to the source tab and look at each property. We will show some properties in the live tutorial now. So then you can look at the source, symbology, transparency, histogram, all these things. Some of these are pretty advanced. But for you, the important three things are the information, source, and symbology. Information is about the data, the name and storage, where it is stored, et cetera. The source also has the layer source, the coordinate reference system, layer name, other information. Symbology is where you change the color, change the gradient, those kind of things. Let's see how it looks like by looking at the same software example that we used in the previous class. We have the entire pane. So let us just focus on to the entire scale. You have the entire globe here marked. And we'll just use one layer for now. So the interest is you can right click to properties and this property box comes up. As I said, information will have the name, the source, where the data has been stored, who's the data provider, extent, a lot of information. You just go down and see multiple, multiple information. These are actually not input by the software. This data was taken from the GBL archive from NASA. So you could see that NASA has been credited here and I have stored it in my system in different things. So you can see some basic statistics are here. What are the statistics maximum, minimum, standard deviation? What is the unit of the data? The extent is minus 80, minus 18, 180, 90, which covers the entire globe. And you have different bands inside the cluster. It's a net CDF format, but as you say, you can get the source. The source gives the layer name projections. You can change the projection here by clicking if you want to apply and then you have a symbology. As I said, symbology can be a single band or multi-band color. If you do a multi-band color, you have to specify what colors you want for your band, minimum and multiple, et cetera. Let's keep it back to single band pseudo color, as it was. Because I'm going to show you a quicker and easier way that you can change. You can also do resampling, some layer and things. So these are tools that actually let you work with the raster data set. You can have a min, max value and tell that this is the range that the data should be showed. For example, if you have minus 999 in that range, in a raster data set, that is invalid data, which means when the raster was developed, there are some errors in the data. So that data would be minus 999 or some value. But you know that for sure rainfall cannot be minus. So that is a no value, not zero. Zero is an actual value, whereas minus is not possible. Same like temperature. Temperature can go in minus, but minus 999 cannot go. So this is how you could put a filter for your data. So I'm going to close this. And as I said, you can come here, you can click and then see if it allows you to change the color. It comes back to this. If you want white to black or single band color, you can have unique values by creating classes of the data. So now it has classified the data as big classes. A lot of classes you don't need so many. So you could just say, no, I don't want. I just want a multi-band. You can say green, what do you want to do? Stretch the color to min, max, or other things. So all these are just to look at the black and white. Look at different colors, contours, shades, et cetera. Again, these are very basic ones that you could use. If you don't want to do any changing of color, absolutely normal to use the black and white. I will change it to red. But again, as I said, you can use whatever color you want. So these properties can be changed as and when needed. So let's move on to the next properties that were given in the slide. So we are back. So the first was the raster properties dialogue where we looked at source symbology, transparency histogram. We will not be working much. In the symbology, you can say that you can do different types of renderings. Multi-color, the file comes with several bands, satellite images, you can change the color. Single-band, other things are the multi-band color. You can set different colors. There's different examples. We ran through this example by clicking classify. And then you can also use a color ramp. So single-band pseudo color. And then say band one is what you want to use. A color ramp is the different colors that you want to use. And you can change. So these actually help you in visualizing better. See, in GIS, most of the research comes first by visualizing. So when you visualize, you can actually bring multiple different colors. Understanding of the data, like hotspots and other data. So all this can be done when you work with rasters in a GIS database. So moving on to the other aspects, let's move on. Again, band rendering and all, please go through in your free time so that you could look at different colors if it is necessary. Different colors and different ways to showcase your data. Otherwise, what will happen is you will have the color. But is it of your interest is what is needed? I'm going to show you an example. I'll have to reshare the screen. So let me reshare. So in this part, we had red, black color. And white. In the properties, you can have, as I said, symbology. Instead of single band, you can have pseudo color where it brings you different colors. And this is a min and a max value. How do you want to interpret the color linear is fine. And different color trends. So normally, for water, you can use these type of colors. So blues, because low blue means less water. And then you can apply. So now you can see that where is the soil moisture high from 0 to 10. So mostly green land, the ice part, because the ice melts and then the water goes in. You can see it. But in India, you can see most of the blue color in the Ganges basin and in the Madhya Pradesh region. We did a total, but we had removed it last time. If you heard, I remember, but let's do one for the 400 layer. I go to properties. I go to pseudo band color. And then I do this and you have to apply. Don't click OK. It will not apply. You need to apply and then click OK. So now if you see the deep soil moisture, it is most prevalent in the Maharashtra and other regions because and for that particular time, there is a date and time. You could see that it is 2015 01, which is January 2015. So the data when you download from satellites, always it has the name of the data has the time date. Soil moisture, which is the water is measuring and the version, those kind of things. OK, so let's go back to our slide on the. What are the properties that we have looked at? And as I said, the properties may differ, but it is our duty to understand which properties we want to use. Right. OK, so what you see here is we have changed the color, the other contours, different types of styles, etc. I will not get into the entire styles of this band. Then you get to raster analysis. OK, in the raster analysis, raster calculator is number one. We have done it and then we showed how we could add layers. Here I'm going to show you quickly to add a couple of layers. Again, we go back to the QGIS software. OK, I'm just going to add layer one and layer four. OK, so you can click it, go to raster calculator. All the rasters are there. Actually, we did add it in the previous lecture. So how do you do it? So just one and then double click plus four. There it is. You have one plus four and the output layer, you can say just create on the fly. It will create on the fly until you put the names and the details. This OK button doesn't come. Let's say OK, and you can go. It goes to a particular software database which the QGIS has created. So moving on, we will look at the raster calculator's number is key. Then we had a raster alignment that we had used the tool. And then the two major paths cover is raster calculator raster alignment and then the geo-references. geo-references is very, very important, especially for rural development, I said. So we have a dedicated week for using this tool and updating this database. So what it is, I'll just give an example. You have an image, a satellite image or an image from the field. Let's say a topo sheet. A topo sheet is something that gives you the locations of the water bodies and the panchayatokas, et cetera on a map. It's a paper map, right? But the paper map has some techniques used so that it can be scaled. It's not just drawing on a hand and a paper. It is a map which is based on a scale. So if you collect these maps from rural areas, you can digitize it. And that digitization process will let the map be involved into the GIS software. This process of digitizing is called geo-referencing. So this is very, very important. As you could see that a paper map is taken and then it is geo-referenced. Once it gets geo-referenced, it becomes a raster data set. So think about taking a paper and then taking an image of the paper map, putting it on this software and then converting it to a raster. How much data venues can this open? A lot. Why? Because from independence and before independence, there are a lot of maps which are paper. Now you could convert everything into digital. Initially you had to go through a big software factory, send the maps and bring it out. But now just a phone is enough and you can take image and then use it. The same thing. If you take an image in a phone, you can geo-reference it for the location. Some phones have a geo-referencer built-in because if it is a smartphone, it has geo-referencer built-in. However, the older phones and the cameras may not have. So that is where you use this tool to geo-reference the image. We will again go through this exercise and why it's important because it gives you a hands-on control on updating the data set from the rural regions. So we will have, as I promised, we will definitely have a week on this. We will create new polygons, points and lines and you'll see how powerful this tool is. So for that, I'll give you a couple of weeks and we'll tie it with rural development activities. So these are the dominant tools that are involved. So let me go back to our slide where we have discussed this tool and the links. So there's only two, three tools given, but there are multiple, multiple tools in the QGS software and plugins. Plugins I haven't discussed yet. We will discuss in the following lecture series. But let's look at the QGS software again. You have the raster. These three are the main tools which are being explained in the tutorial. These are also tools which come very handy. A DEM is a digital elevation model. You can do a 3D printing using it. Basically a topology map which gives you the elevation. See, normally maps are 2D. It's a paper, it's two-dimensional. But if it is a DEM, it models these elevations so that you can capture the topography change in the map. And that is called a DEM. We will have an analysis of it. Then you have analysis tools. These, some of them are pretty high-end for the basic rural development activities. We may not use it. Then you have projections. Again, all maps need projections. You can change the projections. You can add new projections here. Then you have the miscellaneous tools where you can input raster information, merge data sets. It's different from align. Align will just align the data sets, not add the data set. Whereas merge will bring two data sets and merge them. Maybe there is some gap. And those gaps are an overlap. These are corrected with this software. You can see that a glue is there, a simple glue and a map is there. Then build overview pyramids. It's like adding or converting it into a better raster and tiles and index. So let's click a merge tool. As I said, if you need to understand any tool, just click the help button. It will open a dialog box which you will see now. It has opened here, which is the merge data set. Merge rasters faster in a simple way. You can use a pseudo-cler table from input raster, define the output raster, et cetera. And the Python code is there. An algorithm is there. And it gives you an exercise of what the output will look like. Let's go back to the software. And then we have the merge tool. What do you have run as batch is kind of an advance. Batch is like you create an automated loop of activities in GIS. For example, you have A plus B is equal to C, the rasters. And you have to do it for every single state. You don't have to do every single state one by one. Just do one state and then run as a batch. It's like a for loop condition. So those who know programming can use this. Otherwise it does take time. So when I was a student, you had to do everything each step by step for each state. But now you can do one state, apply the algorithm to other states and just run as a model. So batch process is like a model within GIS. So we were at miscellaneous. Now we go to extraction, the clip raster by extent and clip raster by mask. Mask is what we had given in the previous lecture. We discussed the mask tool where you bring in a mask and then you extract the region. Clip raster by extent is you can create an extent. So each box has an extent. The globe has an extent minus a 180 90. You saw that when you download the image. Now, if you say that I need only for India, then you can give the India's extent and then ask the model, the QGIS to extract only India. Let us try for one data set. So while we are downloading the data, I would like you to look at most of these tools, which is used by a lot of people for accessing the data set and other aspects. For example, we have QGIS embedded tools on the top. Those are always the stationary tools that you will use for your GIS analysis. But you also have tools on the third line. Those are not always the same tools that we have. So because I have some little bit advanced stage, I may use some data sets that are important for me or some tools that are important for me. So you could click and export or understand which data set you want. So let us go back to the toolbar. We are going to, as I said, these toolbars can be added and subtracted based on your data set and needs. I'm going to click the add vector data set point. I'm going to click here as shapefiles and then let's say India boundary I'm going to add. Let's say add close. So now we have the India boundary. Let's put it on the top. So you have the India coverage and underneath it you have. I don't want the whole color. As I said, you can go to symbology. You can say simple fill. If you want simple fill or you want some, just the background, you can just say, I just need the background. Here I don't want simple fill. I just want a simple outline. And outline is black in color. I'll say apply. So now you have the India boundary. You can see that. And I'm going to extract just the India value. So you can go to raster. You can go to extract by extent. So already the layer is there. The input layer is number one. The clipping extent. I don't know the extent, the India's extent. So you can use calculate from layer. So I just click the arrow button. And then India came. So I just said, and now you can see the extent of India auto populated. It is 68, 97, 6.7, 37. The box, the extent of India is that. Then the algorithm populates by itself. Where do you want the data to be stored? It can ask you initially or it will just run. So now the data has run. It is still running. It does take some time because it is a big data set. Maybe I should have just used a small state. So let it run. So now it says algorithm is finished. You just click close. Now you could see a new data set being created, which is not global. Only the extent of India. Only the extent of India is there. The box in which India is there. So the box is there. And it is the same data as number one that we used. How do you know it? You can click this identifier tool. Click any pixel. You're just going to click one. And it will automatically populate here. So you can see that the clipped data set has a band of 22. And the pixel value is 22. And this is also 22. The same value, which means it has taken the data, clipped the boundaries, and given me the output. So now I can use this as clip extent. And just save this. So you can save as export the data, save as. Then you can save to your database. What the tool has done is it has created the data set and put it on your system QGIS, but not stored it. Because you'll be doing it again and again. You don't want to store it and make your C drive or D drive heavy. So instead of that, you just keep it as a flash, a cache memory. After some time, it just gets deleted by itself. So I'm going to remove this. Okay, let's keep it for now, because we're going to do another tool, which is the extraction by mask. I've explained this in the previous lecture, but now we're going to do it. We are not going to use a clip extent because that is not the input. The input layer is number one again. The first layer, which is 0 to 10 centimeters. The mask layer, as I said, is a shape file. So we're going to use India. So India, I have the shape file. I'm going to click India and then source optional option. Whatever says optional, you don't have to fill. Let it run and then we'll get it. And then these also just let the defaults, because that is one thing in QJS is a lot of parameters. If you don't know, just keep it as default. It will still run. If it doesn't run, then we'll look at what we need to change. Then click run. The following layers are incorrect because it is too big. Look at the name size. Okay, so these kind of errors can come within your model. In that case, you have to just extract only the part. Let's say I don't want the match extent, and then I'm going to run. It's still running. Okay, now it is done. So you see how initially the data did not come because some of the clicks, the defaults did not allow it to do. But now it did because I just removed the default, one of the default. How do we know? It is a trial and error process. It's good that this happened, so that you could also visualize how these things happen. So now if you look at it, this data set, which is clipped. So the clip extent is different. There is a box. Whereas the clip mask is just the India data. You see the difference between the two tools. Do you want the box extent or do you want the exact extent? Why is it like this is because the box extent will come in pictures where you still need some data outside the boundary. Maybe the boundary is still being formalized, so you need some data outside you can take it. Whereas clip mask will only take the data within the masking specified. So let's look at it zoomed in. You could see that this data is not taken. Why? Because within the mask, within that line, the pixel is only 10% there. You need above 50%. So there is a threshold and only if it passes the threshold, the data has been collected. So you can see here 40%, 50%, 60%. So since most of the data is outside the boundary, it will not take. So you could see that if I remove this layer, you can see the India data doesn't cover the entire boundary. Why? Because the boundary is not capturing the exact pixel more than the 60%, 50%. In these cases, what is recommended is you always make a boundary and a buffer. A buffer is beyond the boundary so that you can collect data or use the extent. So now you could see the difference between these two tools. You could think multiple, multiple applications of this in rule development because a lot of people don't use the massive data sets. They think it's too big. It cannot be run on the system for a village or a panchayat level, et cetera. So this is where you could extract the data and use it only for your region. So I think with this, we have done the extraction stuff. Contour is kind of a little bit advanced. We'll leave it. Conversion is just the coloring change from PCG to RGB and then back RGB to PCT. And then you also have polygonized raster to vector and vector to raster. So if I need to convert a raster like this into polygons, you can do it and also back and forth. So these conversions are also important in some cases. So with this, we are coming to the end of the tools. But before that, I would like to also share that we have multiple, multiple data sets for rasters. So this data set, as I said, was India data, but it was taken by NASA. So it is stored in a NASA database. NASA has most of these satellites in the globe for scientific and research purposes. These are some of them. We will revisit them in the future classes when we download data. And then we have the Earth observation systems from the ESA, the European Space Agency, which we use this data for the LULC in the previous lectures also. And we are not far away behind. Indian satellites are coming into the race of research and advanced applications. One among the six nations. We are very proud that the Indian government is putting a lot of effort in making India as one of the dominant players in the space market. We also have open source systems like the Google Earth Engine that we will be using shortly. And also big data, how do you use it? Everything is taken care of in the Google Earth Engine. And you can also have multiple, multiple satellites. The satellites and images, resolutions are given here. Some of them are free. Satellites, open source satellites, whereas some of them are expensive proprietary satellites. Like Big Bird, it is below a meter, 0.7 meters to 2.9 meters, 1 to 3.5 days, very high spatial resolution, very high temporal resolution, but you have to pay. Whereas the Sentinel-2, which is 6 meters resolution and 5 days is free. This is the nearest we have for open source software. And you can see how the image differs because of using high resolution. So unless and otherwise you would need a very high resolution, you can still use open source software and do the research. So I would conclude on the slide to show how India is mapping the Indian region and the global region. We have multiple satellites ranging from IRS to SARAL and each is looking at different, different natural resources. SARAL looks at rainfall and then Dropics, CatoSat is for mapping the land use map cover and the digital elevations. ResourceSat is to monitor the resources. OceanSat for ocean, et cetera. And the resolutions differ from 1 kilometer to 1 meter. Even in satellites of ISRO, these high satellite spatial and temporal resolutions you have to pay. It's not free. Okay. The free resolutions are here and still a lot of things can be done. Research was forwarded. So with this, I'd like to conclude week five. I will see you in week six lecture and more input on these satellite resources, remote sensing data where you can access will be shared. I look forward for week six. Thank you. Thank you.