[postgis-users] find the gaps between the polygons

"Albert Krüger" albert79 at gmx.net
Sun Apr 5 03:16:47 PDT 2009


Hi List!

I would like to find the gaps between the polygons. First I generate the BBox surface. Next I look for the differences between Bbox-Area and polygons in my collection. My problem is: when the collection has reached a certain size then the collection becomes invalid. Do you have any idea how I could solve the problem? What I don`t want to do is to unite the polygons with the function st_union, because this step costs a lot of time. Or is there another possibility to find the gaps between the polygons?

SELECT st_multi(ST_Difference(subwsg.geom, sub.geombox)) as geom
from (select st_collect(wsg.geom) as geom FROM tabelle_polygone wsg where st_isvalid(wsg.geom) = true) as subwsg,
(select ST_SetSRID(st_extent(geom), 31467) as geombox FROM tabelle_polygone) as sub where ST_Intersects(st_boundary(sub.geombox), ST_Difference(sub.geombox, subwsg.geom)) = true

Thank you for helping!
Cheers, Albert

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01



More information about the postgis-users mailing list