[postgis-users] Topology Issue Reported by Query but Not Identified with ST_IsValid

Regina Obe lr at pcorp.us
Thu May 26 21:47:55 PDT 2016


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:postgis-users-bounces at lists.osgeo.org] On Behalf Of Michael Treglia
Sent: Thursday, May 26, 2016 10:34 PM
To: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160527/ae8a4c0e/attachment.html>


More information about the postgis-users mailing list