[postgis-users] how to create holes in polygon

Pavel Iacovlev iacovlev.pavel at gmail.com
Mon Oct 5 05:05:01 PDT 2009


Join all your polygons into 1 multi-polygon.

Run ST_Difference between your area (a rectangle for the whole world I
guess) and the your multi-polygon. This should produce the expected
results.

On Mon, Oct 5, 2009 at 3:00 PM, Kevin Kempfer <postgis at kevinkempfer.de> wrote:
> Hi,
>
> I am trying to punch holes into a polygon - can someone tell me how to
> achieve this?
>
> I have a large database of polygon geometries.
> I am now trying to "invert" these polygons area to receive a big
> polygon, that covers everything that is *not* covered in my existing
> polygons.
>
> The result should be a polygon covering the whole world but with holes
> in the areas which are already covered by my source polygons.
>
> I successfully created a "positive" using geomunion() on all my geoms.
> Now I need to invert the result  to get a "negative". Hope I got the
> idea across...
>
> Thanks for any advice,
>
> Kevin
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



-- 
http://iap.md, The future is open



More information about the postgis-users mailing list