Skip to content

spatstat questions

2 messages · Milton Cezar Ribeiro, Roger Bivand

#
On Sun, 9 Dec 2007, Milton Cezar Ribeiro wrote:

            
The website is http://www.spatstat.org (seems to be down for me, but 
that's probably me); the maintainers also read this list.
Don't use read.shape(), it returns a raw object that is difficult to 
handle. An example with readShapePoly:

library(maptools)
library(spatstat)
xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1])
.spatstat_check <- FALSE
NC <- as(as(xx, "SpatialPolygons"), "owin")
plot(NC)
class(NC)
pts <- runifpoint(1000, NC)
plot(pts, pch=16, cex=0.5, add=TRUE)

The .spatstat_check is to turn off topology checking - please use only 
when necessary. In general the internal structures expect polygons not to 
touch or intersect, but the North Carolina counties do touch, so I have 
turned off the check.

There are more notes on Dylan Beaudette's site at:

http://casoilresource.lawr.ucdavis.edu/drupal/node/319

Hope this helps,

Roger