On Sat, 5 Jun 2010, Kenneth Takagi wrote:


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:

Did you check that the package versions on Linux and Windows were the same (they were not, hence the difference)?


# 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


Googling on "R gpclibPermit" takes you to the explanation (second hit), with the posting on this list's archives at:

https://stat.ethz.ch/pipermail/r-sig-geo/2010-May/008206.html

So set gpclibPermit() to TRUE to use gpclib, or try again to install rgeos (which has an external dependency), which is work in progress, so may not install cleanly when lots of changes are in progress (which is the case at the moment).

Hope this helps,

Roger

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

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: roger.biv...@nhh.no

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to