Geospatial - GISQgis

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 database

To do this, you must choose the area where 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 immense and time consuming. To do this, select:

Vector> OpenStreetMap> Download

Osm qgis

Here you select the path where the xml file with the .osm extension will be downloaded. It is possible to indicate the quadrant range from an existing layer or by the current display of the view. Once the option is selected Accept, 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

 

It must be indicated if we are going to call only points, lines or polygons. Also with the button Load from 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.

Golgi Alvarez

Writer, researcher, specialist in Land Management Models. He has participated in the conceptualization and implementation of models such as: National Property Administration System SINAP in Honduras, Management Model of Joint Municipalities in Honduras, Integrated Cadastre-Registry Management Model in Nicaragua, Territory Administration System SAT in Colombia . Editor of the Geofumadas knowledge blog since 2007 and creator of the AulaGEO Academy that includes more than 100 courses on GIS - CAD - BIM - Digital Twins topics.

Related Articles

Leave a comment

Back to top button