I creaetd a map with 6 vector layers (each is a .shp-file), the geometry type varies: 4 are polygons, 2 are lines.

I would like to print a region - to be specific approx. 20 individual regions - of the map.

Until now, I didn't find a proper way to do it. This is my workaround so far: One vector layer (polygon) has the outlines of the 20 regions I want to print. I color the 19 regions I don't need white, and leave the one I need transparent. Hence, I kind of have the region I want and can print it with the print composer. The drawback: I would like to print Streetnames, which are included in one vector layer (geometry type: lines; "roads" from OSM). If I turn on labels for the street names, they are not covered up by the 19 "white" regions, hence I have street names in the "white" regions that should be invisble for printing.

names outside desired boundaries

Do you have an idea how I can get rid of the names or - even better - a suggestion how to reach my desired result in a better way?

| improve this question | | | | |

Finally, I solved the issue myself - which turned out to be not the complicated after all:

  1. Making sure, that the polygon layer and the lines layer use the same KBS.
  2. Using a spatial join to add attributes from the polygone layer to the lines layer (VECTOR | DATA MANAGEMENT TOOLS | JOIN ATTRIBUTES BY LOCATION)
  3. in addition to using the mask-layer I filter by the same attribute in the lines layer which I got from the polygone layer.

This is the how-to I used:Spatial Join

| improve this answer | | | | |

As far as i understand your problem you don´t want to see anything outside your desired regions?

In this case i would suggest using a white mask-layer with the area outside your regions and put this on top of the other layers. This way most of the outlying elemts are not visible anymore (some might be a bit inside depending on the accuracy of your data and the mask-layer).

You can do it either by creating a new large polygon where you cut out your regions, or use your regions with the style option inverted-polygons and set them to white.

| improve this answer | | | | |
  • Thanks for your suggestion. This is what I already tried and described above - however, the streetnames show up nonetheless (as visible in the picture). By "on top of other layers" you mean that this layer is the first in the list of layers, right? Or is there another way of declaring that this should be on top? – amauss Mar 21 '16 at 10:11
  • I see the problem. You may try to set the labels for your mask layer to the last option to not hide objects of this layer by other labels. In theory this should work, but i just tried with some data and it still leaves some labes :( – Matte Mar 21 '16 at 11:15
  • thx - no, doesn't work... :-( – amauss Mar 21 '16 at 17:17

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.