[gdal-dev] Fwd: Gdal - multipolygon - geometry errors instead holes

Marco deduikertjes at xs4all.nl
Wed Oct 30 01:46:45 PDT 2019


Tobias,

Indeed Buffer 0 won't do any good on self intersections. Thats just not 
the way to repair them.

Hence I wrote "Buffer 0 on INVALID geometries IMHO can lead to good 
results depending on the /nature of the invalidity/. To my experience 
/repeating points,//wrong coordinate ordering and holes touching outer 
shells in one point///are being repaired well without data loss.".

Of course self intersections can be easily overlooked. For that we have 
validity checkers.

Marco


On 29-10-19 19:35, Tobias Wendorff wrote:
> Hi Marco,
>
> Am 29.10.2019 um 10:49 schrieb Marco:
>> Buffer 0 on INVALID geometries IMHO can lead to good results depending
>> on the nature of the invalidity. To my experience repeating points,
>> wrong coordinate ordering and holes touching outer shells in one point
>> are being repaired well without data loss.
> I'm sorry to say that the side effects are worse. Maybe the
> implementation of QGIS is wrong, but try the example below.
>
>> Please enlighten me with a few links to the tons of tests on the web
>> showing that buffer 0 is destroying data. My Google skills are not up to it.
> I've just updated the example I'm normally showing students with an
> actual thematic, I'm calling in "wronxit": [1]
>
> Try to "buffer(geom, 0)" it in QGIS...
>
> This problem isn't constructed (well, this geojson is of course), but
> I'm got lots of self-intersecting polygons from different sources all
> the time. "Buffer 0" is destructive here and since many
> self-intersections are damn small, most users simply don't see them.
>
> "Fix Geometries" gives the correct result.
>
> Best regards,
> Tobias
>
> references:
> [1] https://gist.github.com/tobwen/39bc3562d1cb957cbaf4305ef53f77df

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20191030/95838a3d/attachment.html>


More information about the gdal-dev mailing list