TransWikia.com

How to use colors to distinguish between bordering features in QGIS?

Geographic Information Systems Asked by earlyinthemorning on May 31, 2021

I have a lot of data that involves connecting line segment features, and they already have color-coded categories based on the type of segment. Is there away to have touching features shaded differently or distinguished in some other way so that it’s more obvious where one ends and the other starts? I don’t know if QGIS has an existing option for this or if there is a plugin that does this.

One Answer

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

Answered by Babel on May 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP