Based on this question: How to display different SVG icon in the same layer in QGIS is it possible to add multiple svg files in qgis to the same layer automatically based on attribute value? I have a world dataset and world flags svg files. Can I visualize the flags somehow automatically? (for example adding the path as attribute to each record?)
Answer
Yes I think so. Any aspect of symbology in QGIS can be data driven, also the path to an svg symbol e.g. You don't even need an attribute holding the complete path, you might create an expression that derives the path from another attributes content (here attribute "the_land_of_the_flag"), say:
concat('the/path/to/my/svg/symbols/', "the_land_of_the_flag", '.svg')
giving
'the/path/to/my/svg/symbols/germany.svg'
for example.
Here is a screenshot where to access this feature (QGIS 2.14.1):
And then:
Unfortunatly I have the German version, hope this helps as well.
No comments:
Post a Comment