[postgis-users] Deleting an arbitrary polygon

Martin Davis mbdavis at refractions.net
Thu Sep 25 17:12:42 PDT 2008


AFAIK there is no way to do this in a single pass. 

One way to do it iteratively is:
- add a column which will flag features which are "nonoverlapping" (and 
which will be kept)
- choose one feature and flag it as nonoverlapping
- iterate {
    - delete all features which overlap some "nonoverlapping" feature
    - pick an unmarked feature and flag it as "nonoverlapping"
    - exit if all features are flagged as "nonoverlapping"
}

This is probably going to be slow...

Dylan Lorimer wrote:
> Hey PostGIS Friends, here's a problem that's stumping me, hoping you can help:
>
> I have a bunch of polygons, many of which overlap with each other. I
> would like to trim down the set of polygons to only those that do not
> overlap. I'm not particular about which I delete, so long as they
> overlap by a certain %.
>
> Any thoughts on how to do this? I was trying for a self join but can't
> figure out how to not to delete all polygons that overlap.
>
> Cheers,
> dylan
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>   

-- 
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022




More information about the postgis-users mailing list