Re: [R-sig-Geo] spgpc package?

2007-08-09 Thread Roger Bivand
On Thu, 9 Aug 2007, Felix Andrews wrote: e.g. # x is a gpc.poly object as.Polygons.gpc.poly <- function(x, ID) { thisPolys <- lapply(get.pts(x), function(p) { Polygon(rbind(as.matrix(cbind(p$x,p$y)),c(p$x[1],p$y[1])), hole=p$hole) })

Re: [R-sig-Geo] spgpc package?

2007-08-08 Thread Felix Andrews
e.g. # x is a gpc.poly object as.Polygons.gpc.poly <- function(x, ID) { thisPolys <- lapply(get.pts(x), function(p) { Polygon(rbind(as.matrix(cbind(p$x,p$y)),c(p$x[1],p$y[1])), hole=p$hole) }) Polygons(thisPolys, ID) } This works exc

[R-sig-Geo] spgpc package?

2007-08-08 Thread Felix Andrews
Hmm I'm trying to work with gpclib, converting to and from the sp classes. I don't know what is/was in the package spgpc, but it is no longer available: > install.packages("spgpc", repos=rSpatial) Warning: unable to access index for repository http://r-spatial.sourceforge.net/R/bin/windows/contrib