Is it possible to convert a polygon to polyline in QGIS WITH the adjacent polygon IDs for each polyline segment? I know one can do this in ArcToolbox but need to find out how to do it in QGIS.


It was not clear to me if the question was about a single QGIS tool to do the tasks to [A] convert a polygon to polylines, and [B] return a measure to describe which polygon is adjacent to one another, all at once.

This is an ad-hoc response assuming the mentioned ArcTool is Polygon Neighbors tool, hence about the task [B] only.

Polygon neighbors tool can work for cases of Edge adjacent and Node adjacent - polygons can be attached to each other at edges or at nodes:

(1) Edge adjacent relationships - YES, there is Shared polygon edges tool

Red polylines on the attached image (below) is an output of QGIS Processing Toolbox - SAGA | Vector polygon tools | Shared polygon edges.

enter image description here

The associated attribute table is like below, which shows adjacent polygon IDs:

enter image description here

(2) Node adjacent polygons - Probably NOT

As shown in the above image, Polygon 1 and Polygon 6 share the part of their edges but not completely. ArcToolbox tool may report back this case as a Node adjacent (please correct me if I am wrong). This is rejected by QGIS - SAGA / Shared Polygon Edges tool.

If this meets your selection criteria (I mean, if it is how do you want them to be adjacent), this tool can be helpful.

  • Thanks, that helps a lot and provides me something to work with. – Bruce Eg Mar 26 '18 at 19:15
  • 1
    Thanks, that helps a lot and provides me something to work with. As regards the question about polygons 1 and 6, ArcToolox identifies a common boundary where the two polygons abut and would not identify anything for the situation where there is an unfilled gap between the polygons. Thanks for the help. – Bruce Eg Mar 26 '18 at 19:19

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.