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

Tobias Wendorff tobias.wendorff at tu-dortmund.de
Tue Oct 29 11:35:22 PDT 2019


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


More information about the gdal-dev mailing list