Import data from OpenStreetMap to QGIS

The amount of data in OpenStreetMap Is really broad, and although it is not fully updated, in most cases it is more accurate than data traditionally raised through 1 scale sheets: 50,000.

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

What if you want to have the OpenStreetMap layer as a vector?

1. Download the OSM base

To do this, you must choose the area from which you expect to download data. It is obvious that very large areas, where there is a lot of information, the size of the database will be huge and slow. To do this, select:

Vector> OpenStreetMap> Download

Osm qgis

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

2. Create a database

Once the XML file is downloaded, it is required to convert this into a database.

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

Osm qgis

Here we are asked to enter the source, the DB SpatiaLite output file and if we want the import connection to be created immediately.

3 Call the layer to QGIS

Calling data as a layer requires:

Vector> OpenStreetMap> Export topology to SpatiaLite ...,

Osm qgis

You must indicate if we are going to call only points, lines or polygons. Also with the Load button of the database you can list which are the objects of interest.

As a result, we can load the layer onto our map, as shown in the following image.

Osm qgis

Of course, because OSM is an open source initiative, it will take a lot for private tools to do this kind of thing.

Leave an answer

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.