[R-sig-Debian] Issues with unionSpatialPolygons on Ubuntu

Kenneth Takagi katakagi at bu.edu
Sun Jun 6 01:28:02 CEST 2010


Hi,

I've cross posted with r-sig-debian since they may be an issue for 
linux (never had this problem on my windows machine...)
I recently made the switch to Ubuntu 10.04 (lucid), and found that 
unionSpatialPolygons() gives me the following error when trying to 
combine polygons within a shapefile:

# Read in shapefile and merge polygons
foo <- readShapePoly("foo.shp", proj4string = CRS("+init=epsg:2272"))
IDs <- as.character(foo$ID)
SP_out <- unionSpatialPolygons(foo, IDs)
Error: isTRUE(gpclibPermitStatus()) is not TRUE

I've seen some posts about a package "rgeos" which may have something 
to do with this error, and I downloaded the source from:
http://r-forge.r-project.org/R/?group_id=602

But when I've tried to install by source using R CMD INSTALL (or using 
install.packages()) I get the following error message:

...lines of output not shown...
rgeos_misc.c: In function ?rgeos_hausdorffdistance?:
rgeos_misc.c:62: error: ?GEOSHausdorffDistance_r? undeclared (first use 
in this function)
rgeos_misc.c:62: error: (Each undeclared identifier is reported only once
rgeos_misc.c:62: error: for each function it appears in.)
make: *** [rgeos_misc.o] Error 1
ERROR: compilation failed for package ?rgeos?

I'm using R version 2.11.1 (2010-05-31), in ubuntu 10.04 LTS

Thanks for any help you can offer on getting unionSpatialPolygon up and 
running!

Ken



More information about the R-SIG-Debian mailing list