<div dir="ltr"><div dir="ltr"><div>Hi everyone,<div><br></div><div>I found that if a line touches itself, if I use the vector overlay "clip" algorithm on that layer, the feature gets broken up into 3 pieces (I can tell by running it through the "multipart to singleparts" algorithm).</div><div><br></div><div>See the screenshot below of some example inputs, and 

I've attempted to attach the layers.  If I run the line layer through "multipart to singleparts" it produces a layer with only one feature.  But if I use the polygon to clip the line layer, and then run it through "multipart to singleparts" it gets split 

at the point where it touches itself,  into three pieces.</div></div><div><br></div><div>I haven't been able to find a tool for validating or repairing geometries that thinks there is a problem with the original geometry, so I think this is a bug with the clip algorithm.  Should I file a ticket?</div><div><br></div><div>Or should the original geometry be considered invalid, so I can't expect the algorithm to preserve it as a single feature?  If that's the case do we need a better tool for validating or repairing geometries, which can identify geometries with this problem?).</div><img src="cid:ii_koe284z70" alt="image.png" width="420" height="358" class="gmail-CToWUd gmail-a6T" tabindex="0" style="cursor: pointer; outline: 0px;"><br></div><div dir="ltr"><br></div><div>Regards,</div><div>Alister</div></div>