I have line segments that have the following 3 attributes (Class, start_point, end_point). I would like to merge/dissolve line segments that fall within the same class if they intersect (touch).
i.e. if the end_point of one line segment and the start_point of another line segment are the same (similar values). (NB. I would like to dissolve lines with the same class value. The dissolve field can also be a new field which will be generated when streams meet the above condition: ie they fall within the same class as well as the end_point of one segment = start_point of another segment)
The circled numbers represent the class (order) of the streams. Each segment has a corresponding class number as shown. The segments circled in red should be dissolved separately. The same should be done for the segments circled in green. Each segment has a start_point and an end_point. For example for the segments in yellow the end_point of one segment and the start_point of the other coincide.
The lower segment circled in red should not be dissolved with the lower segment circled in green because only their end_points coincide.
How can I proceed to do this in QGIS?