How to Label layers in QGIS # Lesson 4 of 29 # QGIS Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] do hi welcome to today's qgis tutorial lesson 4. in this video we'll learn how to label features in qgis in qgis 3.14 if you haven't subscribed to my channel please do so so that you can get a notification when i upload the next lesson let's get started labels can be added on them cutting to a map to show any information about object can be added to show any information these labels rely on attribute data of a layer for their content they rely on the attribute data labels are a good way of communicating information so with labels you'll be able to do better to have a better way of communicating information this can make your map a lot more informative and stylish so in this exercise we're going to learn how to add labels to vector layers that is there points the lines and the polygons in lesson two we had learnt how to download data from viva gis and orchard that is there we had actually downloaded the italy data nigerian data and uganda data so today we are going to use one of the data to see how we can label our features better and able to look at the information that is in our data better so first things first we load the vector layer so to add vector layers you come to layer we are going to add a layer we are going to add vector layers then we'll browse for where the vector layers are we had saved them in our js folder remember data folder or for gis so i'm going to load the italy admin data i'm going to select all the administrative boundaries of italy i'm going to add into my qgis and you can see they have already loaded then i'm also going to add the line feature which is the italy road and it has been added into my qgis then i'm also going to add the point data which is there else zip files the health sites once i have added my three types of vector layers i'll click on close now i have all my three vector layers added onto my qgis so we will start with how to label the polygons so i will just uncheck the lines and the points now i remain with three with the four polygons all these are administrative units of italy from the highest administration to the lowest administration you can see this is the highest administration which is them all the first one is the whole of italy when i uncheck italy is now subdivided into other uh regions when i inject admin one you'll see the admin one is now further italy is now divided into more regions when i uncheck now the regions even become much much smaller so these are the most smallest administrative units of italy so for this for our case we're going to just use uh to start by uh our uh labeling admin one so i'll click on admin one zoom to layer remember how to use the tools you can either zoom to layer from here or if it has moved to the other side you can just click on zoom to full now now we are learning how to use almost every tab in our qgis tool in our toolbar so we the first thing you need to to know is learn about the attribute table what how can you get the data that is within this layer this is how you get it you right click on the layer and then you scroll down to open attribute table that should be table actually contains all the information that this layer carries so i'll open the attribute table and now you will see a small table that will appear with all the information with rows and columns so each and every row represents a region like for example if i select these i can draw and then i minimize you can see a region has been selected here i'll go back to attribute table again and you can see i can even select several multiple regions by holding the shift and selecting them and you will see several regions have been selected so we want to label all these regions that have been all these regions using a certain unique identifier so which is when you look at it you can see uh id 0 i saw name 0 81 name one type one no there's so many uh uh rows and so many columns so we want to name a name name according to this column here which is name one because you can see they have different names and i assume these are the names of maybe the different regions the 20 regions that are within italy so i'm going to label it using name one so you make sure that you look at that column name one and put it somewhere in the in the back of your mind that you're going to label it using name one then we come to the layer again right click on the layer now we're going to the properties of the layer so the select properties then this box appears and this box has information source symbology labels mask 3d view diagrams fields and all and so many more information so what we are interested in currently is just the labels so i select labels so we want to labels and currently the layer has no labels so we are going to select the drop down and select single labels then what value are we going to use to name our our features in the map we are going to select the drop down and look for name one remember name one you had put it somewhere at the back of your mind so name one now the text of name one will appear like this uh it will be black in color but we want to do some little bit of edits and click on text and we want to do some little bit of uh color changing and you see when you click on text these tools appear here so there is the font so you can select the font that you want i'm going to leave it like that then you can select which style is it regular or ball do you want them to be bold or regular then do you want to underline them then what is the size the size is 10 by default so you can change it to any other one you want i will not change it right now then the color i want to change the color so i'll select the color and i i'll select the color that i want for the labels and i'll select that nice pink color then i will just click apply and see what happens to my labels just move it and you can see it has actually labeled all my regions the way i wanted it to label so i can go back now and do some more edits so i don't i no longer want a regular i want a bold one i'll select bold and i click on apply fast and i look at them are they now bald yes they're bold so i'll go back again and i want to put some more styles to it so i'll remove the boldness first and let it be regular then i will come under formatting i'll not change anything maybe i'll just say maybe i want them to be all uppercase and if you see it changes here so what whatever changes you make change here and it guides you on what is going to how how your labels are going to appear so then i'll go to the buffer i can actually draw a buff around and you can see currently it's just a white buffer so i can change the color here instead of that white buffer and put maybe say a yellow buff and see what happens you can see now it becomes the yellow buff at the back the background now you can even apply a mask you can even add a background to it and you can see there's very many backgrounds you can actually add a rectangular one then let's see how it looks like i click on apply you can see a rectangular background has been added i can change it to where and it actually changes but that is not a good way of actually uh doing that so i can change it to ellipse and you can see it changes that now there the labels to ellipse but i won't want to draw a background here for now so i'll uncheck that then you go to shadow you can actually draw drop a shadow to your background you can do call-outs then placement this is now also an important uh an important part so what do you where do you want our labels to be placed want them to be placed maybe say around the centroid around the center of the polygon or you can put them free or outside polygon or inside the perimeter or using the perimeter so let's start by centroid then we're going to force the point inside the polygon so i'll try that i and you can see it actually tries to pause the label inside the polygon but some are actually overlapping outside so we need to make also some changes i'll go back to property still properties and then i will maybe say a distance or maybe just uh free let's look at free then i click on apply and you see it actually labels them really on the map without any restrictions so we can also do the same thing again using perimeter account click on apply and you can see they'll actually follow the limit and some of them actually even disappear from view that is not also a good way of labeling now the polygons can say outside polygon click apply you can see it will actually try to put all my labels outside the oligo so you can actually that is how you can actually load labels in polygons now let's go now to the next the next vector layer which is the the lines tie line check polygons then i'll check the lines which are the roads and you can see there are very very many roads in italy so i'm going to zoom to just a certain region let me just maybe select sicily so we'll look at our attribute table to see how they have been labeled and currently there are no names for this road but we just want to learn how to use the label feature so you're going to label it using maybe say let's just use the road because when i look at it oh there are trails and roads so i just want to see how actually we're going to label this so we're going to we're going to look at this column here which is f but the f chord so we're labeling them using the f chord we'll do the same thing again for this layer we'll go to properties the cell under label they will say single labels because then we didn't actually label them then we'll select the f code then you're going to leave it that color first you know you you see actually it's almost the same but there's just some little bit of slight difference in this interface here so we go to text we select the text that we want to how we want to write the text so maybe i'll put red then i can draw a buffer a white buff around then maybe say go to placement now this is where now we change some things you remember the other one was giving you centroid and all that but this one is telling you parallel count or horizontal so we are going to label the uh then parallel first see what happens fly okay and you can see it's just labeled the different rods let me just change something all the roads here very quickly we'll learn how to do this later in the later later and now you can see the roads much better but we want to do some little bit of adjustments from the roads so i will go to labels and placement so the first type of placement was above line and it was parallel let's try this let's put it curved and then instead of above line let's put it on the line and check above line and then just scroll down and say apply okay you can see now the labels have been lo they have been labeled on the line which is the road and they actually look much better you can actually change the road you can actually even put a background or let's say a background draw background angular yeah because we had selected a white buffer actually not appearing so i'll remove the draw buffer i oh maybe if i take the italian admin look much more better the last layer that you're going to learn how to label is the point layer so i'm going to uncheck the rods and check the health health sites so basically what you're going to do is we're just going to open the attribute table so we right click open attribute table to see the kind of information that is in this layer so we'll see there are amenities dispensing healthcare and name of the facility so how do you want to label our facilities we want to label them using the name of the facility or name f so we're going to close the attribute table go to properties then under label i come to no labels for single labels again and we can pretty much do the same thing able with there facility name then under the text you can change the color maybe say want a red color for the facilities then we can put we can put a buffer and change the color too ah maybe say a light green color and you click on apply you can also change the opacity yeah but you can reduce the opacity and increase the opacity you see what happens here so then next we're going to say around the point and then you're just going to click on apply see what happens you can actually edit here and change so many things and maybe put on a distance offset distance of maybe say one one or two depending on how you want to just customize your your labels you can even change the type of text you can change it to maybe say a different kind of text format it changes here so i'm going to just click apply okay and that is basically it that is how we actually load we actually label uh vents lines and polygons in qgis so i'm going to turn on all the layers i'm actually labeled look at how everything looks like so how you label your layers is determined by the scale of your map and the level of detail in your map you can define the rules on how you want to use your labels if you found this video useful and you want to learn more on qgis subscribe to my channel hit the bell icon and get notified when my next video is uploaded don't forget to hit the like button see you in the next video [Music] you
Info
Channel: WiseGIS
Views: 1,144
Rating: undefined out of 5
Keywords: QGIS, QGIS 3.14, GIS, GIS Tips and tricks, Up and Running with QGIS 3.14, opensource software, movavi, movavi video editor plus, QGIS COMMUNITY, qgis tutorial, labeling, vector layers, how to label in qgis, opendata, foss, qgis3, up and running with qgis, installing qgis, label, mapping, analysis, trend, education, diy
Id: 6qCuuJFCcXQ
Channel Id: undefined
Length: 18min 31sec (1111 seconds)
Published: Mon Jul 27 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.