[R-sig-Geo] Centroids and getSpPPolygonsLabptSlots

Agustin Lobo Agustin.Lobo at ija.csic.es
Tue Oct 30 07:28:11 CET 2007


Making doc is very hard, and usually not a task that can be
accomplished by the developer alone, as he/she holds many
connexions in his mind that are not there for the rest of
people. Considering this, the current doc is a very good start point. 
I'm starting sort of "operational guide", based on
how to do some common (from my point of view) tasks. Although
I confess that this is an egoistic effort (I normally use
sp very intensively during few weeks for a given phase of the projects,
then get busy with other tasks for months and thus forget many things 
for the next time), I'll be happy
sharing this doc. My 5 cents!

Agus

Roger Bivand escribió:
> 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
> 
>>
>> Agus
>>
>>
> 

-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster




More information about the R-sig-Geo mailing list