[Qgis-user] Atlas data defined rotation moves features out of view

Benjamin Wragg support at isasolutions.com.au
Sun Nov 20 22:44:33 PST 2016


Hi,

I’m using 2.18.0 and am having a problem with using the “Map Rotation" feature in the Atlas.

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. On the polygon layer we’ve added a rotation value field and on some we rotate it if needed e.g  if it looks like this:

_______________________
|                  ____                   |
|                  |      |                   |
|                  |      |                   |
|                  |___|                   |
————————————— 

We enter a value of 90 and it rotates the map 90 degrees as expected so it can print like:

________________________
|    ___________________    |
|    |                                    |    |
|    |                                    |    |
|    |__________________|    |
————————————— 

The problem I’m having is that if the polygon is an unusual shape it rotates it out of the map frames extent e.g

No rotation - https://www.dropbox.com/s/unolamtod3ntu9u/0Rotate.png?dl=1 <https://www.dropbox.com/s/unolamtod3ntu9u/0Rotate.png?dl=1>
problem when 30 degrees of rotation - https://www.dropbox.com/s/p5uv3gy360e54js/30Rotate.png?dl=1 <https://www.dropbox.com/s/p5uv3gy360e54js/30Rotate.png?dl=1>

Atlas seems to do things in this order when I change the current Atlas polygon:

1. Get the next polygon
2. Zoom to the polygon
3. Add the 1% margin.
4. Rotate the map as defined in the data

Is there a work around for this anyone has come across? 

Is this the way QGIS should work? Should the order be:

1. Get the next polygon
2. Rotate the map as defined in the data
3. Zoom to the polygon
4. Add the 1% margin.

Thanks. I have posted a similar question but different issue about 2 years ago http://lists.osgeo.org/pipermail/qgis-user/2014-December/030178.html <http://lists.osgeo.org/pipermail/qgis-user/2014-December/030178.html> .  The solution given was to change the map size/orientation. This isn’t an option for me as I have a fixed map size which must be in landscape.

Thanks,

Benjamin 


More information about the Qgis-user mailing list