1

My goal: I want to have curved labels placed in the center of a linestring. I define the label position with the expression x: $x_at( num_points( $geometry)/2) y: $y_at( num_points( $geometry)/2) to center the labels.

My problem: When I set data defined coordinates the label gets displayed horizontally even though I have set the label placement to curved (possibly due to an old QGIS bug):enter image description here

My (unsatisfactory) solution: I also set an expression for the rotation (angle_at_vertex( $geometry , num_points( $geometry)/2)-90), but the results are by far not as good as having a curved label:enter image description here

Does anyone have an idea how to create curved labels centered on a linestring?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.