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)?
2 Answers
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.
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.
Another option is to add graphic on regions you want to hide:
-
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, 2017 at 3:14
-
-
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, 2017 at 3:21
-
Then you need to edit you question to add any additional information of what exactly you want to do. Mar 27, 2017 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, 2017 at 3:30