0

I have a map with three lines. Each has a marker on it.

enter image description here

I would like to reverse the direction of the topmost marker. So I open Style dialog and enter the expression "direction" * 180. The value of direction of the topmost line is 1. Others are 0.

enter image description here

The result is shown below.

enter image description here

Two issues here:

  • The angles of all markers are the same.
  • The direction of the topmost marker is not reversed. (Is there a way to access a default value of 'Angle' property?)
wannik
  • 525
  • 1
  • 4
  • 18
  • You can turn the symbol by setting the angel into 180 in the Line - Marker line - Marker - Simple marker. The place is visible in your first screen capture. For using data defined properties there should be a field for that in the vector data for telling the angle. – user30184 Jun 16 '14 at 10:22
  • @user30184 I'd like to reverse some markers (not all). – wannik Jun 16 '14 at 11:32
  • Sorry. I made a test shapefile with angle field as "double", I filled in values 0 and 1 and later also 0 and 180 and tried to make the data driven rotation to work. All my symbols seem to stay always at 0°, also SVG symbols. I can only confirm your issue. – user30184 Jun 16 '14 at 12:07
  • I have managed to get it to work using one of the properties (i.e. $length), but of course with the limitation I couldn't get the base angle to add to a calculated bonus. I described a workaround as answer - requires a bit of python use though. – Tim Couwelier Jun 16 '14 at 12:10
  • 2
    If you do not want to edit the data you can make two rule based styles for the lines: one for value "0" and another for "1". Then add marker lines to both styles. For the second one use marker editor and create a 180° rotated copy from the triangle2 marker. – user30184 Jun 16 '14 at 12:24
  • @user30184 Thank you so much for your suggestion. This is what I looked for. – wannik Jun 17 '14 at 02:11
  • @user30184 Please post your comment as an answer so this thread will be marked as answered – underdark Jun 09 '16 at 11:30

1 Answers1

1

It appears the easiest way (given I can't see a method to acces the property that holds the 'standard' marker rotation) is to reverse the actual line direction.

I'd suggest you use a Query to select all items where "direction" = 1 and then apply the method described Here

Tim Couwelier
  • 544
  • 1
  • 8
  • 14