I have a polyline. I want to delete outside boundaries of that polyline. I achieved it by splitting the features of that polyline and selecting/deleting the outer lines/boundary.

I'm thinking, is there a way to achieve this without the manual editing?

The image below is BEFORE while the latter is the AFTER(what I want to achieve).

enter image description here

enter image description here

  • It's not clear what you're asking for. Can you add an illustration of what the tool would do? Something like the before/after screenshot you provided for the dissolve tool. – csk Jan 24 at 18:22
  • Hello @csk I already reworded my question and added my own screenshot image. Hope that my question will be opened. – brentiemapper Jan 30 at 3:15
  • 5
    Convert to polygons. Spatial join lines to polygon, 1:M. Count number of jojns. Line with count =1 to be removed. Use share boundary for spatial join. – FelixIP Jan 31 at 5:47

There are two tools in QGIS that could help you with this. In the processing toolbox:

  • Under QGIS geoalgorithms | Vector geometry tools (in QGIS 2.1x) or Vector geometry (QGIS 3.4) find the Lines to polygons tool to create a polygon layer from your polylines
  • Under SAGA | Vector polygon tools find the Shared polygon edges tool to create a layer containing polygon edges common to more than one polygon.

The result should look something like my example (I symbolized points at each polyline start and endpoint) below. Bear in mind that in the case of two polygons sharing edges with a larger one, there needs to be a common vertex along the longer edge for this to work. The one circled in blue is a straight line and a vertex needed to be added at the junction in the middle before running the Shared polygon edges tool.

enter image description here


If I have understood correctly, you can select the outside polylines and then use the Erase tool (ArcGIS) / Difference tool (QGIS).

  • 1
    OP: "I'm thinking, is there a way to achieve this without the manual editing?" – Jon Jan 31 at 17:49

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.