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

Benjamin Wragg support at isasolutions.com.au
Mon Nov 21 13:54:21 PST 2016


Hi Nyall,

It does sounds like the same problem. While I haven’t seen the code the comment from Spencer Gardner sounds like a similar idea to what I was thinking:

" it would be a good idea for Atlas to check for margins after it knows the final dimensions of the map item in composer rather than beforehand, which appears to be the current process.”

Is there any work around?

Regards,

Benjamin

> On 21 Nov 2016, at 6:22 pm, Nyall Dawson <nyall.dawson at gmail.com> wrote:
> 
> 
> 
> On 21 Nov 2016 5:43 PM, "Benjamin Wragg" <support at isasolutions.com.au> wrote:
> 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.
> 
> Sounds like http://hub.qgis.org/issues/11954 - can you confirm?
> 
> Nyall
> 
> 
> 
> 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
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 




More information about the Qgis-user mailing list