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 to display:
– Solar generation,
– Petroleum (Oil & Gas),
– Water infrastructure,
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 for tagging 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, giving 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 describing 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 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):
which can be also saved as a separate file to your drive.
2. In our QGIS we should follow the directions: Vector -> Vector Tiles Reader -> Add Vector Tiles Layer, as per below (Pic. 2):
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).
4. Next, you should see your connection ready. Click “Connect” and wait a few sec until the data will be loaded (Pic 4, 5).
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.
All the layers come in the EPSG:3857 – WGS 84/ Pseudo-Mercator CRS system, which will work regardless of your QGIS project CRS. Remember do not 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 is mentioned at the very beginning of this article, which 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.
- 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.
- https://gisplay.pl/gis/9787-open-infrastructure-map-globalna-mapa-infrastruktury-energetycznej.html (Polish)
- Docs.mapbox.com: About TileJSON