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

Roger Bivand Roger.Bivand at nhh.no
Fri Dec 20 20:14:35 CET 2013


On Fri, 20 Dec 2013, Agustin Lobo wrote:

> 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".

Does:

library(maptools)
vignette("combine_maptools")

help?

Roger

>
> Also, could the rbind() help page contemplate the case of sp objects?
>
> Thanks
>
> Agus
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no


More information about the R-sig-Geo mailing list