I build a map-book for a hiking trail. On every single page is a part of the trail so you can go step by step from page to page - nothing news. But usually there should be a overview on every page for the overlaping of the next and the previous pages.

enter image description here

Any ideas? Until now I was working by adding the map bounding from every single Atlas page to the canvas and displaying it back in the Atlas. That is not even elegant nor is it comfortable.

  • It increases the percentage of margin around the element! – pigreco Nov 4 '16 at 9:09

This is a very limited solution. As long as your route is in a straight line you can line up your coverage layer polygons with the exact same overlap each time. Use the ID or a page number column to get the order number and set up an atlas. Don't hide the coverage layer.

enter image description here

On your second page where you will have two overlaps, one for the first page and one for the second. add a rectangle matching up with the overlap of the next and previous polygon. This is why it's limited, as long as the overlap is always the same, these rectangles don't have to move so they can remain static. The only issue will be with the first and last page where there will be only one overlap.

Now add a text box with the expression @atlas_pagename +1 and @atlas_pagename -1 to the next and previous overlay boxes respectively. This will give the next page number. You might need to alter your expression to use @atlas_featurenumber or whatever, your just trying to get the page numbering for the next and previous page.

Effectively you should have a page with two overlaps that now number up and down as you move through the atlas. But what about the first and last page?

Select either the text box or rectangle first (you're going to have to do this step for them anyway). Go to the 'Position and size' properties of the text box (i'll use this one for the instructions) and take note of the 'X' property. Under data defined override add the expression:

CASE WHEN @atlas_pagename = '[you last page number]' THEN [a large number] ELSE [the current value of X] END 

This will move the text box left or right off the page when it is the last page and move it back onto the page when it is any other page number. Now repeat for the other text box and rectangles. Again change the expression to reflect however you have your page numbering set up.

enter image description here

This should hopefully reduce any more work needed to create the atlas. But with a little extra you could do the same with a more complex route. Use the data defined override of the 'X' and 'Y' properties of the text boxes and rectangles and move them around the page depending on the page number.

|improve this answer|||||
  • Thank you for that detailed solution! Unfortunately my overlaps are very alternating. Some pages also have a text field, so the maps have different sizes. The example of that post was very basic. But I think your solution will help someone with the same task. Thanks! – MAP Nov 4 '16 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.