0

When I load the OpenInfraMap vector tile service in QGIS 3.28.1 (https://openinframap.org/tiles/{z}/{x}/{y}.pbf), how can I filter the data by layer name?

OpenInfraMap uses different layers as we can see in the TileJSON file.

Unfortunately, the Vector Tile Reader plugin doesn't work anymore with OpenInfraMap. I get the following error: The field 'vector_layers' is required but not found. This is invalid TileJSON.

2 Answers 2

3

Sometimes you can't see the forest for the trees! The answer was so near. We can filter the layer directly in the layer properties symbology dialog: enter image description here

2

@Christoph gives the answer to his own question above, but I'd like to add some detail. There is lots of info about QGIS vector tiles online that isn't quite up to date. You can add OpenInfraMap as a vector tile layer either in the browser under Vector Tiles, or in the add layer dialog shown here:Add Vector Tile Layer

Then click OK and Add. You will get a layer with 3 rules representing geometry types as follows: symbology

In order to make a useful map you will have to categorize what you want from the dataset. The map.json file lists all of the vector layers. Unfortunately it doesn't specify what geometry type each is, although for most you should be able to guess. In the symbology editor you can add rules and by double clicking on the layer column add a classification.

For example, power lines are listed as 'power_line' in the json file, so add a rule for a line, edit it's display properties, then edit the layer name to power_line. repeat. I've found that saving the style as default works, although I'm not sure where they are being saved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.