Displaying OpenInfraMap data in QGIS

OpenInfraMap is one of many OpenStreetMap projects, which is concentrated on highlighting the infrastructure worldwide. Predominantly this infrastructure is invisible in the major OpenStreetMap rendering but is directly sourced from OpenStreetMap. The OpennInfraMap is focused on displaying:
– Power,
– Solar generation,
– Petroleum (Oil & Gas),
– Water infrastructure,
– Telecoms.

The map is really handy in use and in order to better visibility the infrastructural layers some basic OSM features have been removed. The map coverage is reliant on the number of OSM contributors able to tag infrastructure items across the World in accordance with the OpenStreetMap project guidelines. Apart from the visual part of the map, the user can also browse the database of infrastructure from around the world (the “Stats” section), which has been categorized by country.

This short article shows the most convenient way of extracting this infrastructure data to QGIS with understanding it as the general way of transferring the OpenInfraMap layers to any GIS format. The way presented below is not the only one, that gives us the possibility to transfer this data. We can also get the OpenInfraMap data programmatically by using Python script, as discussed in this article. However, the way described here seems to be quite easy for everyone, as it doesn’t require an advanced level of GIS knowledge.

The key to this whole process is understanding what is the tileJSON format. This format is nothing more than JSON but describes the tilesets – a collection of raster or vector data broken up into a uniform grid of square tiles at some zoom levels. The pivot mechanism of the tiles work is keeping track of where the given tileset was roughly requested. In turn, the user can have the data loaded within the roughly determining area under the desired zoom level unlike having everything fully loaded for some massive region. In practice, this behavior prevents our data from crashing, freezing, etc., and lets our map attributes load quickly. Because of its broad acceptance and support the tileJSON format offers probably the best usability and functionality available today.

1. The OpenInfraMap data can be found under this link. The .json file should look like presented below (Pic. 1):

OpenInfraMap TileJSON file

Pic. 1 The OpenInfraMap layers are included in the .json file.

which can be also saved as a separate file on your drive.

2. In our QGIS we should follow the directions: Vector -> Vector Tiles Reader -> Add Vector Tiles Layer, as per below (Pic. 2):

QGIS Vector Tiles Reader

Pic. 2 The “Add Vector Tile Name” option.

and next, you should see the dialog box likewise for adding the WMTS layer.

3.  In the Vector Tile Source dialog box add the relevant credentials for the OpenInfraMap service. Basically, the link to the tileJSON data is required (Pic. 3).

OpenInfraMap adding to QGIS

Pic. 3 Adding OpenInfraMap data to QGIS.

4. Next, you should see your connection ready. Click “Connect” and wait a few sec until the data will be loaded (Pic 4, 5).

OpenInfraMap adding to QGIS2

OpenInfraMap adding to QGIS3

Pic. 4,5 Adding OpenInfraMap data to QGIS – next steps.

5. At the end you should see all the data from OpenInfraMap.org bounded in the groups (Pic. 6), which behavior is dynamic as you change the zoom level.

OpenInfraMap in QGIS

Pic. 6 OpenInfraMap data in QGIS.

All the layers come in the EPSG:3857 – WGS 84/ Pseudo-Mercator CRS system, which will work regardless of your QGIS project CRS. Remember not to change the source CRS of your layer, because it will disappear. Because of the vector specificity (tileJSON format), the “Zoom to layer” option won’t be helpful here.

Finally, the last thing mentioned at the very beginning of this article is exporting this data to the random GIS format. All the data displayed in QGIS behave the same as any other vector data. It means, that you can toggle the editing mode, browse the data attribute table, select the items within your area of interest, and export them to desired file format.

Mariusz Krukar

 

References:

  1. Pluta A., Ontje Lünsdorf, 2020, Esy-osmfilter – A Python Library to Efficiently Extract OpenStreetMap Data, (in:) Journal of Open Research Software, 8(1), p.19.

Links:

  1. https://blog.opencagedata.com/post/openinframap-interview
  2. https://github.com/openinframap/openinframap
  3. https://gisplay.pl/gis/9787-open-infrastructure-map-globalna-mapa-infrastruktury-energetycznej.html (Polish)
  4. https://openinframap.org/about
  5. https://opensourcelibs.com/libs/openstreetmap
  6. https://tilejson.io/
  7. Docs.mapbox.com: About TileJSON
  8. https://www.azavea.com/blog/2019/03/04/introducing-tilejson-io/
  9. https://documentation.maptiler.com/hc/en-us/articles/4405591904913-TileJSON-for-map-tiles
  10. https://learnosm.org/en/

 

Forums:

  1. https://www.reddit.com/r/QGIS/comments/jw4qcl/open_infrastructure_map_data_to_qgis/

Wiki:

  1. List of OSM-based services
  2. OpenInfraMap
  3. Osmfilter

Youtube:

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *