3

I have a road network in which all roads are represented by lines. Depending on the size of the road, a road can be represented by two geometries (i.e. two driving directions). However, these two geometries are displayed on top of each other.

I want to shift them so that these two directions are displayed next to each other instead of on top of each other.

  • Overlapping geometries/directions are drawn in different direction. So, if you display the network in QGIS with arrows, you can see this difference.

  • The ID of these overlapping geometries are characterised by + and - (e.g. +10123 and -10123 overlap).

Some help and/or tips are more than welcome to overcome this problem by, preferably, using QGIS, PostGIS and/or Python.

Viaene
  • 111
  • 10
  • I think I found part of the answer: the offset line tool in QGIS. This allows me to shift geometries over a certain distance. QGIS takes the drawing direction into account so the overlapping geometries are shifted in differently. – Viaene Apr 02 '19 at 09:21
  • But how can I preserve the topology of the network? – Viaene Apr 02 '19 at 09:30

1 Answers1

0

You can apply a symbol offset, so to change line visualization but not topology.

Go in layer properties and set offset symbol https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/vector_properties.html#id81 so that:

if(ID <0,2,0)

with this setting lines with id < 0 have offset of 2. The offset is only a symbol 'trick', not compromise your line topology

to set the rule you have to click and write the expression in this menu: enter image description here

EFiore
  • 136
  • 4