 Welcome to the NPTEL course on remote sensing and GIS for rural development. We are in week 6 lecture 4. In this week of lecture, we have seen how we could look at coordinate reference system and projections to understand the conversion of a 2D map from a 3D map. We also saw that there are multiple methods to bring data into GIS out of which one is georeferencing. Georeferencing is key because a lot of data are stored in the government archives and we looked at certain websites where we could get data for free, especially the survey of India and we downloaded the data. In the last class, we successfully georeferenced a paper map which has been scanned and uploaded on the portal of survey of India. We downloaded the data and put it in the QGIS software. Now we were able to bring the map data and another data which is government of India's boundary data and then see how these two data talk to each other. Now, as I promised, we will look into the extraction of features, extraction of data and information from these georeferenced maps. So, let us continue the work that we did in the last class. I hope you had time to revisit this manual and look into the subheadings and how to do it. My tutorial through the APK lecture can also be used for georeferencing. And then in the example, we found out that we can showcase, let me open that window also that we can showcase the map in multiple ways. So, let me share the window again. So, I am going to share my screen for the GIS. Yes, now it is visible. You could see that your map, we stopped here where we imported the Karnataka boundary through the Indian boundary and we imported this map into the GIS software and now georeferenced. So, there are other things that we can do. The base layer doesn't help you to do it right now, but the base layer was kept so that we know that it is exactly in Karnataka location and the location where Tumkur is there, the Yelanka lake is there is correct. Now, the second step is going to look at how we collect data from this or what kind of data can we collect from this. So, to move on, we are going to extract data from maps. The three different types of data that we can readily extract are point shape files, line shape files and polygon shape files. These are three vector data. The data can also be converted to raster in a later stage, but we will look into the vector shape files and visualizing on Google Earth Pro. So, let's do one by one. I am going to go back to my QGIS map that we had initially worked on. Yes, the map is on now. On the top, the toolbar is mostly used for adding vector layer and raster layer. It is green in color, the plus sign. However, when you come to this, there is a yellow shape file and that yellow shape file is what we are going to use in the today's lecture. Why? Because we want to see if we could extract data in different formats. So, let's go back to the zoom out and then see where we are. We are going to put this data in the first thing that is points. Let's see what points that we can extract. You could see here there are multiple features that we can extract. One is huts, permanent temporary towers, towns, villages, inhabited desert fort. These are lines. We are looking at points, lifehouses, boys, and then telegraph office, overhead tank. See, the overhead tank is good, but you don't see it many. Maybe the map has not been updated from 2011, but we can definitely see post offices. So, let's do post office because almost all villages or location of villages together will have a post office. So, let's look very nearby what post office is there. Actually, you do have some blue dots and the blue dots refer to here. Welles lines. So, let's do wells. Welles is also good for rural data mapping and here we have a lot of wells and then this is an overhead tank for the water supply. A triangle is given as wells. So, you have made like this wells, lined, unlined. So, these are different lines and lines. Tubeless is given as triangles, springs, tanks, perennial and dry. So, the dotted is perennial and dry is a dot. So, let's look at wells, which is lined and unlined or tubeless. Tubeless is good. So, let's go and the tanks. So, for this we need to create a new shapefile because we don't have a shapefile for this image. For example, if you go here and look at the properties, it is just an image. You don't see other data here. There's no attributes associated and there is no pixel value. For example, if I click on this pixel, for the India full states there's some data but here it's just bands. Band 1, band 2, band 3 and what is the color of the band? Because it's purely a color. There's no data as such taken out. It is an information or image. So, we have just taken a scanned image. So, let me go back and then clear the selection. So, I have this and then now I will close this window so that we have more a state to play with and here. So, I'm going to just for the time sake and looking at the data, we will look at these tubeless in this village area or we can even go up in the northern part where there's more lakes and tubeless. So, tubeless is what we are going to use we are going to use tubeless for this sake. So, what we will do here is we have seen multiple legends but we are going to only use tubeless. So, I'm going to come down and then go to the same location where we had tubeless and then I'm zooming in. So, here is where I'm going to zoom in and I'm going to make a shape file. So, now the first one we're going to make is points. So, the points how I'm going to make you have these plus mark and yellow. So, you can hover your mouse on top of it it says new shape file layer. So, let's click that layer and then a new shape file window opens up it is opening up in a different window. So, I'm going to close it again and open hopefully to see it open here. Yes, now it's opening in your screen. Now, what we're going to do is we have to name it. So, let's name it wells. So, well locations wells underscore tanks for this geo location but more details you have to give but just for now we will say okay let's say even that D 43 power 12 which is the sheet number. Okay, by encoding is default is fine. The geometry type is points, multi-point or is it a line string polygon. So, there's three types, multi-point is just more points per entry. We don't want to do that for now because how many how do you assemble five wells into one that you can have a village boundary. So, I'm just going to click point additional dimensions nothing is needed. The default coordinate system is the same as this coordinate system. So, you can keep the same coordinate system and now the table. So, now I've created the file but inside the file I need columns. Okay, the default is the first column which is saying that ID ID is the serial number. So, let it be default and we need name right you want to name the well ID or something. Okay, so name could be underscore well ID or you can just say well ID well ID okay and what type is it a text is it a whole number is a decimal number or date since we know that we are going to label it we are going to put a name. Suppose you're going to add a date of when you're going to collect the data you can put the date there for example everywhere you go and measure the water level. So, that it could be a numeric value okay let's do that for the sake and then we say well ID and we have text is the thing length of the text is 80 there's no precision for text so that is it yeah and then we have to click this so add fields to list now the field has been added okay. So, one more let's add diameter of the well in meters underscore meters okay yeah it could be an open well that well you well that's fine okay and we know that it is not a text data it is a number we'll keep it whole number and there's no precision if you do decimal number then you have to say how many decimals do you want let's keep decimals and two okay so then we have length is 10 not more than that and then you add so we have three attributes in our attribute table and each feature will be now added okay so if you want to remove anything you can click remove now we're good to go so I'm going to say okay so now you see the shape file already in my system so you can see it being populated in my layer file but if you right click and open it there's nothing there's no data on it okay again it's opening on a different window so please allow me to open it again it should come up it's not coming up so I'm going to do it again so it's not allowing to open up so let me reshare my screen I'm going to stop share new share and then okay good so now I'm going to do this again go to here right click and then slowly open attribute table it's not letting me show my attribute table but I think I have another way so I'm going to do a new share and then first my screen okay so now it should be visible open attribute table yes so this happens normally when you have multiple screens so that's another trick in QGIS if you have multiple screens and working as most GIS professionals work with the table moves up and down okay so make sure you understand where the table is and sometimes it will be minimized and kept at the bottom okay so if you if you lose it again the best way is to open it again you'll open it and now you see that id is there well id is there diameter is there but there is no entry features are not there because we never input it now we are going to use the map the the paper map that we georeferenced into a geospatial data okay so we're going to input it now let's see how we're going to do it so I'm just going to keep it small so that you can see it here okay let's keep it this side okay and this is the part we're going to work on right so you will see this part also so you have the two two things coming here right now you see this yellow pencil it's called toggle okay so if you want to edit a table you need to first turn it editable if you don't turn it editable it will not be edited this is a protection in QGIS to make sure that no one edits the numbers without permission let's say for example I'm opening the attribute table here I have the shape within shape area so if I click and then type any numbers it doesn't work because it has been locked okay so now what I'm going to do is you have to unlock the table so for that you have to click this yellow pencil I'm going to click it now toggle has been turned on now you could easily put down the well details so now you see here there is a well what I'm going to do is we're going to go back here let's first take out the toggling so no edit has been done so this is about awning and turning off the toggle then you go back to toggle just this layer so you're the pencil coming up once this pencil comes up you can see this getting populated because it's a point file there is a point toggle that can come up okay so we're going to look at this area as I mentioned shiva quote mother gali mother nangir halli etc and we're going to add so if you open the attribute table for this you see that it is empty we didn't add any details yet so I'm just going to close it for now and still the pencil symbol is on and then I'm going to click the add point you can add a feature point or you could move a feature point but let's add for now and then I'm going to see this shiva quote well so let's click it once you click the shiva quote well the small table comes up as I said the id the id is a default number let's put one for the shiva quote and then you have a well id okay the well id we said name you see if you type numbers also you can give numbers plus a name but we can just give because we already gave a name so let's type shiva quote well okay well shiva quote one so shiva quote one is the well id and the diameter in meter is 2 meters 2.1 meter for example and here if you type your text it doesn't work so I'm now typing text it doesn't work it only takes numbers because we have declared it to be only numbers in the string in the string some numbers can be converted to string as a value it's not it's not going to add and delete but here diameter can add so now if I click okay and go back to your attribute table you could see that the first entry has come up right so the idea is to populate from the map a data so now you can see that the point has also come up so let's do another one here I'm going to click this is number two and this is a shiva quote second well and maybe the diameter is 1.7 meters 6 meters let's say and then say okay so now you see a point there also to see the point better I'm just going to remove this image for now you could see the two points coming up right so those are the two wells that have been populated let's add one more here and this we can have this as 3 and then the name is mother really early just from the map okay and number one and then the diameter is two you can say okay so now we have added three points right so these three points are very important to look into the attribute table and you can see in the attribute table we have the three points as point files if you click the pencil again or save without saving it will ask see we have edited the file we have created a shape file we have looked into the map and then say okay this is where I want this is the well I want from 2011 okay so then you will shift it shift the data into the table that's what we have done we have added the table um populated the table we'll add one more just for the region okay so let's say this one is another one I'm going to click here it says ID 4 mother early early okay so we have four wells done now you can go and see this has populated up so it says save layer edits or stop editing okay so if you want to save you save or you want to go back you can go back if you accidentally press this yellow button which says stop the toggle stop the editing it will ask do you want to save the edits or not see if you can see it's asking you want to save so the first step you should do is always save your edits if you are okay with it now if you saved it you can close the pencil the pencil symbol goes off you can go and open your attribute table the table has been populated so now if I click anything now I'm typing and clicking it doesn't change why because the toggle button is off if I toggle it on again see now I've toggled it back again on again this this symbol comes up and this can be edited let's see let's show you for now this this has been I accidentally deleted it okay so oh I made a mistake how do I go back don't worry if you press this toggle again it'll ask do you want to save the changes say no I don't want to save the changes so discard and your name comes back again okay so let's do this again I'm going to say I'm going to add underscore for two and then I say save edits it saves edit okay I toggle off the button it's okay but now if I toggle the button again and then this goes off so you will delete it save it and then close the pencil so this is how you would create a .5 in qgis and extract from the image any image so this is the same thing you'll do for drone image photograph image and this is the image that you've taken from a paper map first thing is to make sure the images are geo-referenced most of the images are geo-referenced so you don't have to worry if it is from the drone or a GPS handheld camera but scanned images like this needs to be geo-referenced okay so this is the first step in the next step let's look at a road okay this is a road as per the definition the yellow lines I'm saying let's double confirm these are the yellow lines with red boundaries it could be a different road all together but let's double check yes here okay so it says it is rose metal according to importance okay so if it is important roles it's bigger if it is less important smaller that's what it means so we have three so but it's still good for us we are going to use it for our this region Shiva court okay so let's now go to the next step of the shapefile what shapefile do we need we need a line shapefile and in the line shapefile again you go here to the to the yellow button you click the yellow button let's say we're going to say roads is the name of the file and we're going to do the same thing d 4 3 r 1 2 yeah and then geometry type is line string okay it is a line not a point the coordinate system is the fine it's the same thing and id number is already created so what are we going to say we're going to say road name right road underscore name is one thing it is a text data there is no precision let's add it maybe one more thing we can say is road width okay so this road width may not be available from the map but when you're going in the physical world and and taking a measurement you can do it since it's a number I'm going to put decimal and then precision as again two let's say meters road width underscore meters okay there is a limit for the name length so let's say road uh road underscore width because it's anyways around the shapefile is around right in meters okay so we have added that layer now if we open the layer add a new field so you can see that uh you can have uh new toggle columns add feature okay so add feature comes only when you add the pencil thing and the add feature it can also be a value that you can put okay so the best way is here so you have a new field which turns on because of the pencil or you can delete a field so as I said the new field is road width I want it to be with meters you can add a comment about the field like what is it okay measurement of the road and then you say it is going to be a decimal and it is going to be six and two right when you click okay now it has been created now I'm going to close this but not save it why because we're going to do the add features now so you can add features in two ways if you go to this layer again open attribute table I can add it physically physically the id name and stuff but it still needs a location right so for the location what I'm going to do is I'm just going to first save my edits and toggle off so there's no value now I'm going to toggle it on again the pencil is on and I'm going to draw so now you could see that this line tool has come up add line feature so I'm going to click it and then say this is one road you could see that I am drawing um and the line is retracing this so I'm just going to click here when you're done right click this thing will come up to say which is the id so the id is number one the road name is shiva fourth main and then the width is let's say five meters okay let's say okay now if I go to the attribute table you will see the first legend put in so let's add four more like we have done in the past so this is one road which has come up to here and then I'm going to click another road and then I'm going to say two id shiva fourth two and then width is smaller than the other one let's say three meters and say okay I can see it properly so what you could do is also right click go to properties and make the line thicker okay so the line color could be somewhat red or this color so that the map can also see and then you can close it okay so just say okay and the width is too small let's make it one and then apply say okay now you could see the line coming up big correct I want to see the line otherwise maybe in the screen it might not be visible good we have done two let's do two more on this side so until here I have drawn the road and this is a bridge so let's leave the bridge and then let's draw this road so I'm just going to click right click uh first left click and click on the buttons and then right click it it'll open the feature id name and this is going to be one okay and this is thicker road so let's say four meters and say okay and now you see the line has come up just to show how the line has come up I'm going to take it off and you can see that three lines have already been come up now I'm going to finish it off with this line connecting it to a house so one two three and then right click it becomes four mother nearly two and it's a small road let's say one meters very small and it's done okay so now we have populated a line a point and the last one is a polygon I will do the polygon in the next lecture but before that we have to save it so let's save the edits I'm going to click save edits and then turn off the pencil and now you could see the pencil is gone these two have each have four four data so you can see four data uh the first one is not okay we need to delete it because I typed it and then it didn't work sometimes it gets stuck so don't worry just close and do it again it will work let's delete this entry so you see I've clicked it and then it says you can delete a field this is a delete a field uh or you can delete an id okay so uh let's yeah and then you can see delete correct so there is a delete selected features I'll say delete I just need four uh there's only four values so what it also means is that uh you have one two three four also means is that you cannot just um create a value uh in the attribute table you need data for it but still because you put uh the the toggle switch on it will still look at the value the interesting part is even without a geospatial location uh it will still exist okay I'll show you how okay so you have this now we have again let's open it first let's close the toggle now I'm going to open it the first id is gone because we deleted it we have four right so I'm going to click it and then um we're going to add one more feature okay so uh you can go here and add a feature so let's say I've added it let's say I have feature id five uh x y z is the name and then one uh width is there I can close it but if you look at the road there's only before because there is no spatial location for this okay so I'm just going to close it and then close close it just to show you there's no pencil so there's no editing now possible I open it and you have the fifth one but where is the fifth one right so if you if you zoom in to see the fifth one you will not see I'm going to show you something um uh just to take out the image uh okay and then we have the attribute table right so now if I click this you see it's coming yellow if I click this this comes yellow right this is the third entry this becomes yellow and then fourth entry becomes yellow but the fifth entry which was initially not drawn for this because there's only one two three and four it will retrace it right so what it does is it retraces the last entry and or it doesn't have an entry so there is no entry for it unless and otherwise you give an entry it will not come yellow okay so you have one first road second two road third is the third road and fourth is this road and five there is no road so it is a error and this is how you should also clean attribute tables if needed so I'm going to open it open the pencil click on delete delete that row save save button toggle off and then I close okay and add the layers back as I said we will stop here and then do the other part which is the polygon in the next class and then apply it on the model thank you