Skip to content
Prev 3651 / 29559 Next

Problem finding the centroid of a polygon with get.Pcent

On Fri, 23 May 2008, Mauricio Zambrano wrote:

            
Just say coordinates(gallego_catchment) to extract the "centroid" - 
labelpoint - for each Polygons object - the coordinates() method retrieves 
the label points. Note that a "Map" object is not a 
"SpatialPolygonsDataFrame" object, and indeed "Map" objects are only used 
internally in some limited settings. You are muddling up classes. 
Installing rgdal properly would make sure you only saw the 
"SpatialPolygonsDataFrame" object, which is all you need.

Roger