1

I am trying to generate preliminary sign poles location with the QGIS function points along geometry. I was able to generate points in respect of distance requirements. I would like to know if there is a way to add a condition to avoid polygons in other layers while generating those points.

3
  • There's a way, but it would probably involve modeling to split/remove the segments along where you don't want signs.
    – Vince
    Commented Mar 6 at 17:23
  • If there is a polygon covering parts of a line, do you want to start over the distance measuring after the polygon or continue the measuring from before the polygon?
    – Bera
    Commented Mar 6 at 18:17
  • I don't want to start over the distance everytime there's a polygon. Hence, I can't cut the polylines where it intersects the polygons. I am looking for a way to exclude those areas when the algorithm generates those points.
    – sdl24
    Commented Mar 6 at 22:41

1 Answer 1

1

Create the points, then make the differnce of these points with the intersection polygons, e.g. with Geometry by Expression or Geometry Generator:

difference (
    collect_geometries(
        array_foreach(
            generate_series(1,50),
            line_interpolate_point( 
                $geometry, 
                @element*0.08
            )
        )
    ),
    collect_geometries(
        overlay_intersects(
            'polygon',
            $geometry
        )
    )
)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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