[R-sig-Geo] polygon over or intersect with more than 2 files/layers

Bannar-Martin, Katherine K@therine@B@nn@r-M@rtin @ending from dfo-mpo@gc@c@
Thu May 31 00:12:03 CEST 2018


Hi,

I've had no success at finding a tool in an R package that can calculate the intersection/overlap of polygons for more than 2 layers.

e.g. plot(st_intersection(st_union(LateYear2008),st_union(LateYear2009),st_union(LateYear2010),st_union(LateYear2011),st_union(LateYear2012),
st_union(LateYear2013),st_union(LateYear2014),st_union(LateYear2015),st_union(LateYear2016),st_union(LateYear2017)),
col = 'red',xlim=c(min(d$x),max(d$x)),ylim=c(min(d$y),max(d$y)),axes = TRUE)
does NOT work.

Does anyone have any suggestions? Is there a way to save a shapefile with multiple layers of polygons and then run an over/intersection tool.

I can run each pair-wise overlap between layers in a loop but the number of combinations is long.

Efficient solutions welcomed.

Thanks!
Katherine

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list