7

I have created a new Print Composer. By default it shows fine as per screenshot:

enter image description here

However, when I set the Map Rotation, the Shapefile Layer set as an Inverted Polygon (Gradient) does not cover the surrounding area, outside of the red dotted lines as per this screenshot:

enter image description here

Any ideas what I need to do to correct this?


QGIS 2.18.11

CRS = OSGB 1936 / British National Grid - EPSG:27700

Symbology Settings: Symbology Settings

Layers Panel: Layers Panel

  • 1
    could you provide a pic of your symbology settings? What CRS are you using? What QGIS version are you using? Your problem is -at least for me- not reproducable. – Nightwatch Sep 8 '17 at 9:02
  • Is the inverted polygon the same mapwindow? IE are all your layers in the same mapwindow? – Konan Pruiksma Sep 8 '17 at 12:26
  • 1
    I've had something similar with QGIS and other programs. My understanding is that its some kind of rendering bug and never did any real harm, just a bit annoying. When you print to pdf or an image, does the issue persist? – Knightshound Sep 8 '17 at 15:15
  • 1
    Anyone else have any ideas please? – Darren Larner Sep 12 '17 at 9:28
  • 1
    I just experienced a similar issue with rotating inverted polygons, except with a shapeburst fill instead of a gradient fill. After exporting to PDF, it appeared as though the inverted polygons were first (in a virtual sense) rendered to extended just beyond the edge of the layout frame at zero (0) rotation, and then rotated above the map itself, then exported to PDF. In my case, my map rotation was -6 degrees, which left (approx) six degree "triangle voids" in the upper right and lower left corners where the inverted fill was not covering the map. – RyanDalton Dec 1 '17 at 20:33
1
+100

I think that some of the advanced renderers are still a bit buggy. I have also had issues with the inverted polygon renderer when printing or exporting images.

The only work-around I can think of, short of getting stuck into the code and finding a fix for the bug, is creating a vector feature that is that inverted polygon, and then using that as the feature you're styling and mapping. To do this, create a polygon that is larger than your print area, then use a 'difference' operation using your original shape to create the 'inverted' polygon.

I know this is a work-around, and not a solution, but I reckon it's as good as you'll get, unfortunately.

(Note, for bonus points, you can create an issue here, documenting the bug.)

  • 2
    Agreed about the issue and workaround. The workaround, however, is only helpful for 1-off mapping projects. Unfortunately (like in my case), when using Atlas to loop through a series of maps, constructing an on-the-fly temporary inverted vector polygon layer for each isn't a viable option, either. – RyanDalton Dec 1 '17 at 23:57
  • That's true, @RyanDalton, but you could create the new polygon features with an ID that relates to your atlas features and only show the ones you currently want? So make many of the semi-transparent masks. – Alex Leith Dec 2 '17 at 3:38
  • 1
    Looks like there is a ticket on this issues.qgis.org/issues/18493 – Baswein Apr 4 '18 at 20:49
  • On the bug tracker someone said that it "does not occur when rotation is set to 0, 90, 180, or 270 degrees." So in my case, in my print layouts I change the rotation, with an expression, to go to the nearest of 0, 90, 180 and 270. – blue_chip Dec 10 '18 at 20:29

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.