Skip to content

check all IDs of a spatialPolygons object

3 messages · Agustin Lobo, Roger Bivand

#
Is there a cleaner way to check all IDs of a spatialPolygons object?
I know how to do it with one:
 > slot(spol at polygons[[2]],"ID")
[1] "g2"

and for all of them I use
is there something more straightforward, sort of spFIDs() (by analogy
to spChFIDs() )?

Thanks

Agus
#
On Thu, 20 May 2010, Agustin Lobo wrote:

            
row.names(spol), OK?

Roger

  
    
#
Yes!
I would have thought on that if spol where a spatialpolygonsDataFrame,
(as many sp functions for SpPolDF actually mimic functions for
dataframes, which is
great help for the memory), but in this case, spol is just a
spatialpolygons and the user
probably will not think at that.

Thanks!
Agus

2010/5/20 Roger Bivand <Roger.Bivand at nhh.no>: