3

I have multilines (vector) with two SVG symbols. I use marker placement with interval and offset along the line. How can I set that if a symbol is some distance from the end of a line (symbolised by circle) then a symbol is not visualised?

enter image description here

1
  • Could you include an example image, say a screenshot of what you have now with the markers and then describe (or annotate on the image) which markers you don't want? Not quite clear what you need, I'm afraid.
    – Houska
    Jun 4 at 9:02
3

The first step would be to transform the multi-parts lines to single part lines.

Then, you can use the geometry generator in the style to create new shorter lines and to style them as you wish.

In the style panel, click the green plus sign and choose it to be a geometry generator, select the type type as lineString.

Generate the shorter lines using the following expression. Adjust the distance from start / end to suit your needs. Note that these distances are expressed in CRS unit (in the example below, they are in meters).

 line_substring( 
   $geometry,
   50,
   length($geometry)-50)

You can then apply your svg styling on this generate lines.

On the example below:

  • green lines: original lines
  • black lines: reduced lines
  • symbols: applied on the reduced lines

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.