Monday, 13 November 2017

cartography - Group and align icons in QGIS atlas


I am making an atlas of protected areas using QGIS. I am using version 2.12, but this question will probably also apply to version 2.14 as well.


Several points of interest (poi) objects are presented in this atlas. Some of these, like parking, information station and viewpoint are presented as icons. When these are close to oneother it is relevant to group the icons and align them (on a line) close to a centerpoint for the poi-objects. Currently this is done using desktop publishing tools and it looks like this:


enter image description here


I would like to pull as much as possible of this process into the QGIS atlas system. We have many of the protecteda areas, so the gain of automating the process is potentially big.


How can this be done in QGIS?


Also see question Using FME to aggregate POI to one point for context.



Answer



You can achieve the following using some expression-based SVG symbols.


enter image description here



Basically, you'd have multiple attributes that determine icon #1, #2, and so on.


enter image description here


As far as I know, it is currently not possible to make the SVG location depend on the corresponding label location though. So you'll want to avoid placing labels in the lower right corner, a setting for this is available in 2.14.


Use offsets to move the icons to the correct location. The icon is defined based on the attribute value:


enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...