Skip to main content
added 955 characters in body
Source Link
Babel
  • 73.2k
  • 14
  • 83
  • 219

Instead of marker line, use Geometry Generator symbol layer type and use the following expression to create the vertices, then apply the marker type you wish:

collect_geometries(
    array_foreach(
        generate_series (
            1,  
            array_length(
                geometries_to_array( 
                    nodes_to_points ($geometry)
                )
            )-1
        ),
        point_n($geometry, @element)
    )
)

enter image description here


Variant to place all the font markers indide (or outside) of the polygon

For this, modify the geometry expression accordingly. Adapt the distance in line 3 to an appropriate value (if you make the value negative, points will be place outside of the polygon; with positive values inside the polygon):

enter image description here

with_variable(
    'dist',
    0.01, -- set an appropriate distance; negative values to place outside of the polygon
collect_geometries(
    array_foreach(
        generate_series (
            1,  
            array_length(
                geometries_to_array( 
                    nodes_to_points ($geometry)
                )
            )-1
        ),
        end_point(
            extend(
                make_line (
                    point_n($geometry, @element),
                    project (
                        point_n($geometry, @element),
                        -@dist,
                        radians(90+angle_at_vertex( $geometry, @element-1)))
                ), 
                0,
                @dist*5
            )
        )
    )
))

Instead of marker line, use Geometry Generator symbol layer type and use the following expression to create the vertices, then apply the marker type you wish:

collect_geometries(
    array_foreach(
        generate_series (
            1,  
            array_length(
                geometries_to_array( 
                    nodes_to_points ($geometry)
                )
            )-1
        ),
        point_n($geometry, @element)
    )
)

enter image description here

Instead of marker line, use Geometry Generator symbol layer type and use the following expression to create the vertices, then apply the marker type you wish:

collect_geometries(
    array_foreach(
        generate_series (
            1,  
            array_length(
                geometries_to_array( 
                    nodes_to_points ($geometry)
                )
            )-1
        ),
        point_n($geometry, @element)
    )
)

enter image description here


Variant to place all the font markers indide (or outside) of the polygon

For this, modify the geometry expression accordingly. Adapt the distance in line 3 to an appropriate value (if you make the value negative, points will be place outside of the polygon; with positive values inside the polygon):

enter image description here

with_variable(
    'dist',
    0.01, -- set an appropriate distance; negative values to place outside of the polygon
collect_geometries(
    array_foreach(
        generate_series (
            1,  
            array_length(
                geometries_to_array( 
                    nodes_to_points ($geometry)
                )
            )-1
        ),
        end_point(
            extend(
                make_line (
                    point_n($geometry, @element),
                    project (
                        point_n($geometry, @element),
                        -@dist,
                        radians(90+angle_at_vertex( $geometry, @element-1)))
                ), 
                0,
                @dist*5
            )
        )
    )
))
Source Link
Babel
  • 73.2k
  • 14
  • 83
  • 219

Instead of marker line, use Geometry Generator symbol layer type and use the following expression to create the vertices, then apply the marker type you wish:

collect_geometries(
    array_foreach(
        generate_series (
            1,  
            array_length(
                geometries_to_array( 
                    nodes_to_points ($geometry)
                )
            )-1
        ),
        point_n($geometry, @element)
    )
)

enter image description here