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

Pepa Beneš benespepa at gmail.com
Thu Oct 31 00:22:37 PDT 2019


Hi Tobias,
please, could You help me, with originall question? Is the geometry valid
or it isn't? If it is not, why?

How to explain it to the data author, who can only see valid geometry with
holes where he wants to see them in his ArcMap. But QGIS can see "nested
shells" there and it is consistent with output of data validation via GEOS
library functions.

Question wasn't about repairing data. I ususally use something like this
ogr2ogr -f "ESRI Shapefile" valid_original.shp original.shp -dialect sqlite
-sql "select ST_MakeValid(geometry) as geometry, * from original" --debug
on -dsco SPATIALITE=YES
for it.
But in case of this data there is invalid output here too.
Thanks
Pepa

Pepa Beneš


st 30. 10. 2019 v 20:34 odesílatel Tobias Wendorff <
tobias.wendorff at tu-dortmund.de> napsal:

> Hi Marco,
>
> Am 30.10.2019 um 09:46 schrieb Marco:
> >
> > Indeed Buffer 0 won't do any good on self intersections. Thats just not
> > the way to repair them.
>
> But many users act like this:
>
> 1. Get a warning about invalid geometry,
> 2. run Buffer 0,
> 3. Warning about invalid geometry is gone.
>
> Again, this is not constructed, it's reality.
>
> > 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, in this case it's correct. But a user needs to read and
> understand the problem first. Most don't know what's going on at all,
> run "Buffer 0 " and the problem seems to be gone.
>
> > Of course self intersections can be easily overlooked. For that we have
> > validity checkers.
>
> No. That's what we've got "MakeValid", "Fix Geometry" etc. for. These
> are the correct functions in every case, even if they're slower.
>
> Sorry, I'm just talking from experience... might be different if users
> know how to interpet the output of a validity checker. But please, never
> recommend them to use Buffer 0 ... just recommend them to use the real
> ones.
>
> Best regards,
> Tobias
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20191031/7a271c38/attachment.html>


More information about the gdal-dev mailing list