[R-sig-Geo] invalid class “SpatialPolygons” object: non-unique Polygons ID slot values

Agustin Lobo alobolistas at gmail.com
Fri Dec 20 15:03:41 CET 2013


Hi!

I've got the "invalid class “SpatialPolygons” object: non-unique
Polygons ID slot values"
error at trying to use rbind() (or spRbind()) with two spatial
polygons dataframes that
come from readOGR() of shapefiles.
Not having done this operation in a long while, It took me quite a
long time to remember about the spChFIDs() solution
(i.e. http://r-sig-geo.2731867.n2.nabble.com/rbind-of-SpPolDFs-td5070215.html)
despite the fact that the help page of spRbind() mentions the  spChFIDs-methods.

Could an example in which spChFIDs() has to be run be added to the
Examples of the spRbind help page?
Actually I think that the case in which 2 spatial polygons dataframes
have independently assigned IDs (and thus most often require the
spChFIDs step) is more common than the case of the current example and
many users just remain confused looking at the error "invalid class
“SpatialPolygons” object: non-unique Polygons ID slot values".

Also, could the rbind() help page contemplate the case of sp objects?

Thanks

Agus



More information about the R-sig-Geo mailing list