OSM with QGIS

  • Intro
  • QuickOSM
  • OSM place search
  • Importing open street map data
  • Resources for loading OpenStreetMap data
  • Useful links

Information

Primary software used QGIS
Software version 1.0
Course OSM with QGIS
Primary subject 3D Modelling
Secondary subject Geospatial and Geographic Information Systems
Level Intermediate
Last updated November 11, 2024
Keywords

Responsible

Faculty

OSM with QGIS 0/5

OSM with QGIS link copied

Some useful plugins include:

  • PDOK services plugin
  • QuickMapServices
  • QuickOSM
  • OpenLayers Plugin [experimental]
  • OSM place search [experimental]

You can also download useful information in Pdok, nationaal georegister en rijkswaterstaat

This section will explain how to use some of these plugins. For more information you can also follow this QGIS lesson

Search for a place name and select an option from the list
Search for a place name and select an option from the list

OSM with QGIS 1/5

QuickOSM link copied

QuickOSM is a plugin that can be used to download OpenStreetMap data. Follow these simple steps to use the plugin:

Options for opening the QuickOSM plugin
Options for opening the QuickOSM plugin
  • Install the QuickOSM plugin using the steps outlined above. This will add two new icons to the toolbar. You can also access the plugin via 
    Vector
    Quick OSM
QuickOSM window
QuickOSM window
  • Open QuickOSM. We will be using the “Quick query” tab of the plugin, which is the default.
  • Choose the specific features you would like to download by selecting an appropriate key from the drop down menu. For example, you can download the road network using the key “highway”.
  • If you would like to filter the features you are downloading even further, select a value from the next drop down menu. For example, you can download only roads corresponding to motorways by selecting the value “motorway”.
  • Choose the area that you would like to download the data for. There are a number of options on how to do this:
  • The default is to download data “in” a certain village, town, etc by typing the name of the place into the search box (for example “Amsterdam”).
  • You can also select data within a certain radius of a place by selecting “around” from the drop down menu rather than “in” and filling in the place name and radius you are interested in.
  • Alternatively, you can download data using “canvas extent”, which will download all the data available for the current area shown on the map canvas (only use this if you know which area the map canvas is showing otherwise the plugin may try to download data for the entire Earth!).
  • Finally, you can also choose to download data based on the extent of a layer already loaded into your QGIS project using “layer extent”.

Click the “run query” button to load the data into your project. Note: depending on how large the area is that you’ve requested data for, the query can take quite some time to complete. Also, the query can return no results if the key/values you have searched for are not present in your chosen area.

QuickOSM query results shown on the map canvas and layers list
QuickOSM query results shown on the map canvas and layers list

The plugin will download a number of vector layers from OpenStreetMap depending on your query (usually three layers are added to the project: polygon, line and point). You can choose which layer is most appropriate for the data you are interested in and delete the others. For example, line geometry would be more appropriate for a road network, while polygon geometry would be more appropriate for buildings.

OSM with QGIS 2/5

OSM place search link copied

Open the OSM Place Search panel
Open the OSM Place Search panel

OSM place search is a plugin that can be used to navigate to a specific location based on OpenStreetMap data. Follow these simple steps to use the plugin:

  • Install the OSM place search plugin using the steps outlined above. This will add a new panel to the side bar. You can also access the plugin via
    View
    Panels
    OSM place search
Search for a place name and select an option from the list
Search for a place name and select an option from the list
  • Type a place name into the field beside “Name contains…” (e.g. Delft, Amsterdam, etc) and press enter.
  • Double-click on the most appropriate search result from the list and the map canvas will then display your chosen location.

OSM with QGIS 3/5

Importing open street map data link copied

OpenStreetMap (OSM) is a project that aims to create a free, editable map of the world. It is contributed to by a community of volunteer mappers. These volunteers collect data on any type of geographical feature in their surroundings (such as roads, railways, buildings, etc) and upload it to OSM so that it is available for free as open data. This tutorial will explain how to access OSM data so that you can use it in QGIS.

Raster base map

Raster data can be used directly to analyse geographical data, but it might also be useful to first compute new data like area data. The following tutorials show some analyses and computations that can be done with raster data.   

OpenStreetMap under the XYZ tiles tab in the Browser panel
OpenStreetMap under the XYZ tiles tab in the Browser panel

OpenStreetMap can be accessed in raster format under the XYZ Tiles section of the Browser panel.

OpenStreetMap under the XYZ tiles tab in the Browser panel

  • Open a browser panel via
    View
    Panel
    Browser
  • Expand the XYZ tiles section
  • Double click on OpenStreetMap to add it to the project
OpenStreetMap as a base map for the Netherlands
OpenStreetMap as a base map for the Netherlands

More on raster data

For more details on raster data you can check the following tutorial

Vector data

Vector data can be used directly to analyse geographical data, but it might also be useful to first compute new data like area data. The following tutorials show some analyses and computations that can be done with vector data.

Step 1: Open the QuickOSM plugin
Step 1: Open the QuickOSM plugin

In order to obtain small datasets from OpenStreetMap (e.g. selected features from a single city), use the following steps. If you find that the query is timing out, then the dataset you are requesting is most likely too large and you should follow the steps in the next section (bulk data downloads).

Step 1: Install and open the QuickOSM plugin.

  • Open the QuickOSM plugin  or via its icon in the toolbar or 
    Vector
    Quick OSM
    Quick OSM…
Step 2: Select required values in QuickOSM window
Step 2: Select required values in QuickOSM window

Step 2: Select the required values from the drop-down menus in the QuickOSM window:

  • Key = the name of the type of features that should be added to the project (e.g. building, trees, highway, etc)
  • Value = [optional] the name of a more specific type of feature (e.g. hotel)
  • Choose an option from the drop down menu which describes how the features should be located (e.g. in / around / canvas extent)
  • Enter the name of the geographic location you would like to obtain features for (e.g. a village, a town…)

Step 3: Run the query.

Step 4: Remove any unnecessary layers.

  • After closing the QuickOSM window, you will notice that the plugin adds multiple layers to the project (usually a polygon, line and point layer or selection of these).
  • Not all layers will be useful for your application so remove the ones that are unnecessary.

Note: Data obtained from OSM using the QuickOSM plugin is not actually stored on your computer but accessed via a database on the web. If you would like to have a copy of the data on your computer, then export the layer(s) so that they are stored locally:

RMB + Layer
Export
Save feature as

 

  • Select the file format and file name
  • Recommended file format for vector layers is “GeoPackage”

Bulk data downloads

Geofabrik download page
Geofabrik download page

In order to obtain large datasets from OpenStreetMap (e.g. all features of an entire country), you can use a free download server such as Geofabrik. Follow these simple steps:

Step 1: Go to geofabrik 

Step 2: Choose the area that you would like download data for. The webpage is organised in a hierarchical structure so first select a continent, then a country and finally a province / sub-region.

Download the .shp.zip file for your area of interest
Download the .shp.zip file for your area of interest

Step 3: Download the .shp.zip file.

Step 4: Extract the contents of the zip file.

  • The folder will contain a number of different files. Each file contains a different type of feature (e.g. buildings, roads or waterways).

Step 5: Open the file(s) you are interested in by dragging and dropping the .shp files onto the QGIS interface.

More on vector data

For more details on vector data you can check the following tutorial

OSM with QGIS 4/5

Resources for loading OpenStreetMap data link copied

OpenStreetMap contains geographical information on a global scale.  

Add open data from WMS and OpenStreetMap to a catchment 

  • Hans van der Kwast: “Adding Open Data to your QGIS 3 project” 
    you can access this video using this link
    Language(s): English 
    Time: 13m 17s 

Extract data from OpenStreetMap and save it as a vector layer

  •   Ujaval Gandhi: “Searching and Downloading OpenStreetMap Data (QGIS3)”/”Zoeken en downloaden van gegevens van OpenStreetMap (QGIS3)”  
    you can access the English document using this link
    you can access the English document using this link
    Language(s): English
      
    Chapters:
    • overview of the task
    • procedure   
       

Import vector data from OpenStreeMap using the QuickOSM plugin

  •  Hans van der Kwast: “Importing OpenStreetMap data to QGIS with QuickOSM”
    you can access this video using this link 
    Language(s): English  
    Time: 9min 41s  
     

Add cities and towns from OpenStreetMap using the Quick OSM plugin

  •  Hans van der Kwast: “Adding cities and towns from OpenStreetMap to QGIS” 
    you can access this video using this link
    Language(s): English  
    Time: 7min 43s
     
    Chapters:
    • Introduction (start-0:33)
    • Installing QuickOSM (0:33-1:52)
    • Temporary layer (1:52-2:24)
    • Geo package (2:24-2:54)
    • Remove temporary layers (2:54-end) 
        

Add vector data from OpenStreetMap using keys and values in the QuickOSM plugin  

  • Hans van der Kwast: “Add Vector Data from OpenStreetMap to QGIS with the QuickOSM Plugin” 
    you can access this video using this link
    Language(s): English  
    Time: 10min 41s
     
    Chapters:
    • Intro (start-0:20)
    • QuickOSM Plugin (0:20-0:40)
    • Openstreetmap (0:40-2:20)
    • Queries (2:20-3:00)
    • Labels (3:00-4:10)
    • Make permanent (4:10-4:50)
    • Export (4:50-6:20)
    • Styling (6:20-6:40)
    • Dam (6:40-8:15)
    • Legs (8:15-end) 
       

Download, style and label cities and towns from OpenStreetMap 

  • Hans van der Kwast: “Download, Style and Label Cities and Towns from OpenStreetMap”
    you can access this video using this link 
    Language(s): English 
    Time: 4min 30s