5

In QGIS how can I have more then one coverage layer in Atlas? As is shown in the image below I have multiple city blocks (in a layer), that contain multiple land lots (in a different layer). I wish to generate various maps (like the one in the second image, highlighting a different land lot each time) where Atlas could go first through all the land lots polygons inside a city block, then again in all land lots inside another city block, and etc.

enter image description here

enter image description here

2
  • Great question! I don't dare to say "That's not possible", so let me just say that so far, I don't know if it's possible at all. Let's hope so and I would be lucky to see an answer on this. I'm not sure but maybe creating a virtual layer that combines both block and land lots and than using this virtual layer as coverage layer could be an option?
    – Babel
    Aug 31, 2021 at 19:42
  • 1
    Maybe using the report (docs.qgis.org/3.16/en/docs/user_manual/print_composer/…) could get you there
    – J.R
    Sep 1, 2021 at 15:39

2 Answers 2

1

I think you can solve this using a single coverage layer (the plots) and then use an expression to set the extent of the map to the bounds of the enclosing block based on the location of the plot.

1
  • That is what I did with the expression seen here gis.stackexchange.com/a/289688/159239. It's not perfect since the frame around the feature gets very narrowed but for what I needed it suited. So I'm taking this as the answer since there's no "official" way of doing this. Thanks
    – Felippe M.
    Sep 2, 2021 at 12:45
1

You can create the combination of the two geometries and use this as coverage layer for your Atlas. There are at least three possibilities to add the features of the two layers. The first (and preferable) one will not create new data and any change in one of the two initial layers is automatically reflected - that comes as close as possible as using two layers as coverage for the atlas:

  1. Create a Virtual layer that combines your two polygon layers (see here for the query to use).

Use this virtual layer as coverage layer and you're done.


Options 2 and 3 are good to create actual layers in case using the virtual layer should be unstable. However, changes in the initial geometries are not refelcted and new data is generated.

  1. Use Merge vector layers tool.

  2. Use Geometry by expression to create a new layer combining both input polygon layers with the following expression, than run Multipart to singleparts and Delete duplicate geometries.

    collect_geometries(  
        aggregate('plot', 'collect', $geometry),
        aggregate( 'building', 'collect', $geometry)
    )
    
1
  • I'll definitely try this. Thank you!
    – Felippe M.
    Sep 2, 2021 at 12:46

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.