https://trac.osgeo.org/geos/attachment/ticket/987/msft-osm-CA_ex0sm.jpg https://trac.osgeo.org/geos/attachment/ticket/987/OGC_fail-11.png msft bldgs jul18 invalid (gid 3062584): {{{ POLYGON((-122.277526 41.23108,-122.277462 41.231079,-122.277462 41.231138,-122.277525 41.231138,-122.277526 41.231076,-122.277625 41.231077,-122.277625 41.231046,-122.277656 41.231047,-122.277657 41.230962,-122.277527 41.230961,-122.277526 41.23108)) }}} {{{ select gid,st_isvalidreason(geom) from msft_ca_jul18 where not st_isvalid(geom); -- gid | st_isvalidreason ---------+------------------------------------------------------- 1932577 | Self-intersection[-117.879309006686 34.0939527158598] 1083503 | Self-intersection[-118.151041032252 34.1665520003544] 88756 | Ring Self-intersection[-119.076734 35.415403] 876188 | Ring Self-intersection[-117.839459 34.114434] 1929254 | Self-intersection[-118.399568098846 34.0733870185677] 1584267 | Ring Self-intersection[-120.368949 36.148878] 971380 | Self-intersection[-115.526362 34.51697] 1479661 | Self-intersection[-122.271523 40.489851] 159872 | Self-intersection[-117.386296 33.986578] 466420 | Self-intersection[-117.16902821886 32.7842220517734] 479762 | Ring Self-intersection[-118.256179 34.136154] 1925936 | Self-intersection[-118.826453155039 34.0236350172265] 2225164 | Self-intersection[-119.612751 36.753547] 2117902 | Self-intersection[-120.071738998454 36.7212750803865] 2065877 | Self-intersection[-118.152639368984 34.1486450053476] 2882693 | Self-intersection[-118.088771000294 34.0555769797317] 2673688 | Self-intersection[-117.937368998871 34.0454461038814] 2701485 | Self-intersection[-118.138405825079 34.0202376049337] 2557510 | Self-intersection[-119.248434012696 34.2700550170241] 3593228 | Ring Self-intersection[-122.269776 40.165107] 3274502 | Ring Self-intersection[-121.404124 38.601195] 3427607 | Self-intersection[-117.06367295762 32.7679220271869] 3062584 | Self-intersection[-122.277526033611 41.2310760003395] 3185093 | Self-intersection[-117.128387 35.420909] 5237743 | Self-intersection[-118.242398 33.894502] 4474549 | Self-intersection[-121.424849098185 38.5407842676858] 3881251 | Ring Self-intersection[-117.692986 35.589367] 4268230 | Self-intersection[-117.190929 32.835074] 5215196 | Ring Self-intersection[-122.235024 38.107347] 4195530 | Self-intersection[-122.399941999677 37.652617027442] 4873241 | Ring Self-intersection[-117.971194 35.12292] 3882578 | Self-intersection[-120.977585999333 37.6746839532773] 4197067 | Self-intersection[-119.468601022591 36.1837711193082] 4053150 | Self-intersection[-121.417985026441 38.3405507051047] 4231901 | Ring Self-intersection[-121.707147 36.940447] 3934724 | Self-intersection[-118.401244 34.1527850694444] 3956371 | Self-intersection[-117.970015998596 33.8302379326158] 3934100 | Ring Self-intersection[-118.245364 34.218844] 4482100 | Self-intersection[-117.006337998805 32.738465111099] 4023275 | Self-intersection[-118.31865 33.7877300108303] 4354462 | Ring Self-intersection[-118.565846 34.078259] 5310650 | Self-intersection[-117.885100999011 34.1099770731587] 5244655 | Self-intersection[-116.344896 33.719872] (43 rows) }}} {{{ =# SELECT postgis_full_version(); ----------------------------------- POSTGIS="2.4.3" PGSQL="100" GEOS="3.6.2-CAPI-1.10.2 4d2925d6" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.3.3, released 2018/12/14" LIBXML="2.9.3" LIBJSON="0.11.99" LIBPROTOBUF="1.2.1" RASTER }}}