# Assigning points to all bends on polyline in QGIS 3.6

I have a series of polylines representing water pipelines that I want to clean up. I want to split the pipeline polyline at key locations where there is a fitting such as a stop valve or hydrant.

Where there is a formed bend I want to add a point and split the pipeline at the bend. Bends come in set angles (say 5, 11.25, 25, 45 and 90 degrees). The pipeline may have smaller bends, say up to 3 degrees, but I want to ignore these.

Is there a way to assign a point at bends on a polyline and assign the angle of the polyline as an attribute? I can select and remove all of the small-angle points.

I think that the two following tool (from the processing toolbox) may help you to do what you want,

The first one help only if your bend are true curve (not likely to really help you).

The second by extracting vertices and adding a field for the bisector angle at the position of vertice that should do exactly what you want (It seem that the angle value on point is average angle of lines before and after vertex. First point has no "before line" so its actual angle of line after vertex. Last point has no "after line" so its actual angle of line before vertex. Angle are in degrees clockwise from north to line geometry)

Segmentize by maximum angle

This algorithm segmentizes a geometry by converting curved sections to linear sections. The segmentization is performed by specifying the maximum allowed radius angle between vertices on the straightened geometry (e.g the angle of the arc created from the original arc center to consecutive output vertices on the linearized geometry). Non-curved geometries will be retained without change.

Extract vertices

This algorithm takes a line or polygon layer and generates a point layer with points representing the vertices in the input lines or polygons. The attributes associated to each point are the same ones associated to the line or polygon that the point belongs to. Additional fields are added to the point indicating the vertex index (beginning at 0), the vertex’s part and its index within the part (as well as its ring for polygons), distance along original geometry and bisector angle of vertex for original geometry.