Skip to content
Prev 3681 / 29559 Next

Problem finding the centroid of a polygon with get.Pcent

Dear Roger,

2008/5/23 Roger Bivand <Roger.Bivand at nhh.no>:
Does it mean that the coordinates of the centroid are stored within
the shapefile, or  are they computed by the coordinates command ?.

Note that a "Map" object is not a
Thanks for your answer and for clarifying my confusion about the Map
and SpatialPolygonsDataFrame class.
I have gdal 1.5.1-3 installed in my linux system, and when I tried to
load the "rgdal" library whitin R, I got the following error:

library(rgdal)
Error in fun(...) :
	GDAL Error 1: libgrass_I.so: no se puede abr?r el archivo de objeto
compartido: No existe el fichero ? directorio

Error : .onLoad failed in 'loadNamespace' for 'rgdal'
Error: package/namespace load failed for 'rgdal'

I uninstalled the rgdal package, then installed again with:

install.packages("rgdal", dependencies = TRUE)	

but when I tried to load it again, I got the same error:

library(rgdal)
Loading required package: sp
Error in fun(...) :
	GDAL Error 1: libgrass_I.so: no se puede abr?r el archivo de objeto
compartido: No existe el fichero ? directorio

Error : .onLoad failed in 'loadNamespace' for 'rgdal'
Error: package/namespace load failed for 'rgdal'

Do you have any idea about what could be my problem ?.

Thanks in advance

Mauricio