Try replacing your ST_Collect call with ST_Union.
ST_Collect when used with polygons will create invalid multipolygons since it just collects them up, and if they are adjacent, it's not a valid multipolygon. Hope that helps, Regina http://www.postgis.us http://postgis.net From: postgis-users [mailto:[email protected]] On Behalf Of Michael Treglia Sent: Thursday, May 26, 2016 10:34 PM To: PostGIS Users Discussion <[email protected]> Subject: [postgis-users] Topology Issue Reported by Query but Not Identified with ST_IsValid Hi All, I was running a query involving ST_Difference between two multipolygon layers, and a while in, it threw this message: ERROR: GEOSDifference: TopologyException: side location conflict at 919670.1768945494 140665.82566365649 However, I previously ran ST_MakeValid, and ST_IsValid doesn't report any objects with problems. Is there something I'm missing, or something else I need to check? (Apologies is this is just a naive question - still learning my way around PostGIS). And in case it helps, here's my SQL: CREATE TABLE SI_Unclaimed AS SELECT gid, COALESCE(ST_Difference(geom_2263, (SELECT ST_Collect(b.geom_2263) FROM citywide_basedata.parcels15 b WHERE ST_Intersects(a.geom_2263, b.geom_2263) )), a.geom_2263) FROM citywide_basedata.boroughs_nowater a where boroname like 'Staten Island'; Thanks! Mike
_______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/postgis-users
