I'm attempting to create a series of maps in QGIS atlas with the same coverage and background data but different raster outputs (flood mapping outputs for a range of scenarios).
I've created a shapefile coverage layer containing polygons for each of the scenarios and using the polygon identifier attempted to turn on and off raster layers using a function within a label object. I've played around with the function for a while but can't get it to work…
Does this sound like the right approach that I'm taking? Is there a better way to do this?
I'm very much a beginner when it comes to using functions in QGIS.
Best Answer
I've just done this with 84 different raster layers. The method i used was:
|
character. For examle: If you wanted to show three fields: "flood_results","Background_mapping" and "Vector_layer" then your field would contain this string:flood_results|Background_mapping|Vector_layer
Assign your atlas polygons in the Atlas Generation tab
In the print composer, the item properties for the map view window: there is a lock layers for map item checkbox with a data-defined override field option, make this field your text field with the layers in.
Now as you cycle through your atlas maps, the layers will change depending on the layers specified in the layers field of each atlas polygon.