<div style="font-size: 12pt; font-family: Calibri,sans-serif;"><div>Great tutorial, Alexandre.</div><div>Shouldn't it be included in QGis official training manual?</div><div><br></div><div>Envoyé depuis mon HTC</div><br><div id="htc_header">----- Reply message -----<br>De : "Alexandre Neto" <senhor.neto@gmail.com><br>Pour : "Benjamin Wragg" <bwragg@isasolutions.com.au><br>Cc : <Qgis-user@lists.osgeo.org><br>Objet : [Qgis-user] Atlas data defined rotation and zoom problem<br>Date : mar., déc. 9, 2014 00:34</div></div><br><p dir="ltr">Hello Benjamin, </p>
<p dir="ltr">Instead of rotating your map item, change it's size. Take a look at this blog post:</p>
<p dir="ltr"><a href="http://sigsemgrilhetas.wordpress.com/2014/11/09/series-de-mapas-com-formatos-multiplos-em-qgis-2-6-parte-1-multiple-format-map-series-using-qgis-2-6-part-1/">http://sigsemgrilhetas.wordpress.com/2014/11/09/series-de-mapas-com-formatos-multiplos-em-qgis-2-6-parte-1-multiple-format-map-series-using-qgis-2-6-part-1/</a></p>
<p dir="ltr">Hope it helps,</p>
<p dir="ltr">Alexandre Neto<br></p>
<div class="gmail_quote">Em 08/12/2014 21:42, "Benjamin Wragg" <<a href="mailto:bwragg@isasolutions.com.au">bwragg@isasolutions.com.au</a>> escreveu:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi list,<br>
<br>
We have a layer filed with polygons which Atlas uses as its coverage layer. So the Atlas creates a map of each polygon and it zooms to the edge of the polygon and then puts a 1% margin on it. The problem we had before 2.6 was that some maps needed to be rotated because the map is a small landscape rectangle but some polygons are more portrait, tall and skinny. So some maps print at a large scale as shown below (outside box is page, inner box is polygon):<br>
<br>
_______________________<br>
|                  ____                   |<br>
|                  |      |                   |<br>
|                  |      |                   |<br>
|                  |___|                   |<br>
—————————————<br>
<br>
But we need it to rotate the map so it can print like:<br>
<br>
________________________<br>
|    ___________________    |<br>
|    |                                    |    |<br>
|    |                                    |    |<br>
|    |__________________|    |<br>
—————————————<br>
<br>
So in 2.6 a feature I’ve been waiting for was added, data driven rotation. So each polygon has had a rotation value field added. So if I specify a value of say 90, it rotates the map 90 degrees as expected. The problem is Atlas seems to do things in this order:<br>
<br>
1. Get the next polygon<br>
2. Zoom to the polygon<br>
3. Add the 1% margin.<br>
4. Rotate the map as defined in the data<br>
<br>
Because it seems to do the rotation after it has zoomed to the polygon, the map isn’t benefiting at all from rotating the map. The map is still printing at the same large scale. Looks something like this:<br>
________________________<br>
|              ________                 |<br>
|              |               |                |<br>
|              |_______ |                |<br>
|                                               |<br>
—————————————<br>
<br>
Is there a work around for this anyone has come across?<br>
Is this the way it should work? Should the order be more:<br>
<br>
1. Get the next polygon<br>
2. Rotate the map as defined in the data<br>
3. Zoom to the polygon<br>
4. Add the 1% margin.<br>
<br>
Thanks,<br>
<br>
Benjamin Wragg<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div>