 Welcome to remote sensing and GIS for rural development. This is week 4, lecture 4. In this lecture, we will be concentrating on the specific tools in QGIS that can be used for vector analysis. As seen in the last lecture, the GIS platform or the page, the page where the image comes up when you open QGIS has five distinct panels of which one is called the minubar which is on the top. Then you have the toolbars where tools are being used for analysis. And then you have the panels where the layers and others are being stored can be looked at number three and number four is where your map document is being loaded and you play with or you do the analysis on it. And then the status bar to show how the tools are working, what condition it is and when you move your pointer, you will go through it. So let me share the page that comes up when you open QGIS. So you have a blank document when you open QGIS. As we discussed earlier, this is your minubar on the top where you have minubar or project edu, edit view, layer settings, plugins, vector, raster, database, et cetera. We will be today focusing on the vector tools today and tomorrow in the lecture series, week 4. And then we have your number two is your toolbars as you could see. The toolbars come on the top and on the left. So for some people, this would look on this side. So now if you see when it is on the left, what happens is this space is constrained. So what I do is I go click the pointer and then pull it to this area. And I have multiple other tools that I use at an advanced level. So I have that listed here. For some, this may not be the case and you may or may not use it. So what you could also do is you can see, right click on the minubar and you can see like what panels and toolbars can be added or removed. Let's say I'm going to say mesh designing toolbar and then it opens out here. I don't want it to open here because three rows are happening. So I'm going to pull it to this part and keep it. But anyway, I'm not going to use it. So I'll just remove it. What I'm trying to say is you can actually look at what is needed for you and then keep only those layers so that the mapping area, this mapping area is maximum for you. Then you have the browser and the layer panels. When you add data, the layer panels come up and then you have the number three. These are number four is your map area. So this is your map area. You can pull it to the side to increase your map area or even close these two if you want. Just keep it a minimum so that you can see the layer panels. I'm going to add data. So to add vector data, you see this V and a plus. So we have seen this V mark as a line and a point on the line in the type of vector data. So that is what this denotes. We will not be looking at all the toolbars. Again, there are multiple tutorials for this. We'll only look at what is required for this course. As I said, we'll go into the vector. But before that, let us add a vector tool to the map, vector data to the map. So I'm going to hover on the tools that you see. And one of the tool is a V shape kind of thing, but it's basically a line with points along the line. And it is a point shape file. You see a plus sign on the side. So what it means is you click and it is a vector addition layer. So you can go here and then pick what data you have from your database. But before that, do not get confused with this shape file symbol. It is also same V, but the plus sign is kind of orangish in color. That is for new vector shape files. In this course, we'll be looking at shape files that have already been created and used for general public research and outputs. So for that, I have downloaded some data. I'll click here. The downloading data part will come in other sessions where we focus on one or two thematic areas to download the data. So for now, let us look at what happens when we click this tool. It opens out a browser and all these are other tools that can be used for adding data. So the first is what we want. We don't want CSV. We don't want new shape file. We want the vector shape file. So let us open the vector. It will ask where you want to have stored your data. And since I've stored it in a file, I've clicked file. But for others, you can have database directory. Remember, in the last session, we had a directory or a database type of storage for vectors. It is called coverages or geo-database. Encoding keep it automatic because on the fly encoding will be done. And these are just default. Keep it. There's a lot of things. Just keep it as default. In the vector data set, normally this will be empty. It will be empty like this. So what you have to do is click the three ellipses, three points. When you click it, it will open your database, the last database that you accessed. I had accessed this database. You will see many, many files if you have all files. For example, as I said, the shape file name has at least six to seven, depending on the length, six to seven different extensions. So you see here, we have the India full states. And the India full states boundary as .dbprgqpgshpshx and then qpj. So one, two, three, four, five, six. Six extensions are there, whereas some will have seven also right here. But let's click it. And which one to click is important. So if you have data downloaded, I've downloaded it from the IndiaWRI's website and the IIT Bombay Mapathon website, which I will open right now so that you could also see. So in this, in this webpage, you can see here, this is an annual Mapathon event that is conducted by IIT Bombay with very key partners like ISRO, AICT, FOSI, HODRA. So what will happen is if you come here, this is an old Mapathon, the new Mapathon is coming in February 2023. So every year, stay tuned for it. And you can see here, if you come down, boundaries, state, India boundaries are given. You can click this link and it will go into this database where all the state boundaries, India state boundaries, district boundaries, and India, other full whole country boundaries are kept. Again, there is a disclaimer that we do not promote a particular type of data. And the data accuracies lies with the data provider. We are just posting the data, we are not the data creator. So if there are some minute differences in the data, please consult with the government agencies. We did not make this, create this data. We borrowed it from their website so that everyone can access it here. So the GIS boundaries layer we have. So this data is important and we will be using it for the QGIS. So I've downloaded it from that link. And the link also I will add in the presentation down now. So what I'll do is I will be adding, I'll be showing the presentation where you will have the data included for the link of the data, where you can get the data, okay? Yes. So we have, I'll put it in this chat box itself. Let me put it in the chat box so that you can see it in the writing. So what we see here is the data that we want. You can take it from the video itself, but if people who cannot see it in the video, let me put it also on the page where we will be looking at in the QGIS platform. So I'm going to put it here for those who would like to see it. The link for the India data set is given here. So you can copy paste it into your browser, click it and it will capture your data for the boundaries. So now I will go back to the layer where we are going to use the QGIS software, okay? So this is the layer and I've downloaded the data. As I said, download all the data, just download.download.shp. If you just download.shp, you are missing on the projection and coordinate systems. So please download the entire data set, which is very important for your data showing up on the screen properly. So now I'll be clicking the vector add layer and then I'll go to where I have stored it. All the, when you open it first, it will be like this where all the extensions will be there. I want India full state, yeah, so I have India full state and only the shapefile.shp you should open. When you open one, all the others will open again. So but just for simplicity, QGIS has given that option, s3 shapefile. So just click it, it will filter only the s3.shp shapefile extension. And if you look here, you have India full states. So I'm just going to click it, open and then say add, not close. You should say add and then it adds. The color is default, everyone will not get the same color. Some people will get different, different colors based on the computer's preference. But you will get the whole of India here. Now I will go into the different data sets for vector tools and other things that are available on QGIS. So if you look here on the top, there is something called vector. And not all tools will be using because some are advanced, some are basics, we will be looking at some that are relevant to rural development. For example, buffer, buffer is very, very relevant. I'm going to click buffer and above the tool is given. So you can, you can make it big so that you can read it here. I recommend you to read this before using any tool. It's like a data about the tool. It's good to run the tool, but make sure you listen and understand what the tool is about. So the tool is putting a buffer. So for example, if you have, let me close this and let's create an example. So if you have India and I'm looking at Maharashtra coastal line, I need to have a buffer for the thickness where coastal regulations can be used. So for that, you need to let's zoom into Maharashtra again, the tools and what they do, please go into some basic GIS course. You'll get to know like how to use these tools and what do they do. So I've clicked on magnifier and then I drew a box and then it magnifies. So we have the western coast of Maharashtra on this image. And what I'm going to do is I need a distance. So let's say within 100 meters, you cannot build any, let's say 500 meters, you cannot build anything on the land because those are coastal regulation zones. So I'm going to click here and then move. So around here, this is 600, but still just let's say 600, you cannot, you cannot build. Okay, let's keep it at 500. Okay. So you see how difficult it is to do manually. So this is where you can automate the process by saying, okay, this is a buffer. I mean, the buffer here is also 500 meters, 500 meters, and it doesn't look as clear as it should be. Okay. Let me open this. Okay. So what I'm going to do is I'm just going to say outline, simple line, I don't want, okay. So I have the India boundary made and just for, just for the coastal regions, I'm going to go into Maharashtra. So I will go into Maharashtra. Okay. Let's take this region. As I said, I need to have around 500 meters, no building zone. So I'm going to click here and then I have, I'm zooming in. So I'm clicking here around 500 meters. Okay. So you could, you could stop here and then say, okay, 500, 500, 500, and it doesn't look good in terms of it is not perfectly done. Right. So for this, you can automate the process using a buffer tool and that is what this tool does. If I say vector and then go to buffer, it will create a buffer along the line as per my requirements. So you can see here, it automatically picks the data set because there's only one data set, India full states with the particular coordinate is taken. And then it asks like what units do you want? Okay. So it is only coming in degrees, which is fine. You can have it in multiple different units like meters, feet, degrees, etc. See what degrees you want and then you can put it. So maybe you can put one degree for it and then segments, how many segments you want? What type of end cap? And then you can just say, do you want a temporary output which is created here buffer create temporary layer or you can ask the layer to be stored in the, in your folders where you want to create. Okay. Just for simplicity, let us add one more layer, let's say Tamil Nadu so that we can do it very small, not all. As it does take time, depending on your computer's performance, okay. And I'm going to zoom to all the layers. So you have India and Tamil Nadu and then let's do the buffer just for that. Okay. So one and then create temporary layer and then run. So it is running. Here the status also is given and then it will, it will put it on the buffer. So you can see that the buffer has been created and the buffer is one degree from the boundary. So you and at every single location, the boundary has been created. Okay. So this is very, very accurate. So from each line, there is only one degree distance and one degree is approximately 100 kilometers from at the equator. Okay. So if you do the measurement, you would see that it is approximately 1000 meters, 10,000 meters, 1000, 1, 1 lakh meters, sorry, yeah, 1 lakh meters taken here at one degree distance from this. So we are only doing it at degrees so don't worry about the units here, okay. So degree, let's see if it is doing it at one and that is one degree. So one degree at that location is 1 lakh meters. So as I said, it is 100 kilometers, one kilometer is 1000 meters. So you have 100,000 meters, which is 100, which is given as one degree. If you have to do it in kilometers also you can do it. Okay. So it's all the same. It should be 100 approximately. Since we have to zoom in to actually look into the point where the point is placed. So if you do it very accurately, it will be 100. So there's no going over and beyond. Okay. Okay. Good. So what happens here is you have created the buffer and the buffer is being placed as a tool. This is very important because even a road can have a buffer, a school can have a buffer where you cannot have liquor shops or fun shops along the school boundaries. These are rules set by the High Court and Supreme Courts, but without these special information they are not practiced. So now you can actually add these buffer layers and then practice it. So this is one layer. As I said, it can be done, but there are multiple vector tools. Let's quickly look into that. And again, there are ways you could go and learn this here. We are going to just give one or two examples and then require you to learn it by yourself. The buffer we have finished, the other geometry tool is geo-processing tool is Clip. So basically if you have two shapefiles, you can clip the shapefile to get the smallest part. Okay. So you can take two shapefiles and then where it's merging or where it is clipping, only that part can be taken out. For example, in India boundary, you can only take Tamil Nadu out by using a Tamil Nadu clip. So if you don't have the time and need to do the entire India boundary research analysis, you can zoom only into Tamil Nadu by taking it out as clip. So this is how you actually take the India boundaries and take your district out or your village out using the clip tool. And then there is a difference tool. So what is not unique between the two shapefiles, it will be taken off, dissolve actually dissolves the shapefile. Okay. So you have boundaries within a shapefile and if you don't want the lines, etc., you can dissolve it. Most of the time, the state boundaries can be converted to national boundaries using the dissolve tool. Intersection is what is common between them. If you look at the image of the tool, you can actually see the way it is being performed. So there is an intersection. So you have two shapefiles and what is intersecting? These two shapefiles will be taken out as intersection. So depending on your research team, your research idea, these different tools can be used. Then you have geometry tools. This is also very important. I'll do one quickly here, centroid. Centroid means I have a shapefile, but I need the center portion of it. Let's say you have a state and the state, we'll use Thumbnaut here again because we already have it on the layer panel. You can see the layer panel activated. So you need to create a center point to see that it is equidistant from the boundary and that is the location where you want to collect data or average the data at that point. Let's say rainfall. You have entire Thumbnaut rainfall, but you want to see what is the rainfall in the center location. So I'm just going to quickly do it. You click centroid, you click which shapefile you want to do. I'm going to pick Thumbnaut shapefile, create a temporary shapefile and then open it after the algorithm is run. So when you click run, it is done. You say close and the point has been created right in the middle of Thumbnaut. So you can click Thumbnaut to see to make sure if it is in the middle, yes it is. So this is where how you create from a shape, the center point and that is very important to, for example, you want to equidistant from all the boundaries that is the center point and mostly the capitals are kept here, logistically the capitals should be kept in a location where all the state can contribute and that is the part where you can have the capital operating logistic capital. Then you have other tools that are needed, most probably the Voronee polygons are needed. Lines to polygon can be done if you have a line graph, a line shapefile, it can be converted to polygon and also a line can be taken out as vertices, which means a line can be converted to points, polygons to be converted to line. You can break the polygon into smaller lines. All these can be done in this tool. In the analysis tool, it can count line of intersections, nearest neighbor analysis, some line segments, distance method, all these things can be done in the analysis tool. In the research tool, you can create grids discretizing your boundary. It will be used to create a grid so that you have equidistance from all the points. So it depends on your research question, again, as I said. And these are standard tools that are available in GIS. You can also add other tools by doing the plugins. We'll come to plugins later. And then you have data management tools where you have create tools, split tool, etc. So you can merge like vector layers. You can add vector layers into one layer. For example, you have a district layer and then a state layer. These are different layers, but you want to open it into one layer. Then you can put it here and then merge them so that they convert into a single layer. Then we also have your properties of these layers. So let's click on Tamil Nadu, open it up. And then if you click on properties, there are multiple data that is there. There's information about the data. Metadata is there who created the data, where the data was stored. What was the projection, coordinate system, etc., etc. Cape area length, and then the source of the data where it was downloaded. Sometimes this is empty, but most of the times if you download data, they will provide these inputs so that you can contact them if there is any questions. Symbolgy, as I said, you can create it as simple fill or dash lines based on your need. You can do it. And as I indicated again, this is not a QGIS course, so we will not get in depth on how to label, how to provide these access. Labels, we will look at it later when we are actually doing the labels. And then you have the others which are kind of advanced level, QGIS server, and stuff which we will not be using here. OK, the centroid does not have a point. So let us open the attribute table. I have told that every vector layer has an attribute table. If I open the attribute table by right clicking and open attribute, you can only see the point. Only one point was created. And it's shape length and shape area. There's no other details along with it because it was only one created. But if you open the Tamil Nadu open attribute table, you also get only one shaper because it was extracted from the all India data set. Here you have all the districts and union territories, data sets, all of them are being populated. In some other data sets, these are data sets which have been actually converted from different data sets. So let us say India districts. So if you look at here, you have a number of other columns. I have added the India district layer. And you could see that different names, different suggestions have been given. You have the first row is the first object. It is the district name is given as Andaman Islands. So let's leave Andaman. Let's go to Andhra Pradesh, which is his number two. So if I click here, the district is there. You can order it by alphabetical order or number order. Whatever is your preference, you can order it. But the point here is it has gone to Andhrapur. So if I click, there will be some box that highlights because it wants to see, so there it is. And then the whole district has been highlighted because I don't have any clicking here. So it has been highlighted because it was using that point as a selection. So if I don't select it, now what happens? It is moving. The selection is moving. So these, again, are just a very small refresher for you to look at vector data and how to incorporate it in your boundaries. You can click here again to have a bigger boundary of India. So we have seen at least one example of a vector tool with an application. Buffer is very important. We can quickly also do a centroid buffer. So let's say, as I said, we have this as a school. And there is a law that within 100 meters, you cannot have. Let's say, let's say for one kilometer. You see, if I zoom in, the point is more accurate. So I have, let's say, one kilometer. There should not be any liquor shop. So this is the one meter, but one meter totally around. So if I run the buffer, it will create a circle around it, saying that within the buffer, you cannot have any liquor shop. So we are not allowed to change this thing. So as I said, one degree is 100 kilometers. We're going to put one kilometer. So it will be 0.01 degree. And I'm going to run it. It runs. It finishes. It already created the buffer. So I'm going to put it on the top. And now you could see that around the point, the buffer has been created. And it is at a distance of one kilometer approximately. It should be exactly one kilometer, but where you get the point and the line is also there. So within this area, we propose that there should be no liquor shop, no bond shop, because the kids are getting affected. And if it is a rural hamlet, I can also say that this could be the school area catering to the one kilometer radius. So around the one kilometer, it is easier for kids to at least walk rather than walking 10 kilometers, 20 kilometers like my father did for school. So that should be avoided. You should conserve the energy in the kids to go to school. And one kilometer is still long, but at least cycling they could do within 10 minutes, which is also So with this, I'm also going to show the remaining part of the links where we will continue in the next class. We will be looking at the QGIS tools for vector analysis, especially these parts. And then we'll jump into some vector analysis in the next class. With this, I will stop today's lecture. Thank you.