Description Usage Arguments Value Examples
Remove satellite polygons in a SpatialPolygons or SpatialPolygonsDataFrame object. For each compound polygon, remove all but the largest component. Useful for generalised representations.
1 2  | small_chop(spdf)
spdf %>% small_chop
 | 
spdf | 
 a SpatialPolygons or SpatialPolygonsDataFrame object  | 
a SpatialPolygons  object with satellite polygons removed (IDs are the same as spdf)
1 2 3 4 5 6 7 8 9  | data(RA)
RA.spdf %>% small_chop %>% plot
'MULTIPOLYGON (((3 2, 4.5 4, 1 4, 3 2)),((15 5, 40 10, 10 20, 5 10, 15 5)))' %>% readWKT -> p1
'darksalmon' %>% adjustcolor(alpha.f=0.5) -> salmon
old.mf <- par('mfrow')
par(mfrow=c(1,2))
p1 %>% plot(col=salmon); title("Before")
p1 %>% small_chop %>% plot(col=salmon); title("After")
par(mfrow=old.mf)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.