Fixing orphaned holes in R

المشرف العام

Administrator
طاقم الإدارة
I'm trying to perform a union on a common field after merging two adjacent shapefiles. The shapefiles end up with at least one thin sliver of space between them. When I attempt a union I get the following orphaned hole error:

Error in createPolygonsComment(p) : rgeos_PolyCreateComment: orphaned hole, cannot find containing polygon for hole at index 17

I've uploaded a reproducible example to Dropbox at this link.

Here is the code to recreate the problem:

#loading required packagesrequire(sp) require(rgdal)require(maptools)require(rgeos)#load example data, set "dsn=" to your working directory or specify the pathexample
 
أعلى