I recently started using the Atlas feature on QGIS 2.18 and have a problem making it work as I want. More precisely I need to be able to easily reuse an atlas for a 100% similar project (same layer names, same columns structures) but at a different location.

More detailed explanation:

I have 25 projects with the same structure (same layer names, same columns) I prepared a Composer for an atlas for projectA (with a map, a legend 2 attributes tables) which works well. I finish printing my pdf files, I save my composer and close it.

Later on I come back with project B, open my project B layers and open my composer. I was hoping that the composer would adapt to my project B layers (which have exactly the same name and same structure as project A). unfortunately it did not work out and I have to redo the attribute tables, the legend...

I looked into this problem but have not been able to find a solution.

  • Have you tried recording links with relative path and not absolute? (Projet- properties - General) – Christophe Nov 5 '18 at 12:47
  • Hi,It's already saved as relative path. But there's something I did not know : in my project file (.qgs), the datasource is relative, but there are still some lines where the absolute path is stored. Also, in my composer file (.qpt) the source path is in absolute. (vectorLayerSource="C:/Users/...... ) I don't know if it is normal or not – Wan Nov 5 '18 at 14:47
  • 1
    You could try changing the file path in the text of the .qpt file. Just be sure to make a backup in case you corrupt the file. First try changing it from absolute to relative. If that doesn't work, make a copy for every project and change the absolute path in each copy. – csk Nov 5 '18 at 16:36

For a similar problem (same data structure but at different date in my case) my solution was to create a base project with all the layer and print composer template.

Then for each new project I opened the base project, do a "save as" under a new name and change the data source of some of the layer (at the time it was requiring a plugin to change data source, I don't know if this is still the case). Of course in my case all of the base layer stayed the same and I only have to change a few layer (like changing datasource of "data_january" by "data_february") to get an updated project. but if you dont have to many layer this could be a viable solution.

  • I see what you mean. Since I found that the absolute path is clearly written in my .qpt file (even if my project parameter is for relative path) I will try to copy paste my entire composer file (.qpt) and find and replace the path to the vectorlayersource in it. I don't know if it will work out, i'll test and keep you informed. This would be a kind of similar solution to what you propose – Wan Nov 5 '18 at 14:54

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.