<div dir="ltr">Hi Tobias,<div>please, could You help me, with originall question? Is the geometry valid or it isn't? If it is not, why? </div><div><br></div><div>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.</div><div><br></div><div>Question wasn't about repairing data. I ususally use something like this</div><div>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<br></div><div>for it.</div><div>But in case of this data there is invalid output here too.</div><div>Thanks </div><div>Pepa</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Pepa Beneš</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">st 30. 10. 2019 v 20:34 odesílatel Tobias Wendorff <<a href="mailto:tobias.wendorff@tu-dortmund.de">tobias.wendorff@tu-dortmund.de</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Marco,<br>
<br>
Am 30.10.2019 um 09:46 schrieb Marco:<br>
><br>
> Indeed Buffer 0 won't do any good on self intersections. Thats just not<br>
> the way to repair them.<br>
<br>
But many users act like this:<br>
<br>
1. Get a warning about invalid geometry,<br>
2. run Buffer 0,<br>
3. Warning about invalid geometry is gone.<br>
<br>
Again, this is not constructed, it's reality.<br>
<br>
> Hence I wrote "Buffer 0 on INVALID geometries IMHO can lead to good<br>
> results depending on the /nature of the invalidity/. To my experience<br>
> /repeating points,//wrong coordinate ordering and holes touching outer<br>
> shells in one point///are being repaired well without data loss.".<br>
<br>
Of course, in this case it's correct. But a user needs to read and<br>
understand the problem first. Most don't know what's going on at all,<br>
run "Buffer 0 " and the problem seems to be gone.<br>
<br>
> Of course self intersections can be easily overlooked. For that we have<br>
> validity checkers.<br>
<br>
No. That's what we've got "MakeValid", "Fix Geometry" etc. for. These<br>
are the correct functions in every case, even if they're slower.<br>
<br>
Sorry, I'm just talking from experience... might be different if users<br>
know how to interpet the output of a validity checker. But please, never<br>
recommend them to use Buffer 0 ... just recommend them to use the real ones.<br>
<br>
Best regards,<br>
Tobias<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div>