I have a polyline layer which is in individual segments in some areas, i.e. there are two line features which share an end vertex location but are separate database features. The line is a route that is split into zones, and each zone has sub-sectors. For some reason, some sectors are made up of multiple individual lines. I need to add a Marker Line that displays a symbol at the last vertex, to help distinguish the zone-sectors, and so I need to ensure each sector is a single line.

I used Dissolve on the original layer, with zone and sector as specified fields, to combine the segments into one where the values in the two fields are identical. Exploring the results of the dissolve show that this has worked as expected, as I now have a single feature for each zone-sector combination.

I have found how to add the marker line, with marker displayed "on last vertex only", within the layer's Style. However, the marker displays in the middle of the line as well, at the vertices that used to be the end of the initial segments (before the dissolve). On sectors that did not need to be dissolved, it displays as expected with a marker only at the end. It is as if the previous vertices have retained their "end" status after the dissolve operation.

Selected single line feature shown in purple, with "last vertex only" markers showing at non-last vertices.

Image: Selected single line feature shown in purple, with "last vertex only" markers showing at non-last vertices.

I am an experienced ArcGIS user making my first serious use of QGIS (v2.18.7). Is there some subtle difference in the Dissolve tool that I am missing, or is it a bug? How can I get my markers to show up only at the true last vertex of my dissolved lines?

Edit: example file here. This is a shapefile containing a feature which was digitised as a single line, then split using Split Feature, then Dissolved based on the ID. If you apply a Marker Line symbol to it, to display at last vertex only, markers appear at the split points.

  • 1
    Can you share a sample line for some test? However, how many markes do you want to create? One marker (at the end of the purple line) or two markers (one at the start and one at the end of the purple line)?
    – mgri
    Commented May 10, 2017 at 20:01
  • File now added. I want a marker at each end, so am adding two Marker Lines (one for first vertex, one for last) to each line symbol. But the behaviour was noticed with just one marker line initially (didn't matter if it was first or last vertex). Commented May 11, 2017 at 14:58
  • I did some further testing and found that if I manually select all of the parts of one sector, then do Merge Selected Features, it behaves sensibly i.e. with markers at the true ends only. So I can do that for now, as I do not have many sectors, but I would still like to know if this is a problem with Dissolve or with my use of it. Commented May 11, 2017 at 15:00
  • I can't reproduce the issue. I initially used the Split Features tool and split the line. Then, I ran the Dissolve tool using the id and finally I applied the style to the last result. If I check the on last vertex only option, I see only one point at the end of the line and not one point for each intermediate vertex. Did I reproduce the issue in a wrong way?
    – mgri
    Commented May 11, 2017 at 15:33
  • That sounds like exactly what I did. Did yo do that on a new line, or on the line in my example file? Commented May 11, 2017 at 20:34


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.