I have two SpatialPolygonDataFrames, and I have two merge them. SPDF1 contains watershed are falling within the country, SPDF2 has watershed are falling outside the country, so the both should match properly.
After merging, I have several types of error. 1. I have inner rings of 0 area. I can remove them based on the assumption that I only need the first (most outer) ring of the SpatialPolygon. 2. I have "Peninsula"s also of 0 area.
How can I remove these "Peninsulas" automatically (with R code)?