I'm looking for the QGIS equivalent of TopoJSON's mesh function which goes through a vector layer and only keeps borders that are shared between multiple features. Here's an example of the output -- the black lines are only drawn for internal borders between states:

enter image description here

Is there a way of achieving this in QGIS, without going through TopoJSON? The reason I'm asking is that I'm working with extremely detailed shapefiles and would like to avoid converting from SHP to TopoJSON and back to SHP if possible.

The shapefiles I'm using are topologically correct, ie the arcs of the features line up perfectly.

  • Do you need this for further processing, or only for visualization purposes? – Erik Feb 3 at 10:49
  • Mostly for rendering/viz purposes, so if this is just a matter of using the right style settings that'd do it – zinfandel Feb 3 at 10:54

You qgis should be bundled with the SAGA tool "shared polygon edges" which does exactly what you want:

pink the original polygons, black the internal borders.

| improve this answer | |

If you can't find a way to do that with QGIS you can use OpenJUMP. For perfect result the common boundaries must match exactly and have vertices at the same locations but that should be fine for you.

enter image description here

The tool is named "Extract common boundrary between Polygons" but the name is partly misleading because actually also non-common boundaries are extracted as we will see.

enter image description here

The result is a new line layer where each line is categorized as shared or nonshared.

enter image description here

Select the shared ones and you have your result. You can save the result as JUMP JML, shapefile, or GeoJSON. QGIS can read all those formats.

| improve this answer | |

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.