An Absolute Beginner's Guide to QGIS 3

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to another tutorial now in this tutorial we are going to discuss the basics of qjs now as you can see from the title it's an absolute beginner's guide to qjs now if you have been looking for an open source option to esri's arcgis something which could offer almost the same level of functionalities or capabilities which does not really require a subscription of let's say hundreds of dollars then i guess you don't have to look any further qgis is definitely your solution because qgis offers wide array of functionalities just like arcgis and sometimes the functionalities can even be better because of the immense flexibility that we have with qgis so as i said if you're just diving in to perfect your qgis skills this tutorial could be an excellent introductory tutorial so stick around with us to see what we are going to discuss in the coming few minutes now these are the major things that we will be discussing in this tutorial first i will be showing you how to install qgis and then uh i'll give you some sort of an introduction to the to the general interface the qjs interface then we will discuss how to work with the vector data in qgis such as shape files also i'll show you how to install an additional plugin such as openstreetmap and then we will discuss how to work with raster data in qjs and finally before wrapping up the tutorial we'll try to create a map using qgis which can be in a publishable quality and the things that we're going to discuss today is going to be sufficient for you to just get started with qgis and of course there's going to be a lot more to explore and from time to time we will also be publishing qgis related videos in this channel so if you are looking for a good starting point for qjs then you guys don't have to look any further so if you haven't subscribed to this channel yet then it's a good time to just go and click on that subscribe button so that you will be updated instantly whenever we upload a new video on this channel so without further ado let's go ahead and get started with the tutorial [Music] so first in order to download qjs this is the website that you have to come to www.qjs.org en slash site and from here you can go to download now and in here you will see different options that we can actually download from now if you are using a windows pc you can definitely look into these options which are under download for windows but if you are using mac or linux you can actually just have a look at the other options as well now since i'm using a windows machine i will go here now what we're going to do is we're going to install qjs as a standalone software so you can either go for the latest release which is apparently richest on the features now as of today the latest version of qjs is 3.14 as you can see over here qjs 3.14 pi version was released on 19th june 2020 and but if you're looking for something much more stable they also release a long term release which at the moment happens to be version 3.1 now i would usually go for the long term release the most stable version but uh for this tutorial let's go ahead and download the latest release which is richest on features now i'm using a 64-bit pc so i'm going to go ahead and click on this qjs standalone installer version 3.14 64-bit and after that the downloading process will begin once the file is downloaded you can just click on that to begin the installation yes now as you can see the version that we downloaded is qjs 3.14 the pi version which is the latest version as of today i'm going to agree for the terms and the destination fault i'm just going to leave all of them as default and over here we have the option to download some data sets that we can actually work with if you're just getting started with qgis but i guess the data sets that we will be providing through this channel through our tutorial will be equally good for your specific tasks uh for the tutorials that we are going to discuss so i guess we don't necessarily need to tick these because we won't be needing those data sets in any case and we can just go ahead and click on install and we'll click on finish once the installation is done you can simply go to your start menu and you will see that it appears over here qgis desktop 3.14 with grass i'll explain to you guys what this grass is in future videos all right so i'm going to click on this so if you're just getting started you can simply go to this new empty project either you can double click over here or you can even click over here this new project or you can use the keyboard shortcuts control n in order to begin a new project so i'm just going to double uh double click over here and that will bring up an empty working space for us so this will basically be our working interface of qgis now let's get to know about these panels a bit before we proceed on to the further steps tips over here you can see the browser panel now as you can see that there are multiple options under this browse panel now basically as a beginner to qgis you'd be using this browse panel quite frequently in order to just navigate to your data for example you can see it shows you the drives over here cdef so let's say if you have kept your data inside this one of these drives you can just double click over here like this and from here you can actually navigate to the place where you have saved your data now for this tutorial as you can see the first option absolute beginner's guide to qgis and if i go to data you can see that i have two files called raster and shape files now now let me go ahead and open these shape files and as you can see over here we can navigate to the files through this browser just like that now if i were to open those files separately i have navigated to the same folder location and inside data you can see that we have two files shape files these are actually the files that you see over here so just remember that if you want to navigate to the place where you keep your files or just to access them quite easily you can simply use the browser panel now in case for some reason if the browser panel is not active in your working space you can simply go to weave and panels and from here you can activate the browser panel now if i click on this it will deactivate the browser panel i can go to panels and activate the browser panel now in case if you have if you if you have let's say if you're dealing with loads of data then it would be handy to actually have a second browser panel sort of a copy of the first browser panel so that's what has been enabled for us through this browser within brackets two option that'll kind of create a second panel an equal second panel from which you can actually access maybe a different folder or a different database that you have kept your data in and then drag data into your working space quite easily so for us since we're just getting started i think just one browser panel would be sufficient so i'm just going to go ahead and close this and next is the layers panel once you import the layers which we are working with into qgis all those layers will be appearing in this layers panel over here again if you cannot see that you can go to weave panels and over here you can either toggle on and off the layers panel and as you can see there are actually other few panels as well for example this gps information or if you want to activate another panel like let's say advanced digitizing something like this so you have the flexibility of switching on and off the panels through this option which i just talked about so i'm just going to get rid of these uh additional panels which i added just now yeah i think we better have the layers panel as well so i'll just go to weave panels and keep the layers panel here and on the right side you see one panel called overweave and also we have the processing toolbox now this processing toolbox will be will be used quite quite frequently for tutorials because it contains quite a lot of tools which we can use for different geoprocessing tasks and similarly in case if you could not find it here you can let's say if it looks something like this you can again go to lay weave panels and over here you can activate the processing toolbox like this so that's a quick introduction to the panels now similarly something that we would be equally interested in discussing would be the tool bars now what you see over here in the in sort of horizontal formation b is called as a toolbar now i can simply drag one toolbar and drop it over here so this entire thing is actually sort of a toolbar which has been designed for certain function certain dedicated function now to access the tool bus to activate or deactivate the tool bus you can simply go to weave and toolbars and over here you can actually manage you can decide whether to show the toolbar or not now for example if you think that you don't want to display this particular toolbar now the name of this toolbar is cue water so if i go to this queue water and deactivate that you will see that the toolbar actually sort of disappears now similarly you can actually hide show and hide the tool bus even the major tool bus as well for example this data source manager toolbar it's basically one of the main toolbars that you will be required to have when you are sort of doing a basic geoprocessing task so in case if you decide to deactivate that you can simply click over here and deactivate it and similarly you can just activate it back simply by hitting this check button over here now we'll we'll discuss in detail what each of these toolbox also actually do for us but i guess for the time being the explanation which i provided on the on the panels and the tool bus is actually quite sufficient just to navigate around qgis all right next we'll talk about how to work with vectors in qjs now as you can see over here once i have navigated to the folder which i have saved all my data you can see that there is one option called shape files now again if i pull up this actual fold which contains all of these data you can see that we have the shape files as a dot shp file if i check the file type over here it's dot shp but for each shape file along with that dot shp there are other files as well such as this prj file which contains the projection information and dot dba file which contains the attributes information stuff like that but when we open it from the browser panel over here it actually shows only the item which is of interest to us which is basically the dot shp file through which we can access that particular shape file so one of the easiest way to add a shape file into our qgis working interface will be to browse through to the place where you have saved your file and you can simply drag it and drop it over here now this is shapefile which shows uh one of the areas of interest that which i have demarcated uh for the for the purposes of this tutorial and as soon as i added the layer you can see that on this layer panel this area of interest layer sort of got added into the layers panel as well now if i hover my mouse over this you can see that it shows some information it shows the location where the file has been saved apart from that it also shows the projection the current projection which is which the file is in which is epsg 4326 and if you would like to know a bit more information about this what you can do is you can right click over here and go to properties and from here just click on information in case if it's not already activated and this information from provider is basically some basic information that you have about this particular shape file now you can see it's a it's an s3 shape file and it's it's of geometry polygon and this the coordinate reference system is ephd4326 which is the wgs1984 geographic coordinate system and also it shows the extent in terms of decimal degrees as you can see over here and also it shows the path where the files file has been saved now in addition to this polygon shape file i can also add other shape files such as this hospitals let's drag it and drop it over here now that shape file is of the geometry type point now if i again right click and go to properties you will see that the geometry type is point but apart from that the other information such as the coordinate reference system and also the path and also the storage type uh it's all the same now in case if you would like to change the color of these points you can see that now it appears in sort of or sort of an orange color which is quite similar to this uh to this color by which the the area of interest has also been displayed so to change the color you can again go to properties of the layer and you can go to symbology and over here you can see that under this marker option we can select on the simple marker and from here you can select the color that you want now let's say i want to select something like a shade of a blue so i'm just going to adjust the color panel in such a way that i can actually select corresponding shade of a blue for my point and then click on apply and you can see that in the background as we click apply the the settings get get applied immediately now there are other functionalities that you can actually play around with as well if you select on this heading marker you can see that there are actually other types of markers also that you can select from you can see that since we are talking about hospitals we can even opt to use this topo hospital mark as well if you click on this one and click apply you can see that the i can change to a to a standard icon which is used to depict hospitals all right i'm going to revert it back to maybe black dot and maybe select the color of the dot manually something like this and also if you think that you need to increase the size of this dot you can simply increase the size like this or you can decrease the size like this click on apply and you can click ok now another thing that you might be interested in knowing is actually what this what each of these points refer to now one of the easiest ways of knowing that would be simply to go to that particular layer and right click and go to the attributes table because this attributes table is the location where all the corresponding uh data pertaining to each of these different attributes have been saved now if you're taking if you're getting these shape files from different sources now there's a good chance that those sources might include the corresponding attributes in a very descriptive manner now that depends on your data source for this example over here you can see that it shows the name of the hospital over here and the city now if you would like to know which point corresponds to which what you can do is you can simply click on one of these attributes like this and that will sort of highlight now over here you it might not be that apparent because the highlighting color is actually yellow so when i click on this london welbeck hospital you can see that that hospital over here the point over here gets colored in sort of highlighted in yellow now if i click on the second one you can see that this second particular point got highlighted similarly the third one fourth one saint mary's hospital and the fifth hospital over here and you can also highlight multiple hospital let's say if you want to just have a quick look at cromwell and grand union health center is so you can just hold down control and select item number three and five so that you can see that those selected items actually got highlighted over here all right so in order to deselect everything that you have selected all the attributes that you have selected you can simply use this deselect all features from the layer button and that will deselect everything just like so similarly if i go to this area of interest and go to this attributes table let's see what it says yeah it just says that it shows the id number and the description which is the area of interest and just say it's in it's in london under the city column so we have another shape file to import let's say if you want to import this major roads we can simply drag it and drop it over here now again as soon as we import you can see that the line is actually not that apparent uh you can use your mouse wheel to scroll in or to zoom in or out now if you scroll up you will see that you will zoom in but if you scroll down you will see that you will zoom out but similarly you can use this zoom in button actually to highlight the area to which you would like to zoom into like this or you can do it a bit better like this and you can switch back to this pan tool just to pan it around coming back to the thing that we discussed on the major roads shape file over here you can see that the file is the the line is actually not that apparent so what i can do is i can go to these major roads and go to properties and select under symbology select this simple line over here and i'm going to assign let's say black color for the line and i'm going to increase the stroke width to maybe about 0.66 and let's see how that looks yeah you can see that now the the line which corresponds to the major road is actually quite apparent now or if you would like to actually add a different style you can add maybe a different style from here as well but for me i think this styling would be sufficient for the purpose after that i can go to the attributes table and have a look at the attributes as well yeah it shows the name of the city which says base water rod and city is in london now you can see that in qgis we actually work with layers we still can do the things that you that we would normally do when we are working with layers such as swapping the the position of the layers just see what happens when i select on these major roads and hold my left mouse button and when i drag it down and release it you can see that the major road shape file actually went behind this area of interest and it's not visible anymore because now it's behind this area of interest now if i deactivate it using this check button deactivate the area of interest you can see that the layer is actually behind and similarly if i if i push this hospital below this area of interest layer you can see that that saint mary's hospital which was over here now actually appears now actually disappears because that layer is behind this area of interest let's see that if i got rid of this fill color for this area of interest i would still be able to see everything isn't it so we can still do that simply by going to properties now over here just keep in mind that we are working with the polygon item so we can go to simple fill over here and over here symbol layer type under symbol layer type just go to outline and simple line so that means we are going to specify only an outline but not really a fill color and the outline let's say i'm going to specify a certain color which i would like to have for the outline and maybe increase the thickness a bit and when i apply you can see that the fill color sort of got disappeared and instead just the outline is retained now it shows our area of interest and some locations of some hospitals as well as the extent of the of this major road as well all right now let's learn how to add some labels into our workspace so if you can recall the attributes table of these hospitals if i open it back you can see that it contained the name of the hospital under this column name so it would be actually quite useful if we can actually display those names in this mapping interface as well and that's quite simple you can go to the particular layer now if i want to display the name of each of these hospitals you can select that particular layer from here go to properties and over here you can go to labels and right now it's saying no labels because as you can see from the map there aren't any labels that are getting displayed so i'm going to go and select single labels from here and we have to select the particular value now again if i open back the attributes table let's close this and go to attributes table from here you can see that the corresponding name of the hospital is under this name column now this is the value that we are going to actually choose because if we select let's say city all the labels that appear will contain the name london but that's not that that's not what we want we want the actual name of the hospital so which is under this column name name so i'll go to properties again and go to labels select single labels and from here select the column name under which each and every name of the hospital was contained in and from here you do have some text options as well you can actually go ahead and select a different uh font from here and you can select different styles now but for the time being i'm just going to actually stay with the with the default text and after that when i click apply you can see that the name of that corresponding hospital actually appears right beside the the point feature over here now if i would like to increase maybe the size in terms of the text you can go to the size and also you can change the font color if you wish to let's say we will go with red color and click on apply yeah and click on ok now you can see that we quite easily managed to add the name of the hospital into our mapping interface as well now you can do the same thing for the for this rod shape file as well but i guess you got the basic idea of how to do that so i think this is good enough for the for the time being i've told you guys so far that we are working in an area which corresponds to london because that's what we got to know from the attributes table now wouldn't it be nice to actually have some sort of a base map let's say something like an open straight map which we can use in order to uh sort of uh and as a base layer so that we can know geographically where our area of interest is placed at and also where exactly these hospitals are sort of located with respect to that base map now in qjs one of the easiest ways of adding such a base map is to add an open straight map through the external plugin called quick map services now i think you will get to know when we actually proceed with the much advanced geoprocessing tasks using qgi is that the fresh installation of qga sometimes not necessarily might include certain functionalities that we might need in order to get our work done so that's the point where we turn our heads into external plugins now the reason why qgis might not come with all the external plugins installed in it is for starters it will be actually a waste of space because we will be using those additional plugins only for specific tasks depending on the task that you're trying to achieve from qjs it's better to actually just go ahead and download that particular external plugin from the repository now for example since we are trying to add an open street map base layer one of the easiest ways to do that would be to first go to manage and install plugins over here and from here we will search for quick map services in this plugins window you see that we have the options to see what are the install plugins and what are the not installed plugins but for the time being let's go ahead and search for quick map services and you can see that we have one option called quick map services which we can directly install into our qgis existing qgis interface now you have some sort of a description over here and some information about the author this plugin was created by next gis and what we can do is we can simply go go ahead and click install plugin and while you do that just make sure that you have a functional internet connection so that it will download the corresponding files for us and just in a matter of seconds it will install the plugin for us after that we can just simply close and then you can go to web quick map services which you just installed and go to osm over here and you can select the osm standard which is the standard open street map and as soon as you do that you will see that it will place the base map behind our area of interest and from here you can very easily see that now we are working in an area which is quite close to hyde park we can just move the map around and see and it's this sort of confirms that our area of interest is actually correct you can see that area of interest has been demarcated somewhere around the boundaries of hyde park as you can see over here along with an additional area over here and one of the cool things is that this osm standard map that you just added is not only for the area of our interest it's in fact not only for the country that we are working in it's for the entire globe actually as you can see over here if you want to zoom back to the place that you are working in one of the quickest ways that you can do that would be to go to your particular layer right click on it and select zoom to layer and as you can see it took us back to the area of interest one more thing to note is that the code the current coordinate reference system of the project now if you draw your attention to this lower right corner you can see one epsg code in this case the epsg is 4326 that's the wgs1984 geographic coordinate system now for certain cases depending on our requirement we might actually change the coordinate reference system now in this tutorial i'm not going to go in deep and talk about the different coordinate reference systems because that's actually a topic on its own so i'm going to reserve one specific video probably in a couple of days only for that matter only to talk about the crs the the projections and that sort of thing but for the time being just understand that right now your layers and your project both are in the same coordinate reference system which is wgs 1984 geographic coordinate reference system and this is how the open street map looks under that particular coordinate reference system now in case if you would like to have sort of a clean top wave of the map one of the most commonly used projected coordinate reference system is the web mercator auxiliary sphere coordinate reference system especially for base maps like this so what i'm going to do is i'm going to go to i'm going to go ahead and click on this button over here and that will open up the project properties for me and under that i'm going to select the crs which is the crs of the project not the individual layers and i'm going to search webmarketer auxiliary sphere as you can see over here it already appears either here or even you can see under the predefined coordinate reference systems uh wgs 1984 web marketer auxiliary sphere this is the coordinate reference system that i'm going to actually like to activate now for my project and when i click apply you can see that now the weave actually changed a bit now it's sort of a more clean top wave which we can use to very easily visualize without that tilt that we had with the previous coordinate reference system and now even you can zoom in and quite easily see what sort of streets that we have within our study area within our area of interest as well as beyond our area of interest and you can see different elements now within this hyde park area as well all right so far we made use of certain shape files which were sort of provided to us now in this tutorial i'm providing these shape files to you guys so for you i'm i'm going to be the source so for you guys these shapefiles are provided to you by someone else now what if you want to create your own different shape files now for example let's say i want to create some elements that covers or some shape files that cover these water bodies within the hyde park itself let's say when when i zoom over here you can see i have there's one round pond over here and we have the serpentine over here and we have the long wood over here and if i zoom in a bit you can start seeing that there are how many one two three four five small sort of uh pond kind of water bodies as well so if i want to create maybe different shape files for each of these different water body or just create one shape file which has polygon elements which also will contain all of these attributes as well now how can we create such a shape file that's what we're going to talk about next now especially when we have a base layer like this and when we try to draw on top of the elements that we can see on the base layer we call that process as digitizing so right now what i'm going to do is i'm going to use this open street map as my as my base layer and i'm going to digitize and through digitizing i'm going to create a number of polygons which i'm going to attribute to each of these different pawns and through which i'm going to actually create one shape file called pawns water bodies in hide park so that's sort of a way of creating new shape file new polygon shape file new polygon line or point shape files doesn't matter which one you need you still can make actually all of them depending on your necessities now as i said for this example i'm going to create polygon shape files which corresponds to the water bodies near height bark as you can see over here so the way to do that would be you can go to layer and create layer and you can create new shapefile layer this new shapefile layer dialog box opens up you can provide a name for your file just to proceed with but if you if you would like to actually make your shapefile sort of a permanent one not in terms of its uh attributes but just in terms of the shape file being a permanent share file you can actually save the file in the same time into the place that you would like to save it to as you can see over here i have navigated to the to the same folder which i have kept the other shape files and now i'm going to go inside the shapefiles folder and i'm going to create one shapefile called let's say water bodies and this file type you can see that by default it's s3shapefile.shp all right now the file encoding you can keep it as udf8 and the geometric type now if i'm trying to pinpoint certain things i would be just adding points isn't it so in that case the geometric type which i which i should be selecting is point now if i'm trying to digitize maybe a road something like this or maybe these small foot parts inside the park much better way to do that would be to add lines but now since i'm trying to cover an area in space cover the pawns i'm going to select polygon all right and the coordinate reference system you can keep the wgs 1984 coordinate reference system like this and over here we have the attributes the things that we would like to include in the attributes table now by default there is one item called id i'm just going to select it and get rid of it because we don't really need that when you're normally creating let's say different points one thing that that you will have for sure is the name of the font so i'm going to create one attribute called name and then we have to select what sort of data it's going to be now let's say if i put something like area then the data is going to be in terms of maybe decimal numbers or a whole number isn't it but when i'm specifying a name my data type is going to be text so that's why i'm going to select text over here and the length actually you can select the number of characters to be any number over here but uh as you can see it's not going to go beyond a certain number of characters but just to be just to be on the safe side maybe i can put something like 100 so that that particular text box will allow allow 100 characters to be filled in and after that after you're done with this you can add to the field list all right so apart from the name i can maybe add something like the location because we know that all of these are actually located in london but it would be actually good to add another column called location and that's also going to be text data i'm going to leave it as it is and maybe i can select each item by a number let's say item number one item number two three and so on maybe i can create one more column called item and instead of the numbers being text i can actually make the numbers to be whole numbers isn't it so i'm going to select whole numbers and the length yeah i'm going to select it as 10 because over here we just have around how many one two three four five six seven eight about eight items so i'm going to keep the length to be 10 and i'm going to add that into the field list as well all right from here i'm going to click ok now you can see that it created for us a new layer called water bodies over here which which does not really make anything appear on our map because this do not have any attributes if i go to the attributes table over here in water bodies you can see that it's just the three columns which we created but at the moment we do not have any attributes and by digitizing what we are going to do is we are going to create different attributes now this by itself is actually a shape file which you just created but an empty one you can again go to properties and maybe assign a proper color for that you can go to symbology and simple fill maybe you can assign something like a lighter blue because now we are talking about water bodies isn't it so i can select apply and the straw color also i can maybe put the stroke to be a bit of a dark blue so that whatever the shape that we create it'll sort of appear in this manner as you can see over here they show an example over here how it's going to appear now let's see how we can get started with digitizing and creating new attributes to our shape file what you can do is you can simply right click over here and select toggle editing all right when you do that you can see that even the button that's over here in this toolbar gets activated that means right now you're in the editing mode of that particular shape file now the way to add attributes would be you can go to this add polygon feature over here and you can see that your mouse cursor actually changes right now so you can zoom into the place that you would like to digitize and you can use your mouse button to scroll in or out and after that what you can do is you can simply start drawing by first initiating your clicks by clicking on the left mouse button and you can draw like this covering your area of interest so now what i'm doing is i'm just basically digitizing the round pond over here like this well you can always zoom in and out and try to be more accurate with your digitizing work yeah once you almost reach the end point you can right click on it to sort of uh wrap up your digitizing work and that will open up these three items that we just created so i'm going to provide the name as the round pond and the location is going to be london and the item this is item number one what happens if i try to add some text over here instead of adding the numeric number one if i try to type one you can see that nothing happens because this doesn't accept any text characters it only accept numerical values and even among numerical values it will exit only the whole numbers because we selected the type to be whole numbers for the time being i'm going to stick with one because this is the first item that we digitized so and you can click ok and now you can see that the corresponding attribute appeared over here and if i go to the attributes table you can see that now we have one attribute which is the round point so similarly just keep in mind that you are still in the editing mode so you can actually proceed with the other digitizing work as well so i'm going to digitize the serpentine now in a similar manner again you can be quite precise and accurate when you do your digitizing by zooming in and out but since this is only for the purposes of demonstration i'm just going to sort of run through it fast yeah once you are done you can right click on it and add the name serpentine the location is going to be london and the item this is item number two which we digitized all right if you zoom out you can see that the two attributes which we digitized just now the round pawn and the serpentine now i can proceed with the third item which is the long water water body over here start digitizing just like we did for the previous cases and when you need to do it more carefully you can always zoom in all right now i'm going to make a mistake on purpose so that i can see how you guys can correct it in case if you happen to make a mistake on the way i put my vertex somewhere over here by mistake all right so don't worry much just continue digitizing as you would normally do for the other parts and once you're done you can add the name the long water location is london and this is item number three all right now you can see that we have the three items but with an error over here which i'm going to show you how to correct but before that maybe let's proceed with the other five water bodies as well i'm going to name these five items as pond number one two three four and five so this one is going to be pond number one location is same and this is item number four this is number one number two and item number five and this is pawn number three item number six this is pawn number four item number seven and there's this small pond over here this is on number five and item number eight now in order to make your edits permanent you can actually save your edits the way to do that would be just click on this toggle editing mode button again and then it'll ask do you want to save the changes to the layer water bodies and of course yes and now it's a permanent set of attributes which we have inside this water body shape file if you go to the attributes table you can see that we have the different attributes over here if i want in a pond4 when i select you will see that it got sort of gets highlighted in yellow and if i want to know what the serpentine is you can see that it gets highlighted like this all right so to deselect everything that was highlighted i'm going to select over here and now let's get back to this issue that we created over here by digitizing one wrong additional point so to turn back this into an editing mode you can simply right click and then toggle editing mode again and from there you can select the attribute which you would like to modify now in order to do that you can again open the attributes table and you can select in this case the long water is the attribute that i have the issue with so i'm going to select long border like this and then you can go to this vertex tool and select on that and now you can see that it gives us access to these different vertexes so what i'm going to do is i'm going to simply select i'm going to simply click on this point and you can see that when i click on that point it actually gives me the freedom to move that point around so that point should be somewhere over here i'm going to move my mouse cursor to the point where it's supposed to be left click on it and you can see that it actually moved like that all right once you're done with that you can simply again click on this toggle editing just like what we did before and you can save the new edits so that now you have the boundary of the pawn to be actually the correct boundary now to deselect this item again you can go to the attributes table and select deselect the items like that and in case if you would like to see the boundary with respect to the to the real base map one way you can do a quick check would be to decrease your opacity as you can see over here and when you click apply you can see that the transparency sort of increases isn't it and from there you can see whether your digitized file is properly overlaying on top of the base layer or not on top of the boundaries of the corresponding attribute in the base layer or not so that's a quick way of actually doing your check even you can increase this transparency by decreasing the opacity while you're doing the digitizing process as well so that it'll be much easier for you guys just to draw on top of the exact boundary of the corresponding attribute on the base layer all right now you have successfully created a new shapefile like this now if i navigate back to the place where i normally keep my shape files you can see that a new bunch of files which corresponds to water bodies has appeared over here because when we create a new shape file it's not only the dot shp file which gets created but there will be different files like this dbf the database file the the projection file and a bunch of other files which is required for the shape file to actually properly function so all of that gets created when you create this shapefile like this so that's pretty cool isn't it all right so so far we talked about working with vector data and the type of vector data that we discussed today was shape files which is actually quite often used uh when we are doing the geo processing tasks but there are other different types of vector data as well but during the course of this tutorial series we will obviously be discussing many of those other types of vector data that we encounter day to day when we are doing our gis related tasks now let's move on from vector data to raster data you can see that inside this trust folder i have one raster which is digital elevation model as you might know a raster is formed by a collection of different pixels now if i drag this and drop it over here you can see that and maybe for the timing i'll deactivate these other items like the major roads and the hospitals and also the water bodies i'll only keep my area of interest now as you can see over here this is one of the tiles of digital elevation which comes in the form of raster which i have downloaded for covering my area of interest plus much more uh this raster data actually is from srtm shuttle radar topography mission so each of these pixels if i zoom in corresponds to a particular elevation value so that's why this whole thing is basically a digital elevation model which shows the variation of the elevation across the tile now if you draw your attention to over here the lowest value means the lowest darks are corresponding to negative seven below the mean sea level and the lightest values let's see the whites are corresponding to 276 meters above the mean sea level so between that different color variations that can be attributed to different elevations now this might not be a proper way to sort of visualize the different elevation ranges of a raster so that's those are the things that we are going to actually talk about in this introductory tutorial so again similar to the way that you added shape files into your working space you can just navigate to your raster file and drag it and drop it over here in order to add the raster into your working space now you can see that this raster is actually a tiff file i can similarly go to the properties of the particular file and if i go to information you can see that the data type is jotif and the coordinate reference system is wgs 1984 eps g4326 the same coordinate reference system and some other information as well and over here you can see one item called pixel size now you can see the pixel size is actually equal in terms of the x and y direction but these values are quite small because the unit right now is in decimal degrees but if you were to sort of transfer the unit into meters you will see that the pixel value is 30 meters by 30 meters pixel so this raster is sort of a formation of different individual pixels as you see when i zoom in like this when you're working with geospatial raster data there might be other types of raster data as well for example if you're talking about maybe land use or land cover types those can usually come in raster data as well because the distribution of land cover or land use type can be quite precise and detailed so you can represent those in terms of different pixels so for this example i'm just going to discuss only a few things that we can actually do with raster data of course things are to be explored more uh but since this is only an introductory tutorial we will not be going that much in depth but the basic things that we are going to discuss will be good enough to get you prepared in order to discover those advanced functionalities as well so the first thing that i'm going to discuss with you guys is how to change the the color distribution of this particular raster you can see that this raster is also added the digital elevation model is also added as a layer so i can if i just try to push my area of interest on top of this you can see that my area of interest is actually somewhere over here and if you would like to get a quick idea of the elevation distribution of my within my area of interest what you can do is you can go to the select tool identify features and you can right click somewhere over here and you can say that i want to click on not the area of interest but i want to click on that particular pixel of the digital elevation model and you can see that the pixel value that i clicked on is 26 so that's 26 meters above the mean sea level now if i click on maybe a bit of a darker area like this and select digital elevation model you can see that that value is 14 which is quite a low value but if i select maybe one of these lighter spots let's say if i select on this pixel and select digital elevation model you can see that that particular thing is should be popping up a little bit in reality because the elevation is 50 meters over here all right so that's the way to sort of inspect each pixel now if i want to sort of change the whole color distribution what you can do is you can right click over here go to properties and go to symbology over here and by default it should be the render type should be single band gray but we want to use single band pseudo color and from there you can see that we actually have a wide variety of different color ramps to choose from over here and if you see all the color ramps you can see that actually there are let's say if i go with the spectral color ramp it splits the elevation into sort of a certain number of classes which you can choose from here you can either go continuous or you can select equal interval in which case you will be actually able to determine the number of classes that you would like to split the whole thing into let's say i want to have 20 classes with equal interval and then i can click apply and then you can see that based on this color distribution we will be able to sort of interpret the elevations of different areas i can click ok and i can expand this and you can see that we have sort of the legend over here maybe let me adjust this a bit yeah you can see that this dark red areas are going to be these lower elevations and this dark blue areas are going to be the higher elevations and in between these let's say if i want to know quickly what is the elevation of this particular yellow color area i can refer to that it should be about 127 but if you want the precise pixel value what you can do is zoom into the correct location and you can right click over here select digital elevation model and you can see the elevation is in fact 127 so what we saw over here is actually quite matching now if you want to select a different let's say different styling you can go to properties and if you want something much more than what you can see over here you can even go to this create new color ram and from here you can select catalog and click ok and this will open up some other different ramps now since we are talking about topographical data i can select one of these color ramps or even you can select these other color ramps as well let's say i'm going to go with this one the name of the palette is bcyr and i'm going to select ok and select apply and now you can see that the lowest elevations are actually in dark blue color and the highest elevations in red color in case if you would like to invert the color distribution of this ramp you also can do that simply by opening up this and select inward color ramp in which case lowest elevations will be attributed the red color and the highest elevation will be attributed the blue color well i'm going to flip this back to what it was before so i can invert it again and click on apply and click ok all right now let's imagine that you actually don't want to have this entire tile of the srtm digital elevation model i only want to know the elevations maybe let's say within my area of interest so one quick way of doing knowing that would be to actually clip this raster by the boundaries of this particular polygon that we have now this is the time that we are going to actually make use of our processing toolbox we can simply type clip over here and you can see that we have the option to click the raster using polygon you can go to this under g dial over here you can select clip raster by mask layer and from here you can input the raster which is going to be my digital elevation model and the mask layer is now going to be my area of interest and over here you can actually select the the clip brush into a particular location but if you don't want to do that at this moment you can actually save it as a temporary file as well and you can now simply click run and after a while you will see that algorithm clip rust by mask layer finished and after that you can close it and now you can see that it created for us a new layer called clipped which is over here only to our boundary of interest now what you can do is you can simply go ahead and deselect this entire tile so that you can see that now we have the elevation model covering our area of interest just only the area of interest as i told you this is not a very high resolution digital elevation model that's why when i when we start zooming in you actually start seeing the pixels because each of these pixels will be representing one particular uniform elevation value if you are working with let's say very high resolution data like lidar data or ifsa data that means even when you zoom in you will still actually not start seeing pixels because the pixel distribution will be very fine and it will sort of look like a continuous layer but that's not an issue for our tutorial over here now again what you can do is you can see that now the clip mask means the elevation distribution within our area of interest only ranges from 11 to 59 now again this is not actually a proper color distribution so what i can do is i can do the same thing which i did before go to symbology go to single band sudo color and from here go to select create new color ram go to catalog and from here i'm going to select the same bgyr palette maybe i can split this into a number of classes as well i can select equal interval and maybe split this into let's say 10 classes apply yeah now you can see the color distribution actually changed and click ok and now if i open this you can see that these lower elevations are actually about 11 meters above the b sea level and there's a bit of a highland over here i mean a bit of a higher elevation area which is about 59 meters and in between most of the areas can be categorized as this 27 to 32 class as you can see from the color distribution over here so these are the advantages actually of having a color distribution which shows the elevation distribution as well so you can quickly get an idea about what sort of elevations can be attributed different geographical areas of your study of your area of interest but let's say if you would like to derive a set of contours from this now it's very easy to do that using qgis you can simply go to raster and among many raster operations that you can see over here we are going to go to this extraction and select contour now from here my clip mask is going to be my input layer for this and the interval between the contours we can actually set the interval manually let's say i'm going to select the interval to be about 5 meters and after that you can simply run again again just keep in mind that if you want to save this contour shape file you can create a new shapefile over here but if you want to keep it as a temporary file you can simply run and later decide whether to save it or not and once you do that you can see that it actually shows you the contours like this now let me go ahead and get rid of this base map over here and if i want to change the color of the contours contour lines i can go to properties and over here in this in the line feature i'm going to actually select maybe black because that would be more apparent like this if i come back and open the attributes table of this contour contours layer you will see that we have three attributes the field id the id and the elevation now if i click on this you can see that each id has its own attribute number and this is the column that i'm interested in this elevation column so for example let's say if i select this particular attribute that that attribute is actually corresponding to an elevation of 45 so just like that you can see the different contour lines have different elevations now if i want to display those elevations in the map itself it would be quite handy i guess what you can do is you can go to labels and select single labels and from here remember our element of interest our column of interest is in the elevation that's why i'm going to select this elevation value the font size maybe i'm going to put it down to about eight and let's see how it looks after i click on apply yeah i think this is good enough and when i click ok now you can see that each of the contour lines have been now labeled for example if i'm trying to get the elevation around this contour line you can see that the elevation is about 30. similarly i can go to the select tool and if i select this particular line simply by right clicking over here and selecting the contours shape file you can see that the elevation value is 30 which is which is the same value which gets actually appeared over here for each contour line quite useful isn't it similarly you can see that the elevation of the lake let's say i would assume this to be sort of the water level and if i select contours over here you can see that the level is 15 you can see that from the label which is appearing over here as well which is 15 meters above mean sea level now to deselect the item that you selected you can go to attributes table and deselect all right now this is the thing which i would like to actually put into a map as the final step that i want to do before we conclude this tutorial but just before that i would also like to show you how to save a particular shape file now you created this contour shapefile as a temporary shape file now if you would like to save it as a permanent shapefile in your system what you can do is you can right click over here and go to export and save feature as and from here you can select the format now the format i'm going to save it is in s3 s3 shapefile format dot shp format and the coordinate reference system is still going to be the same and the file name i'm going to select it as let's say elevation contours dot shp and after that i can click on ok and now you can see that it became a permanent shape file but the newly exported file do not contain these labels so you might have to actually maybe get rid of this temporary file and again go back to the property go to symbology and do the changes which we just did go to labels and add the labels like this so that it looks like what it was before so let's say that if you are using something like google earth it's quite easy to export all of these shape files into google earth for file format as well which is the kmz file format so similar to what we did we can again go to export and save feature as and over here instead of selecting s to shape file you can maybe select keyhall markup language the kml file format and i'm going to again name this as let's say i'm going to select a new file folder called google earth and this one i'm going to name it as elevation contours and i can save it and i do not want to add that to the map so i am going to deselect that and click ok all right now if i navigate back to the place where i kept those files you can see that there's one folder called google earth and if i open that you can see that there's a kml file over here so i can actually open this kml file in google earth itself and you can see that we actually managed to sort of overlay our contour lines in google earth itself isn't it that's pretty cool which corresponds to our study area and not only that you can simply like hover your mouse over this and try to click on one of these lines and then you can get the elevation value as well which is 25 over here and this one if you can recall it's 15 yeah over here so we can actually do the inspections within google earth itself which is actually quite handy all right so this is some additional part that that i just wanted to explain to you guys so i'm going to minimize this the final topic that we are going to discuss in this introductory tutorial is how to export this information in the form of a proper map all right so to create a proper map out of the data that you might already have you can simply go to project and go to new print layout and you can just give a name maybe let's say map so this is the editor where you can actually do so all sorts of edits to your map in order to make your map look more visually pleasing and to bring up the quality of the map so that it's actually be of sort of a publishable quality so first what you need to do is you can go to add item and first click on add map and from there you can actually draw a rectangle covering your mapping canvas like this and as you can see once you do that the geospatial data that we have over here will sort of be transferred into this mapping canvas now if you want to move this around you can go to this item properties first select this box which you just drew and go to item properties and from here you can select interactively edit map extent and once you do that you can move these items around like this and even you can increase or decrease the scale so for example if i put a scale like let's say 15 000 you can see that the map zooms in but if i want to let's say decrease the value maybe i can put something like 20 000 also you can also you can use the scroll wheel to actually zoom in or zoom out like this but if you would like to do it using a numerical figure you can always use this scale value over here and change it but now i'm going to add some more additional things to the map as well so for my case i would like to actually make the items or make this geospatial items to be a bit more smaller so i'm going to increase the scale maybe to about let's say 25 000 yeah i think that should be it and then i'm going to move this to a side because in this area i'm going to use this area to sort of add a legend and also add a scale bar and also add some information like that so the next thing that i'm going to do is i'm going to add a legend so in order to add a legend you can just go to add item and from here you can select add legend and select it like this now by default you can see that everything every layer which we had before over in the layers panel gets added into the legend but of course we don't want to have all of that so you what you can do is you can simply select on your legend go to item item properties legend items you can simply select the items which you do not want to add into your mapping canvas so you can hold your shift or control button and select all the items that you would like to actually get rid of and once you do that you can simply select this remove selected items from the legend but as you can see the button is sort of inactive right now because we have selected auto update from here so what you have to do is you have to deselect this auto update and from there just select all the items that you would like to get rid of from the legend and then click on this remove selected items from the legend now you can see that the legend is much more readable one more thing i would like to do is i would like to actually get off this uh get rid of these decimal points for these certain numbers so what i can do is just go back to your qgis project again and you can go to properties and since we do not have many items over here what i can do is i can simply select this label and actually manually alter the label in a way that you want let's say if you would like to keep two decimal points at one point maybe i can leave two decimal points if you would like to only have one decimal point you can actually just delete the rest like this and click apply and click ok and when you try to open your mapping canvas again and when you select once on your mapping canvas you can see that the legend now got updated like this all right so if you would like to add maybe some sort of a title like let's say saying legend you can select on this go to item properties and type legend and that will appear over here well you can see that still the titles of each individual element is actually not quite presentable as as a finalized map so what i'm going to do is i'm going to select i'm going to rename this rename layer i'm going to say elevation within brackets meters and also these contours i'm going to maybe rename that layer as well well not not a proper renaming but i'm going to sort of get rid of that underscore and yeah put it like that elevation contours and this one i'm going to rename it as area of interest all right now let's go back to our mapping window and see what happens when we do that yeah as you can see nothing happened because the updates have not been actually transferred from here into this our mapping camera so what you can do is we can simply hit update all over here and as you can see again it updated the changes which we did over here into our mapping canvas now again i might have to go back and get rid of those unwanted items like this yeah i think this looks quite okay to me uh except that i need add one border for this so you can simply add one border simply by going to this frame option and you can simply add a simple frame just like this yeah i think this is good enough so i'm going to move this one to somewhere over here so the next thing that i would like to do is i would like to add a north arrow so you can go to add item and add note arrow and maybe the north arrow let's set it somewhere over here and as you can see you have actually a number of node arrows which you can choose from but i'm just going to stick with this i think this should be good enough finally you can also add a scale bar you can go to add items and add scale bar and usually the scale bar will go somewhere over here yeah like this so by default it actually has two divisions like this you can increase the number of divisions simply by uh increase the segments to right like this and it's in meters so you can actually very quickly get a visual idea about the extent in terms of meters of our area of interest like this now once i add the scale but i feel like i want to move my this main item of the map to a bit further up so what i can do is i can go to interactively edit map again and move this up a little bit like this all right so finally before wrapping up i would also like to add one more item which is a label and i'm going to add that label to be somewhere over here and the label is basically my title i'm going to insert a title something like elevation contour map and if you would like to move this title within the text within the box you can select the horizontal alignment to be center and the vertical alignment to be middle and if you would like to increase the size the font size once you select on this font option you can see that you can actually have a wide variety of different fonts i can make it bold and increase the font size as well to be maybe about 20 22 should be okay yeah something like this should be sufficient now for some reason actually this map looks a bit empty to me so it would be good if we can add something to the background and what is good to add to the background other than open straight map that which we have over here so what happens if i activate this open street map come back to my mapping interface and if i try to move this map somewhere over here like this you can see that it actually refreshes the the mapping canvas but somehow if i do this you can see that because of the color distribution of this open street map the background map it actually takes the attention away from certain items so i would still like to retain this open street map as a background map but while doing that i would also like to maybe increase the transparency of the openstreetmap so you just go to osm standard over here and go to transparency and you can decrease the global opacity like this click on apply like this i think should be okay maybe decrease a bit more apply and click ok and now if you go back to your mapping canvas and maybe try to refresh your mapping extent you can see that now it's actually much more pleasing isn't it now i can add item which is a rectangle just as a bounding box for this map like this all right after that you can go to this style option just click somewhere over here and from here you can select simple fill and simple layer type just select outline so that it'll actually only create the outline for us but take out the fill color which is exactly what we want isn't it so i think that's about it of course if you would like to make your map much more presentable you can just play around with the other tools as well but as an introductory tutorial i think you guys learned a lot by this point so in order to export this map you can just go to layout and export as an image i'm going to create a new folder called maps and i will export this as elevation map and you again have a wide variety of image formats to choose from so i'm going to select jpeg and after that we can click on save from here you can select the resolution well i can decrease the resolution a bit maybe about 150 dpi because i'm not going to actually print this map but depending on your requirements you can actually either increase or decrease the resolution you can click on save which will eventually create the map for you guys and now if i go to these maps and you can see we have the jpeg over here and that would be this would be the map that we created which we can simply pass on to someone in case if we want to share our work with somebody else all right so let me go ahead and get rid of this all right guys so i think we covered pretty pretty much everything that we wanted to discuss today in this introductory tutorial to qgis again if you're a beginner qgis i guess you learn quite a lot through this tutorial which might not be very advanced but certainly good enough to get you started with the rest of the work that you would like to sort of uh do with the with the help of this powerful tool called qgis so if you do have any questions do not forget to comment them down below and if you did enjoy this tutorial if it added some value then don't forget to show your support by hitting the like button and of course if you haven't subscribed to this channel click on that subscribe button so that you will get immediately notified as soon as we publish a new tutorial so thanks a lot for watching guys i'll see you very soon with the next tutorial
Info
Channel: GeoDelta Labs
Views: 354,491
Rating: 4.9525723 out of 5
Keywords: qgis, arcGIS, free, how to, absolute, beginners guide, QGIS 3, Pi, digitizing, map making, 3D, visualization, geospatial, data, geographical information systems, data science, Introduction to QGIS
Id: NHolzMgaqwE
Channel Id: undefined
Length: 70min 7sec (4207 seconds)
Published: Thu Jul 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.