[R-sig-Geo] help on Polygon(sp)?
v.gomezrubio at imperial.ac.uk
Wed Mar 21 16:04:49 CET 2007
El mié, 21-03-2007 a las 22:45 +0800, zhijie zhang escribió:
> Dear friends,
> I have a .shp file of region boundary, and i want to use it as the polygon
> in the khat(splancs) function, but it goes wrong.
> # khat(pts,poly,s,newstyle=FALSE)
> guichi<-readShapePoly("d:/d/guichi2.shp") # read the shp data of region
> guichi2<-Polygon(coordinates(guichi), hole=as.logical(NA)) #generate the
I think that you could try as.points(coordinates(guichi)) here to get
the boundary in the appropriate format. As far as I know, khat does not
use sp objects.
More information about the R-sig-Geo