Hi
Thank you for your useful info.
However for following statement,
> voronoiShapefile <- function()
> {
-X8--X8---X8--
>for (i in seq(along=polys))
> {
> pcrds <-
> cbind(tritest.vp[[8]][,1],tritest.vp[[8]][,2] )
I think all "8"s needed to "i" like this.
Debs:
The script that I had written before used the older, deprecated
SpatialRingsDataFrame
to create a shapefile from the tripack() voronoi polygons.
Here is an example, based on the answer to your message from Roger Bivand,
that demonstrates the technique -
Regards,
Rick R
#
# example from
On Tue, 13 Nov 2007, Debarchana Ghosh wrote:
> Hi,
>
> I have a point data frame with X and Y coordinates, where n=1051. I am
> trying to create Voronoi polygons using both the Tripack and PBSMapping
> packages.
>
> library(tripack)
> testbird.vm<-voronoi.mosaic(testbird$X, testbird$Y)
> testbird.
Hi,
I have a point data frame with X and Y coordinates, where n=1051. I am
trying to create Voronoi polygons using both the Tripack and PBSMapping
packages.
library(tripack)
testbird.vm<-voronoi.mosaic(testbird$X, testbird$Y)
testbird.vp<-voronoi.polygons(testbird.vm)
plot(testbird.vp)
library(P