3

I am trying to inspect the vertices of some linestrings in QGIS 2.4. My goal is to visualize every vertex of a line and easily find those that are duplicated. To clarify this, for an example line composed of vertices a, b, c, d in following order:

a, b, b, c, d, d

I want to be able to clearly distinguish vertices b and d from a and c.

Right now I have two symbol layers for the line, a simple line and a marker line with markers placed on every vertex. I tried to lower the simple marker's fill's alpha channel so that overlapping markers are less transparent but this doesn't seem to work. (Setting the marker's transparency via the transparency slider seems to be bugged).

Anyone know of any practical solutions? (e.g. inspecting the actual coordinate values is not ideal)

I am after something like this (without labels of course): enter image description here

To clarify, only points b and d occur twice. Points a and c (not labelled here) occur only once.

EDIT

Although lowering the alpha channel doesn't appear to work initially, the visual effect interestingly appears when you go in editing mode. No idea why this happens.

2
  • Do you want this done just visually for the effect, without doing it using some gis processing functions?
    – SaultDon
    Commented Oct 21, 2014 at 23:41
  • @SaultDon I only need a visual distinction at the moment. Something that could be applied to the line layer relatively fast.
    – Harry G.
    Commented Oct 22, 2014 at 0:36

3 Answers 3

3

You could use the Intersect function (Vector > Geoprocessing Tools > Intersect) to provide you with another line layer with where the duplicates lie. You can then give your 2 layers different colours (eg. make the original layer to be thicker and darker; the intersect layer to be thinner and lighter):

Intersect

If you want to see the duplicates in a single line layer then you can use the Merge shapefiles to one function (Vector > Data Management Tools > Merge shapefiles to one). Before you do this, make sure you add an additional attribute to each layer and add a value to all fields in the respective layer. I created a string column called "Road" and added the value 'Main' for the original layer and 'Duplicate' for the intersected layer. You can then use the Rule-based style filtering in the merged layer to differentiate between the original layer and the merged layer:

Merged style filter

Merged layer

Hope this helps.

2
  • Intersecting a line with itself produces the exact same line. I am not sure what your screenshots show or how you produced them... Anyway, this is not what I am asking. I will add a screenshot of what exactly I am after.
    – Harry G.
    Commented Oct 21, 2014 at 22:36
  • Yes, I forgot to mention that I intersected the layer with itself with selected features which I knew beforehand were overlaps. I wrote a comment under @SaultDon giving a little more info which may help.
    – Joseph
    Commented Oct 22, 2014 at 10:57
2

Lowering the marker's alpha channel will make overlapping vertices of the same feature stand out but only after entering editing mode.

For a sharper distinction between duplicated nodes than the aforementioned, there is another solution, although it is less practical:

  1. Use the Extract nodes algorithm (or Vector->Geometry Tools->Extract nodes from the menu) and save the vertices as a new layer.
  2. Use the TopologyChecker plugin to highlight duplicates with the 'must not have duplicates' rule.
1

For a visual effect, you can use QGIS's blending options.

Create your marker line symbol like you have, with a light colour and on every vertex, and at the bottom of the style tab, put Feature Blending Mode to Multiply (not Layer Blending Mode).

Marker Line with Multiply Blending in QGIS

Then from a glance, it becomes apparent which nodes are overlapping. In the picture below I have two copies of the same layer in the layer list, one with marker symbols with blending applied, the other with a single line style with no blending. You can turn on blending for the line styled one too to make overlapping lines stand out if you like.

Overlapping Nodes in a line feature with QGIS

2
  • Very good post! I suppose if you add another simple line with the dash style then you have a style that I think is almost asked for in a single layer. @HarryG., you could set a Rule-based style which allows you to specify which features you want to have the same style as shown as above, based on the layers attributes.
    – Joseph
    Commented Oct 22, 2014 at 10:54
  • I agree that this is helpful if you are examining overlapping features but this is not what I am asking. I am examining overlapping nodes/vertices of a single feature. This doesn't work in this case.
    – Harry G.
    Commented Oct 22, 2014 at 21:52

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.