I have discovered how to create vector lines to indicate flow direction and velocities. With a "vector field marker" symbol layer type, the lines lengths vary based on the data attributes. However, when using an arrow as a symbol layer type, I can only seem to get the line to scale and not the arrow head. I would like to scale the arrow head proportionally with the line based on the data attributes. Is there a way to do this?
Answer
You should get the desired output by recurring to a custom expression.
Firstly, click on the Edit...
button for the Head length
option:
Then, type this expression:
length(
make_line(
$geometry,
make_point(
$x + "Vel_X_ft_p_s",
$y + "Vel_Y_ft_p_s"
)
)
) / 3
which is saying, in an imaginary way:
"For the current feature, draw a head having a length which is 1/3 of the total length of the line."
You can obviously change the 3
number as you want and apply a similar rule if you want to do the same for the Head thickness
parameter (you have just learned how to do it).
Applying the edit on the Head length
parameter as above seems to work for me:
No comments:
Post a Comment