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

Ujaval Gandhi ujaval at spatialthoughts.com
Tue Jun 1 02:05:24 PDT 2021


You can run the 'Check Validity' tool from the Processing Toolbox with
'QGIS' method and it will point out the error. (see screenshot
<https://imgur.com/a/yIP947p>) 'line 1 contains 3 duplicate nodes starting
at vertex 13'. So QGIS will try to fix this by creating a multipart
geometry.
[image: Logo] <https://spatialthoughts.com/>
Ujaval Gandhi
Spatial Thoughts
mobile: +91-8095684687
email: ujaval at spatialthoughts.com
[image: LinkedIn icon] <https://www.linkedin.com/in/spatialthoughts/>  [image:
Twitter icon] <https://twitter.com/spatialthoughts>



On Tue, Jun 1, 2021 at 1:59 PM Alister Hood <alister.hood at gmail.com> wrote:

> 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
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210601/58acb5b3/attachment-0001.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/58acb5b3/attachment-0001.png>


More information about the Qgis-user mailing list