Downloading OpenStreetMap data using QGIS and QuickOSM

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I'm going to download some data from openstreetmap here and use it inside of qgis and using the quick osm plugin to start this process I like to have a base map in the view so I can tell where I'm working and you can actually stream in openstreetmap base map by going to the browser panel and going to XYZ tiles and just dragging and dropping into your layer menu now I'm using qgis version 3.22 for this demo what you see might vary depending on the version of Q just that you're using most of these tools will be available in this format or similar to what they look like if you use a version that's somewhere around that one let's choose a city I'm going to go into Medellin Colombia and just download some data there just as a sample area for this exercise to get the data I will be using the quick osm plugin if you don't have that plug-in you can go to the plugins menu under manage and install plugins and you're going to see a list of the plugins offered with qgis and you can just highlight quick osm and click install that will put a button up under your toolbars uh if you have the the plugins toolbar or you can get to this functionality under Vector quick osm now if you're working with openstreetmap for the first time or if you're new it can be helpful to understand a little bit of the tagging structure that goes along with the the openstreetmap project there's a Wiki page openstreetmap Wiki where you can type in any kind of feature and it will show you the tag that is used for example if I were to search for Park here I would see that the tag for a park is Leisure equals park now this is a key value pair it has two important parts the key is Leisure and the value is Park uh there's other Leisure features that have different values on them um some common ones are Highway which is used for roads amenity is used for lots of different things in open street map if you go to that page you'll see that there are a lot of possible values for the amenities such as Bar Cafe fast food and so on so if you're not familiar with the the tags and you don't have them on the tip of your brain it can be helpful to keep this page open while you work with the quick osm plugin other than that the plugin is quite user friendly um I should mention also before I start using it that what I'm viewing here as the streamed in background based map might not exactly match the data that I download using this plugin there might be more data that I get back from the download that's not depicted here this is just one rendering of openstreetmap and it might not include everything that's in the database uh okay so let's uh go ahead and use this plugin to get the uh all the roads those are under the highway key and I just want to query for all possible values perhaps the most important part here is I choose which geographic extent I want to use for the download and I'm going to choose canvas extent which is the area that I can currently see in the view here just be careful with this because if you're zoomed way out and you try to get all the data it could take a long time or download more data than you expected uh when I'm ready I'm just going to click run query and I'll wait for a little bit for those layers to appear over here in the layer list uh looks like they've shown up here this plugin is quite fast it's a little slower when I'm recording videos but you can see how quickly it operated for this area there are some point features that can take the highway key but I just want to get the lines here so I'm going to turn those off and maybe even if I turn off this base map you can see the line work that I got back from this download later I'll show how we can filter this and style it a little bit but let's go ahead and download some other things maybe I'll just go ahead and get all the buildings here so building is also a key in openstreetmap and I've still got it on this canvas extent I haven't panned the map so let me just run this query and get those so now I've gotten all the buildings that are in the openstreetmap database it looks like there are a few that were indicated as points um again I can turn those off if I want to filter them out for now um I'm thinking just more of how I'm going to compose cartographically this base map and so I'm just taking roses lines and buildings as polygons for now and I can deal with the details uh later um I showed you how uh Leisure Park is the way to get the parks so let me show that you could put a specific value in here if you wanted to get a specific keep it on the same canvas extent and I can run that query and I imagine I don't get some parks back as points and as polygons yes that was the case um what else can I get uh maybe I'll try to get all of the businesses that are shops here so that's anything under the shop key let's run that query some of those could be um polygons and some that could be points as well you see that data showing up here um and I think that's all for now let's go and take a look at what we've got and maybe how we can use it um so one trick will be kind of uh dragging and dropping these layers to so that they are in the order that you want I guess I should mention that before you do anything uh you might want to make these layers permanent so these are just temporary layers in qgis and they're going to go away when you get rid of your project and close it so anything that you want to keep here you should actually right click and Export it out and you can save it as some other kind of file a Geo package a shape file or something like that you could take these later and load them into your own database if you're running postgres or something like that just get them so they're not temporary anymore and so we're going to pretend from this point forward that I have done that that I have gone and saved all of these layers for the sake of time I'm not going to demonstrate that process so let's just pretend that I have made these permanent and they're not temporary how could I make a nice looking map out of these um maybe I'll turn some stuff off first just to simplify um I want to show the attribute tables that come back from this if you right click and open the attribute table uh you'll see all the the road features and there remember I used the highway tag to get these at a highway key and there's actually a highway column here that will show the value that is associated with that key so this is a really important one because it tells me the type of road that it is whether it's residential secondary primary and tertiary or even something like a psychopath or a cycle way um also I've got a ton of other columns here if people put other tags on uh all that data comes and most of the information is null because there are a lot of tags that most people don't use um but if you go over there's some ones that could be really helpful for example the name and the surface for example or the number of lanes all of those could affect how I might style this so if I go into the properties of this layer and go to the symbology I could for example categorize these roads based on the value that's under the highway key so I click classify down here and this just assigns a random color to each type of uh of Road and this is one place where I could filter out this symbol so if I don't want to show non-motorized stuff right now I could just click those off and maybe remove anything that's uh not tagged uh that could be one way to start kind of symbolizing this and then I could go in and apply certain colors and widths to the major roads versus the the minor roads another thing you can do is if you want to use SQL to set filters on what's visible you can right click the layer and go to a filter and there's a little query Builder where you could do that also you could label these so if I highlight and on my uh labeling toolbar here I can open the layer the label options and maybe we could put single labels on here based on that name field that came across right here and we can do things such as changing the size and color of those labels maybe I'll make them a little bit lighter here foreign you might want to do is you could set the scale that they will appear at so if you go over here to some of the rendering options you could set uh scale here so for example I'm going to make it let's make it so they turn off when I go out beyond the twenty thousand or one to twenty thousand see how those layers turned off and also the placement engine right now has conflict detection so that's why it's reducing the number of labels that appear as I go out you can use all these options down here to modify those um we can show buildings here sometimes it can be nice to want to adjust the symbology [Music] we can go down and take the stroke off of the end and maybe make it a nice like a little bit lighter color here that shows us that there's buildings but it's not making the map look real messy um we could change the park style maybe change it to a green color if we want we could even outline that in green let's change the stroke to a little bit darker okay so there's lots of modifications that you can make here to your base map using the open street map data uh using the attribute tables you could select out and further filter the information that you get be aware that you will need to deal with situations where you get back both points and polygons for example the shops um maybe I would symbolize these shops so they look more like a building and these Point ones so that they look like look like darker and smaller points that will show up uh it's up to you I hope this tutorial has been useful and that you're excited to go get some data from openstreetmap now and begin styling it to make your own base Maps
Info
Channel: CWU Geography
Views: 21,013
Rating: undefined out of 5
Keywords:
Id: X3crjuhOBro
Channel Id: undefined
Length: 11min 20sec (680 seconds)
Published: Wed Nov 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.