1

I am trying to make a map in QGIS composer. The final image needs to be transparent and I cannot get rid of the unwanted lines by making the bounding box smaller. Is there a way to remove/erase lines that I do not want in the final map (circled in red)?

Parts to delete

1

One approach:

  • change your layer style to use the "Rule based renderer"
  • add a filter rule which is only matched when the map is rendered in composer: @map_id <> 'canvas'
  • add a subfilter under this which hides those particular lines. You'll need some way to identify them, such as any ID field which is present in your data.
0

You can change the scale to decrease the value (zoom in) to get rid of the unnecessary lines. Or you can fix the scale using Data defined override by simply copy/paste the scale value, and change the extent.

enter image description here

enter image description here

Another option is to add graphic on regions you want to hide:

enter image description here

6
  • The problem with this approach is that there are areas that I want that will be removed if I zoom in. For instance I would like to keep the whole of Afghanistan which includes the protrusion in the upper right of the country. Mar 27 '17 at 3:14
  • Then you can use the add graphic to hide specific regions.
    – ahmadhanb
    Mar 27 '17 at 3:16
  • Sorry, I forgot to mention that I want the image to be transparent and adding the graphic to cover up parts does not allow me to do this. Mar 27 '17 at 3:21
  • Then you need to edit you question to add any additional information of what exactly you want to do.
    – ahmadhanb
    Mar 27 '17 at 3:29
  • My question has exactly what I want to do - erase those lines. Not change the zoom, not cover them up. Erase them. Mar 27 '17 at 3:30

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.