search for: pcrds

Displaying 1 result from an estimated 1 matches for "pcrds".

Did you mean: crds
2012 Sep 24
0
Deldir() Thiessen Polygons Problem
...{* * require(deldir)* * if (.hasSlot(x, 'coords')) {* * crds <- x@coords * * } else crds <- x* * z <- deldir(crds[,1], crds[,2])* * w <- tile.list(z)* * polys <- vector(mode='list', length=length(w))* * require(sp)* * for (i in seq(along=polys)) {* * pcrds <- cbind(w[[i]]$x, w[[i]]$y)* * pcrds <- rbind(pcrds, pcrds[1,])* * polys[[i]] <- Polygons(list(Polygon(pcrds)), ID=as.character(i))* * }* * SP <- SpatialPolygons(polys)* * voronoi <- SpatialPolygonsDataFrame(SP, data=data.frame(x=crds[,1],* *...