Skip to main content
added 348 characters in body
Source Link
Babel
  • 75k
  • 15
  • 87
  • 227

There is a tool Menu Processing / Toolbox / Topological coloring, however only for polygons, not lines. You could still use it:

  1. Create a (small) buffer around your lines.

  2. Apply Menu Processing / Toolbox / Topological coloring to the buffer: it will create a new attribute color_id.

  3. Use Categorized styling and set the color to the field color_id.

  4. Optional: you can join the color_id created on your buffer layer back to your original line layer with Join attributes by location

The screenshot shows the solution using buffers: if they are small enough, they appear as lines:

enter image description here

There is a tool Menu Processing / Toolbox / Topological coloring, however only for polygons, not lines. You could still use it:

  1. Create a (small) buffer around your lines.

  2. Apply Topological coloring: it will create a new attribute color_id

  3. Use Categorized styling and set the color to the field color_id

There is a tool Topological coloring, however only for polygons, not lines. You could still use it:

  1. Create a (small) buffer around your lines.

  2. Apply Menu Processing / Toolbox / Topological coloring to the buffer: it will create a new attribute color_id.

  3. Use Categorized styling and set the color to the field color_id.

  4. Optional: you can join the color_id created on your buffer layer back to your original line layer with Join attributes by location

The screenshot shows the solution using buffers: if they are small enough, they appear as lines:

enter image description here

Source Link
Babel
  • 75k
  • 15
  • 87
  • 227

There is a tool Menu Processing / Toolbox / Topological coloring, however only for polygons, not lines. You could still use it:

  1. Create a (small) buffer around your lines.

  2. Apply Topological coloring: it will create a new attribute color_id

  3. Use Categorized styling and set the color to the field color_id