[Qgis-user] Is this a bug in the vector clipping algorithm?

Alister Hood alister.hood at gmail.com
Tue Jun 1 01:29:16 PDT 2021


Hi everyone,

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).

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.

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?

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?).
[image: image.png]

Regards,
Alister
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210601/491edc06/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 7553 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210601/491edc06/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Layers.zip
Type: application/x-zip-compressed
Size: 10296 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210601/491edc06/attachment.bin>


More information about the Qgis-user mailing list