4

My road network is broken up into segments. I want to produce a map that shows where the segments start and finish.

I don't really want to create a point layer that shows the location of the ends of each line, but will if I have to. And I know that I could categorise segments and use a colour ramp or random colours, but I was looking for something that would look a little more classy.

I was wondering if there is a way to use a colour ramp - or gradient fill - for lines in QGIS? What I envisage is every line segment starts with one colour and finishes with another colour. This would also serve to indicate line direction - another one of my requirements.

Any ideas? Johanna

  • 1
    For the line direction, you could use arrows as line style. – AndreJ Aug 6 '15 at 7:48
4

In the moment there is no way to colour lines with a gradient style.

First buffer your linestrings. Then you can set a gradient colour for the buffer polygons.

Here is a HowTo: How to visualize measure values along linestrings in QGIS?

Another Idea

requirement: your lines have an disinct ID

  1. Cut your linestrings in very small substrings (that it looks like a gradient).

    "______" linestring with id 1 and 100m

    "----------" every single substring must have a distinct id or serial number. Here 1 to 10 (one substring 10m). When all the linestrings have the same direction it would start with 1 und end up with the maximum count of substring.

    1. Categorize the substrings and use a color ramp: 1 green 10 (n substrings) red

Problem could be the large amount of classes, if you have very long linestrings.

  • Thanks @Stefan, the idea of buffering the lines will work for me. – Johanna Aug 6 '15 at 22:27

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.