[R-sig-Geo] 'Cleaning' unioned polygons using sp and maptools...

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Tue Mar 3 15:18:23 CET 2009


2009/3/3 Peter S. Hayes <pshayes at maine.rr.com>:
> Hi List,
>
> Here's a question... I have a watershed polygon that has been 'tiled' into
> separate and non-overlapping cells according to a combination of attributes.
> The original watershed boundary seems not to be available in undivided form
> and I was interested in retrieving it from the divided shape file. Using
> ESRI resulted in several internal boundaries that were not removed. Using
> 'unionSpatialPolygons' produced even more non-removed internal boundaries.
>
> Is there a simple means of 'cleaning' this to remove duplicate boundaries
> and no-longer-connected internal boundaries? I have looked a little (and
> admit to being a relative neophyte in using the packages) but haven't found
> anything that appears promising. I can certainly begin to appreciate the
> difficulty of finding and removing these boundaries, at least on a
> conceptual level... a problem in graph theory? (not at all my area...)

 Just trying to get this clear - there is an irregular simple (no
islands or holes) polygon that defines the watershed, but what you've
actually got is a number of polygons that divide the polygon into
cells. The polygon you want is the external boundary of the cells?

 What ESRI tool did you use? Any idea why it failed? Anything special
about those boundaries? Some tolerance value exceeded?

 I think a picture speaks a thousand words here - any chance you could
upload an image showing the boundaries and what you want dissolved?

 Images sent to the list might get stripped out, so maybe use a
temporary image bin site:

http://imagebin.org/

 or something like google docs...

Barry



More information about the R-sig-Geo mailing list