6

In an Atlas the content of some maps are best suited for the inset to be on the Left bottom, on others it's the Right bottom of the map. If we add the xy of this point to the table that is used to generate the atlas, is it possible to use a data override to set the position of an anchor point?

For example

a. Inset Map on Bottom Left - good position as it doesn't cover any important features enter image description here

b. Inset map covers important features and should be anchored on the Bottom Right enter image description here

Can this be set in an override? The only other alternative I can think of is to create a second layout to use for pages when it should be on the right and to use a filter to print the pages separately.

I found a possible solution in ArcMap but I want to do this in QGIS 3.2

1 Answer 1

11

I had this problem before. The only way I found to do it was to write a IF expression for the inlay map's X position (item properties > position and size > X).

Make a note of the inlay map's X value in it's current position in the bottom left (going to call this x1), then drag it into the bottom right and note the new X position (calling this x2).

Now, imagine you have five pages in your atlas and the pages are named 1 to 5, you want the inlay at the bottom left for pages 1, 2, and 5, and at the bottom right for pages 3 and 4.

Write something like the following expression for the X value: IF(@atlas_pagename IN(1,2,5), x1, x2)

If the case arises where you need to also change the vertical position for some pages then you can just use the same process for the Y value.

2
  • 3
    To do it even easier, you could set X based on atlas feature attribute. Your atlas_pagename or page number could change. Commented Nov 19, 2021 at 13:25
  • This is a great answer as it means that we can move any element in the layout to a different anchor point based on just the page id and don't have to add additional columns to the dataset for each scenario.
    – GeorgeC
    Commented Nov 19, 2021 at 20:59

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.