I'd like to create a mapbook along a given route that is designated by a single linear feature. Is it possible to have QGIS (2.2) automaptically compose a series of pdfs that over lap by a given percent and rotate the map to optimize space?



QGIS' Composer has the ability to create an "Atlas" built in, and it works very well.

It sounds like you have a single feature defining your route? If so, you'll need to create a 'grid' representing how you want the pages rotated and sized to use as the "Coverage Layer"

If your route is actually distinct features, you can just use the route layer as the "Coverage Layer" to define the pages.

Steps are basically as follows:

  • Create a new composer window
  • Add a new map item
  • Click "Atlas Generation" in the right pane
  • Check "Generate an Atlas"
  • Choose your coverage layer (as above - either a grid you create, or your line layer if it is multiple features
  • fill in any of the remaining (mostly optional) settings

Pages will rotate automatically to match the alignment of the feature in the Coverage Layer, and you can specify the Margin around each feature on the Maps "Item Properties" pane by Selecting "Controlled By Atlas" and entering a percentage.

  • 2
    Note that you must select the map item's properties and tick 'Controlled by atlas', not just if you want to change the margin! (At least, I can't get it to work otherwise)
    – Simbamangu
    Jun 23 '14 at 14:11
  • How do I create the grid needed to represent the pages I want? I was hoping that there would be a way to get it to make a grid based on the scale I've selected and the length of my vector line.
    – NWT Adam
    Jun 24 '14 at 3:29
  • 1
    What I would do is "split" your linear layer into a second layer (for using in your atlas only) using v.split.length under Processing (it's a GRASS tool.) Set this as your "Coverage Layer," make it invisible so it doesn't show up on the map, and you're all set. The Atlas pages will then follow the line, rotate appropriately, and overlap based on the 'buffer' you set, which should meet all of your criteria. Jun 24 '14 at 12:45
  • Every thing seems to have worked except for the auto rotation. Where do I configure that option?
    – NWT Adam
    Jun 25 '14 at 6:14
  • 1
    @DarrenCope Have you or the user ever solved the rotation problem? It doesn't seem to be working for QGIS 2.8 (I tried adding my angle field as an expression as well as leaving it empty). Do let me know if you have any insight to this thread : desktop.arcgis.com/fr/desktop/latest/map/page-layouts/…
    – user25976
    Oct 2 '15 at 2:16

I think the answer in not 100 % correct or possible to follow. Unfortunately I don't have the answer. The problem is that your PDF has two main restrictions: rotation and scale. The rotation is more or less easy but the problem (for me) is that I didn't find a way to automatically fix the scale of the grid with the number of segments that we have to obtain for the grid. I tried to do the same as you but:

The only way that I found to obtain a grid was to use: v.split.length several times till have the linear feature with an approximative number of sections that fix with my scale. Then, in every segment generated you have to obtain the direction ((How to add Direction and Distance to attribute table?) (atan((xat(-1)-xat(0))/(yat(-1)-yat(0)))) * 180/3.14159 + (180 *(((yat(-1)-yat(0)) < 0) + (((xat(-1)-xat(0)) < 0 AND (yat(-1) - yat(0)) >0)*2))))

I posted my question here: Creating atlas along line/route in QGIS?

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.