[R] dissolve tiny polygons to others with unionSpatialPolygons{maptools}
Kumar Mainali
kpmainali at gmail.com
Mon Jun 6 00:35:17 CEST 2016
I am trying to use unionSpatialPolygons() of maptools to eliminate sliver
in species range. I want to dissolve tiny sliver polygons in a shapefile to
bigger polygons as "Eliminate (Data Management)" of ArcMap does. Whereas I
can dissolve polygons that have identical features in the argument "IDs", I
cannot dissolve tiny polygons based on some threshold in area. In fact, the
argument "threshold" has no effect in the output.
Input data is available here:
https://www.dropbox.com/sh/a0x5bbo9u60y7is/AAB6RjXHFQKZv-i-t4JclF3ba?dl=0
p.ranges <- shapefile{raster}
(IDs <- p.ranges$style_id)
library(maptools)
unionSpatialPolygons(p.ranges, IDs = IDs, threshold = 1.5)
-- Kumar Mainali
Postdoctoral Associate
Department of Biology
University of Maryland, College Park
ᐧ
[[alternative HTML version deleted]]
More information about the R-help
mailing list