combinePolys: Combine Several Polygons into a Single Polygon

Description Usage Arguments Details Value Author(s) See Also

View source: R/PBSmapping.r


Combine several polygons into a single polygon by modifying the PID and SID indices.


combinePolys (polys)



PolySet with one or more polygons, each with possibly several components/holes.


This function accepts a PolySet containing one or more polygons (PIDs), each with one or more components or holes (SIDs). The SID column need not exist in the input. The function combines these polygons into a single polygon by simply renumbering the PID and SID indices. The resulting PolySet contains a single PID (with the value 1) and uses the SID value to differentiate between polygons, their components, and holes.


PolySet, possibly with the addition of an SID column if it did not already exist. The function may also reorder columns such that PID, SID, POS, X and Y appear first, in that order.


Nicholas M. Boers, Associate Professor – Computer Science
MacEwan University, Edmonton AB
Last modified Rd: 2007-06-06

See Also


PBSmapping documentation built on Jan. 15, 2021, 3:41 p.m.