On Mon, 29 Oct 2007, Agustin Lobo wrote:
I have just incidentally learned in the sp doc that
getSpPPolygonsLabptSlots() actually retrieves the coordinates
of the centroids. The index page of the sp doc just states:
getSpPPolygonsLabptSlots Class "SpatialPolygonsDataFrame"
adding a mention to the fact that getSpPPolygonsLabptSlots retrieves the
coordinates of the centroids would be very helpful. Previously, I
thought I had to convert to a PBSmapping object and use calcCentroid().
And coordinates(x) returns the same points for x a
SpatialPolygonsDataFrame (strictly the centroids of the largest
component polygon by area, with no guarantee that it does not fall in a
hole in that polygon. The very long names are just wrappers for losts of
nested slot() and sapply() calls.
The documentation weaknesses are obvious, but are hard to address,
because the sp package itself has little example data - there is more in
maptools - and because new style classes and methods for them are harder
to document than old style classes and methods. I'll try to make the
documentation simpler and easier to search.
Roger