Import data from OpenStreetMap to QGIS

The amount of data that exist in OpenStreetMap is really wide, and although it is not completely up to date, in the majority of cases it is more accurate than data traditionally raised by cartographic sheets with scale 1: 50, 000.

In QGIS is great to load this layer as a background map such as the Google Earth image, for which there are already plugins, but this is only a background map.

What happens if what you want is to have the OpenStreetMap layer as vector?

1.  Download the OSM base

To do this, you must choose the area where it is expected to download data.It is obvious that with very large areas, where there is lots of information, the database size will be huge and slow. To do this, you select:

Vector > OpenStreetMap > Download

osm qgis

Here you select the path where the xml file will be downloaded with .osm extension. It is possible to indicate the quadrant range from an existing layer or by the current view deployment. Once you select the Accept option, starts the download process and the downloaded data volume will be displayed.

2.  Create a Database

After downloading the XML file, what is required is to turn this into a database.

This is done with: Vector > OpenStreetMap > Import topology from XML…

osm qgis

Here this request us to input the source, the SpatiaLite DB output file and if we want to create the import connection immediately.

3.  Calling the QGIS layer

Calling data as a layer requires:

Vector > OpenStreetMap > Export topology to SpatiaLite…,

osm qgis

You must indicate if we’ll only call points, lines or polygons. Also with the database load button can be listed which are objects of interest.

As a result, we can load the layer to our map, as seen in the picture below.

osm qgis

Of course, as being OSM an open source initiative, it will take some time so that proprietary tools will make this kind of thing.

Related posts:

Tagged with 

One thought on “Import data from OpenStreetMap to QGIS

  1. This is great, how about extracting contours from topographic maps online?

Leave a Reply