 Hello everyone, welcome to the NPTEL course on remote sensing and GIS for rural development. This is week 7, lecture 5. In this week, we have been looking at using multiple datasets for rural development, especially digital elevation models. In the last class, we downloaded one tile from Bhuvan portal and then we had kept it aside to be looked upon in the next class. So we will start opening that dataset and then look at how the data has been downloaded, etc. From that, we also would understand that we need multiple datasets for an administrative boundary. Please remember that the rural development and other policies and schemes work on administrative boundaries, not hydrological boundaries. Maybe there is a Cauvery Basin planning, Ganges Basin planning, but at the end of the day, it comes to the state level, district level and village level on giants. So for which today we will download a district from Earth Explorer and show you how to collect one dataset for a particular region and then use it in the map composite of QGIS. So in today's lecture, we will follow through the preparation of elevation of a map for a particular study area. And for before that, let me share with you the dataset that we included in the last class from QGIS space. So this is the data we downloaded. You would have remember CDNE 43B, the tile number that we downloaded and if you zoom in and zoom out, you would know this is the third version, version three of the Cartosat one and the resolution was one arc second. One arc second is equivalent to 30 meters resolution. Let's look at it closely. So right now what you see in a DEM is animation profile. And you could see that it ranges from minus one to one thousand one thirty six meters. The unit was in meters as explained in the metadata on one one's website. What we will do now is we will look into the size of a particular pixel. Now you could see when I zoom in, you could see the pixel boundaries, right? So how the pixel is given. So what I'm going to do is we're going to select one side and then the other side carefully. And then you can see how big the pixel is. So it is 30 meters because of my clicking and zooming. Maybe if I zoom in more, particularly, I'll be able to to click more accurately. So let's see if I could capture that. Yes. So yeah. Yeah. So it's approximately 30 meters and then this this is important to understand because the resolution arc second is on the curvature and that can be different for different regions, right? So now we have this. So what is the issue here is that it is not a particular boundary. It's a tile. So tiles, you don't get a particular picture unless and otherwise the shape file is with it, right? So I'm going to add the data set just to show you how we have the data for Google development GIS we have, right? So we have the water bodies and tanks, but I'll go into the my data set, okay? And then we will see how we could extract the boundaries that we have onto this page. So I'm going to select only the S3 shape files that I have, let's say, distance. Okay. So I've added the India districts a shape file. You could see that in coming up now. And then what you will see is the boundary is we took Kanataka part, correct? But it doesn't lie on a particular district. You can see that the district boundary is not, you know, you could see if I drag it down that the boundary is coming on top of it, but it is not for a particular district. It doesn't cover any particular district. So that is where we need to merge multiple data sets to make one district's digital elevation model. That is what we will do now. So I'm going to use, since we use already proven, let me use Earth Explorer for the next exercise. I'm going to share my screen. My screen is visible. So what we will be doing is we will be showcasing the Earth Explorer. So Earth Explorer, everyone should hold up because we had discussed the Earth Explorer in detail in the previous meetings. It is a NASA's portal where a lot of data has been stored. So what we will be doing is we will showcase the effect of using this software for downloading data and for looking at the different data sets that are available. So let's continue. There's three parts in this tutorial. What we'll be doing is we will look at first getting the data from Earth Explorer for a particular region. Patna is the region that we have selected today. And number two, download all the data into QGIS and then merge them into one boundary because each style might be different and we need three, four tiles to make one day district. And then the third part is we will look at Earth GIS. I'm sorry, QGIS to look at mapping and making it as a map. So some of these are running in ArcGIS background. That is why ArcGIS was mentioned, but there is a lot of potential in open source. So we'll be using open source. What we'll do is we need to define the boundary of Patna. So Patna is in Bihar. What we'll do is let's zoom in and once you zoom in, you can see the boundary of Patna. How do you select this? So if you know the range of the degrees and minutes, then you can do it. Or you can do a shapefile if you load it. Let's say we don't have the shapefile, but we know that we need Patna. Okay. But now just for this website, you can put a circle around this point, but then take it as a circle, but that's too much of data that will be wasted. We don't need a circular region. So polygon, polygon is better because we're going to draw a boundary on top of Patna and extract it. Remember that when you draw this boundary, still the tiles will come out. So I'm going to draw four points and then this whole study Patna comes in. So in polygon, you select and then each point you put and then you take it out. Cloud cover is important, but you can have a cloud cover yes or no because the ideas like DEM may not have cloud cover. It won't affect your image. Cloud cover is mostly for land use land cover. So then we go to data. If you go down to the data part, you will see that there are multiple data options. You can take commercial satellites, declassified, Landsat, digital line paths, but we will be doing a digital elevation. So I have clicked on digital elevation and in the digital elevation, we will be going on SRTM one hour second. Why SRTM is, it has been widely used for the Indian region and we'll be using it here also as per literature. It is one hour second. One hour second is equivalent to the Google. If you click the results for the boundary, then you'll have data. Three tiles are being populated. The icons, let's go through it. So first is the footprint. When you see the footprint, it's an overlay. It just gives you the image of the tile and then the second would be the, so now you can see the footprint of the tile. So there are three tiles that we need to need. That is the footprint. If you click, go ahead and click on the footprints between the three, you will see that there are three footprints that are needed. Then you have the image. You can collect the metadata. If you click the metadata point and then all the data aspects, et cetera will come up. The download is very simple. If you click on the download and then download to a particular folder, you can do it. Or if you want all of them together, you can do a bulk download. Only three are there. So let's do individual. So we just click, click, click three times, save it in your drive. So let me save in my drive. The file types available are three types. One is the VIL arc second 4.97 MB or one arc second DTED format or geotip format. I remember that we need a format which includes the geospatial location into it. So we do need geotip, not just a tiff. So we click download. So now it has been downloading. I have multiple other things that are downloaded. So it has been updated. Let's save all the three tiles into one folder so that we can easily access for the QGIS file. So Earth Explorer is done. So let's close this and then move to the QGIS part. So this is first part. The first part is done where we identified the tiles and then we went back to looking at which tiles are important. We designated them. We downloaded them and then we can save these points that needed and then move on. So let's move on. We will be going to the QGIS. Let me share my QGIS again. So in QGIS, what you will see is add the DEMs. So you have all these in my folder browser and now I'm going to double click on all the three and then add it to my layers. So in my layers, you could see all the three files. The coloring is different. So the coloring is different. So don't get shocked that Y is one very bright, one is very dark. It is because the coloring extent is different. So if you look at the extent here, it's 20 to 483, the band one for the first tile and the last tile is 40 to 117. So within that, the black and white has been applied. So the minimum is 20, which is black in one tile, whereas the minimum is 40, which is black in the other time. So we'll have to normalize it, but again normalizing is not needed for now because we're anyway going to merge it and then normalize it. Once you merge it, it will get normalized by itself. So let's do the merging part. So you know that three tiles are required for Patna. I already have the Patna shapefile from the previous data that I have shared with you. For example, the audio, the survey of India reports and survey of India website, we have taken this shapefile when I add it into it. So I've added it to my portal QJS layered page and you can see that three tiles are covering mostly the distal elevation. So these three tiles have to be merged. How do you merge it? Because the study area is across the three, we need to merge it. And this was already explained in the raster tools. When we were discussing the raster tool sets, which is on the top. So we did look at miscellaneous tools and other tools. So in the miscellaneous, there is something called merge. As the image or icon says, it is two tiles and then there is a blue, which is merging it. So that is what we are going to do in this exercise. We are going to merge. Or you can go to the parcel processing toolbar and then type for merge. And it's like a searching. You're searching for toolbox of merge. Plugins may also have merge, but for now, we'll just take the merge from the top toolbar, raster, miscellaneous and then we'll do merge. The input layers. See, the input is a raster layer. So in the in the merge, you're going to merge certain data sets. So that becomes your input. So we are inputting these, all the three have been selected. Then we say, okay, do you want to save it or open temporary file? So as I said, normally temporary is okay. And then I click, okay, it runs. So it runs. The algorithm merge has finished. The merge file has come out. What you could see here is the coloring. Now the coloring has been normalized. So instead of 40, it has jumped to 20, which is the lowest of the three values. And then 483 is the highest of the three values. What I have done is I have removed the other three tiles because they are not important now. It's already double populated. So let us remove it. Please understand that the three have become one now. Okay. So one tile is what we have. It's all merged. Again, this is not saved. So we have to save it. We'll do the same later. Patna boundary. We don't need for entire boundary, right? The raster, we don't need for entire boundary. So we're going to take only the DEM, the digital elevation model output for the Patna region. For that, we need to use the shape file to cut as a mask. Okay. So for clipping, we go to raster extraction, which we already saw in the raster toolbox. So go to raster toolbox, come to extraction, and then click by mask layer. The mask layer is the Patna layer. We're going to use Patna as the mask layer. So input layers is only one. The merge layer. Patna is the mask layer. The other things you should be more default, but create an alpha bound band can be kept and then match extent of the clip raster to extent of the mask layer. Last time also it was giving errors. So we'll remove it. You can clip the same file or run as a temporary. Now it runs very quickly compared to property softwares. The open software runs very quickly. It's already run and you have it. So we have we have a merge and a clip raster. Both are for the Patna region, but the merge has the entire band of tiles, whereas clip will only be clipping the boundaries for Patna. So let's look at the difference by removing the merge. We don't need merge now. So let us remove it. And now you could see only the Patna, the merged raster pie is now clipped for Patna and only the Patna region is there. And you could see the differences in elevations only 0 to 79. The overall you had 483 which is very, very high, but now you have 79 as the highest. So now let's color it because we need different colors to look at the properties. Go to properties and in the symbology, you can look at the histogram under the symbologies. If you click compute histogram, you will get only one band value is there. So in the preferences and action go to show selected bands. The entire what the histogram will give you is the entire band and how the gray scale has been given. So each pixel value and where the colorings is there. We closely look at 40. So the elevation is mostly at 40 to 70, but you can see only very, very small. So we're going to make it bigger and then show. Histogram is needed to show the differences. So you can know that it is from only from 40 to 70 and that is the range we are going to use in the criteria for range of values in the colorings. So let's go back to the symbology and in symbology we need to do the coloring. So we are going to collect single band pseudo color, not the single band gray color only one band, now pseudo color. The minimum and max value can be given. This is the minimum is the minimum elevation and max gives the maximum elevation. The interpolation can be kept linear which is default. We can give a color range. But we need to do a color map and this color map is taken as your interest. For example, if you use a different color set, it will be brighter. All depends on your report and reporting style. Let's style and change it from zero red to where zero is white and seven is red, it automatically changes. You can also create a new color ramp and then the gradient type you can say green and then you can change your own may basically make your own on greeting and color ramp. These are not as easy as done here in property software. But you can see that we have we can change all these colors and then make a color plan. We can have our own color ramp and may maybe name it as your own color ramp. But let's go back to the green color ramp which is the default one of the defaults, G O Y O R, which has been done green, yellow and orange. But then some areas are not represented. Why? Because the values are by default taken up. Right? So the orange is taking us 59.25. So let's adjust it. So basically what QGI does is it takes the entire bands and then it creates intervals and based on each interval a color is given. So we are going to change the intervals or add or minimize the intervals so that we have more colors. So go to equal interval and five classes are there. Five colors would be given. Now we're going to increase it to 10. Once we go to 10, let's we can give us labels, unit suffix, which is different. See you have a value on the left hand side and then you have a label on the right hand side. So after the color. So the value gives you the value of the color whereas label gives you how you wanted labeled in the legends and system. So since we know that it is going to be an elevation, let's give meter. So label unit suffixes meter and precision is number of decimals. Okay. We can remove it for time being because it becomes too lengthy. And then label procession is number of decimal points, numbers after decimal point. Let's keep it zero so that we know that it's meter. So let's do the meter and it is cleaner. In legends settings, you can say use continuous legend. You can uncheck it. Here we have a single color. So on the left hand side, you see there is one single color and then it is one legend. But if you unclick it, then it breaks into different color packets and the labels are given differently. So let's do that. Now we didn't increase 10 classes. We can also increase the class based on the number of colors which are the histogram. We see that most of the elevation is 40. So after 40 only you get the elevation picks up. This we saw it in the histogram. In the histogram when we looked at the frequency of the values, we saw that 0 to 40 there are values but very, very less. But after 40 it picks up. So let's jumble everything from 0 to 40 as one so that it helps you in bringing the values. So 0, 55. And then each time we change these values, you could see that the labeling also changes because we're making it as a single number rather than having too much decimals. So all the 10 values is the same but we don't take the values given by QJS. We are giving a value and as per it, QJS will change the colorings of the elevation profile. Now a more meaningful image will come up where higher elevations are in the red and then the lower elevations are in the green. So 0, 40, etc., etc. Now we say okay, it's done. So let's see if they have the elevation map looked sad. This is the Patna's elevation and it's good for us on the QJS. But when you're writing a report, we need to import it into a boundary. So that we know that we show how where the Patna district exists. So for that we need to add the India boundary and the state boundary. So I'm going to add India states and we can see the India full boundary. And then we have Bihar. The Patna is invincible because it is at the last. If you pull the Patna on the top, it will come on the top. But again, as I said, we don't need the solid colors inside India. So we will just change the properties. We'll just change it as outline. We have done this multiple times in this lectures now. So go to simple fill and then in the simple fill, you can just simple outline and then you can change the thickness. You can keep the black color. It's okay. Now you can see India the whole map. And same thing, we can do the Bihar. And then let's change the color. Let's adjust the color so that we have a different coloring scheme. Now let's zoom in and make it a duplicate layer. Why? Because we need two maps. We don't want to add some data that corrupts the Bihar value. So let's do that again. Now, let's push Patna to the top and you could see how it has come up on the top. Then let's do the same process because we didn't save the line. So let's do the same thing. But now also we just need the outline. We don't need the full colors inside, the solid colors inside. So Patna district is only going to be blue. So this is different than the clip mask. The clip mask is there, but it's at the bottom. So you won't see it. So let's look at the legends. You can see that it's not a continuous legend, but a class. We said 10 divisions and then 10 classes and then the numbers we gave is there. We can also change some things. If you want the continuous setting, you can just say use continuous. If you go to continuous. So now you can see that it has changed. You can go back and forth on applying the legends differently or continuous. So now we have the two layers that are necessary for our map. We want to show India and then we want to show the location of Bihar in which Patna is there and then we're going to show Patna. So these are three layers and top of which we will also add the DEM of Patna. Now what we're going to do is we're going to open the map composer and say create new print layout. And in the new print layout, we are going to create a map. There are a lot of toolbars on the top. The view bar will give you the toolbars that are necessary. But before we do that, we need to adjust the visibility of the map. See it's in the corner and it's not in the center. So let's do the base map first. For the base map, Patna is important. So this is the major map. So how do you visualize this part is we're going to let me draw a small thing on top of it so that we could see where we want. So we can divide this map into a couple of smaller maps. One is where the entire study area comes up and then you have the location of the study area in India and within India where which state it is. So this helps you in actually making your presentation good because it helps you in showcasing a map in the project. So now when you draw the map rendering, again, those who need to know basics of this, please look at PGI's tutorials on how to make a map. I'll give you the link and a lot of online tutorials are there. What we're going to do is you're going to add this map and then move the content on the left hand side. The first button is to create the Composer. Once you create a Composer, whatever is there in the QGIS comes in. Now you can move. You can click the map thing and move. Now we are moving. So add size, resize it. You can also move the entire screen also. When you move the entire screen, the location of Patna also changes. As I said, we also need a grid because we want to give the lat long so that let's go to the right side and then go to options, go to grid plus grid, what type of grid you want, solid, cross marks, etc. So let's customize the appearance of the grid and then go as frames and annotations only. I just want the frames and the frame type is exterior. The tick marks will come outside, not inside. And then we also click the dropout decimals, etc. The visibility, we have to give the X and Y values. So the X and Y is the interval between the grids. So let's give 0.2.0 based on the map that we have. So now that the grids have come up, there's no solid lines, but only on the exterior as we wanted. If you want smaller, smaller, you can do 0.1, you can make it smaller and more intervals, but let's say 0.2. And then the decimals, you don't need so many. So you can make it small, make it say one decimal is enough so that it's not getting too over crowded. There are some certain things that are very necessary for the map. The first is the map data, but then a north arrow to show the direction, a legend and a title. So let's add all this. All these are in the left-hand side. So I'm putting a north arrow. So north arrow comes up. We have a direction, it says where the map is pointing. Then the scale, the length, how the map scales on the real world. So we're going to add the scale from the left. We add it here and then you can change the scale, size, numbers or units can be changed. Once you click it on this side, there's item properties. So the base map has been created and then you can lock all these layers so that it doesn't change when you add other layers. So we have locked the layers. Now we go back to QGIS main window. So in QGIS, the main window is different, the map composer is different. Once you open the map composer, which is on the top, you will see that you are getting a different location where you put the map. So now we're going to do the patna. Patna and where we are is. So now go to the base layer again and then inside the base layer, you can add another map. So now we have gone to QGIS and removed the patna, which means make it invincible and then only keep patna and b card together. So the boundaries are together. Now when we draw this composer, it will only show what is there in the QGIS currently. Now we can change the size, make it center, etc. etc. Let's do the same frame, go to a frame is given. And then if you want, you can lock layers so that it doesn't change. Now go to GIS. So now we're going to show the location of Bihar in the planet or at least in India where it is. So because once you know India, we know where it is. We'll just keep patna, the boundary, go out and then you add only the India boundary plus Bihar boundary. So now what you could see is because the QGIS we had a smaller vision, we only looked at Bihar part, you'll only see Bihar part in the map composer. So you have to zoom out. So you can zoom in, zoom out using your mouse and then the move, the tool, the move tool we have used. And then we have done the three maps. So these are the three maps that are needed and we are going to lock all the maps. So now we have all the data, is it enough? No, we need to have the legend. We need to show the people what is the coloring means. So I'm just going to draw the legends. Once you add the legends, all the shapefiles, all the data that has been clicked will come. And then we can see patna, Bihar, Bihar copy in India. But we don't need patna two times and then we can go to auto update in the legend. So here we have copy we already have, we can remove the Bihar copy. We have patna, India states and then the other things. Here's where you can also edit the names if you want the spellings which are not editable in QGIS. You can do it here. The clip map is not a right name. So let's type it and rename it. Double click and then change it. We're going to say elevation and then above mean C level. So normally elevation is considered above mean C level, mean C level is zero. And then from there how tall it is. So now the unit is also given as in meters. We don't need band one gray because that is not needed. Now we'll remove it. So now it's more clean. You can see zero to 80 the 10 classes. You can also change the label of the values. But please understand that here it doesn't change the coloring. So if you say zero is not zero is 100, it will still show 100 as a label. But we are not going to have it across the system. What happens is this is a labeling thing. So you have a data but you can label it different. For example, you can take a bottle of sugar and then if you label it salt, it is going to be red as salt but the inside is sugar. So only if you go back to QGIS and change the labeling, there the map part then it will change. This is a map composer. It's purely visual. So we can repeat the whole process zero to 40 to 45 to go through this. One more thing is a title. You want to send this someone to add a title. So you have a text box, you can add the text box and then put elevation map of partner. And then you can also increase the font size, font style, bold, all these things. You can do it on the right hand side. So there's a lot of tools given to you to make it more pretty and readable. You can also move the location, click it. And then once the plus sign comes, you can move it. Once you want to change the font, etc., you click on it. The icons will be item properties. Then you can do it. So now we've done the process. We don't want to label everything but we've done the process. Let's export. So export as image shouldn't be clicked. I'm going to click it as a PNG format, partner map three and then what type of resolution. So if you're looking at putting it into a larger report, you have to have high resolution. So you can go to highest resolution. But if you're just sharing between friends and partners, you can give a lower resolution. So we're giving DPI which is pixels. And then once it saves, it goes to a particular location that we're given. Let's open it. And it has come up. It is loaded properly. And now you can see the entire map of India and Patna and Bihar. So you can save this map if you want. Or you could take all these data into one part and then save this project. So here it is. We have finished taking a dataset from Earth Explorer, merging the dataset into one dataset in QGIS and then using a map composer to make the elevation boundaries and maps. So with this, I would request you to try it at your own pace. The good thing about NPTEL is it gives you as a tutorial in a video format. So you can convert it and use it whenever you would like to use it. And slowly, slowly step by step you can go. There are multiple, multiple tutorials on this DEM approach. We have done it just to showcase you how this works. I will see you in the next class.