search for: rgeos_polycreatecomment

Displaying 1 result from an estimated 1 matches for "rgeos_polycreatecomment".

2011 Jul 09
1
SpatialPolygonsDataFrame holes problem
...plot(india[india$NAME == "Tamil Nadu",], col = 1:8) #Extract centroid for a State (this works): gCentroid(india[india$NAME == "Tamil Nadu",]) #Error arises for this State: gCentroid(india[india$NAME == "Gujarat",]) #Error says: #Error in createPolygonsComment(p) : #rgeos_PolyCreateComment: orphaned hole, cannot find containing polygon for hole at index 2 #Code ends I don't know my way around SpatialPolygonsDataFrame objects very well, and have no idea how to fix the errant hole. Any help greatly appreciated. Thanks Dan Bebber