Skip to content

SPATSTAT: converting owin(mask) to owin (polygon) PART II

1 message · Adrian Baddeley

#
Sorry, that should have been 'box=FALSE', not 'axes=FALSE'.

Apart from this problem, which I emphasise is a bug in the PLOTTING code for tessellations in spatstat 1.15-4, the tessellation has been computed correctly, and you can do all the analysis described below, using pixel-based tessellations.

Spatstat 1.16-0 is about to be released; it contains a bug fix for this problem.

At the moment there is no single piece of code in spatstat to convert a mask to a polygon. I will implement something in spatstat 1.16-1.

In the meantime, an alternative would be to draw circles of a given radius around each of the data points, and to take the union of these circles as the domain of interest. Example:

      X <- runifpoint(50)
      plot(X)
      rad <- 0.1
      region <- NULL
      for(i in seq(X$n)) {
          d <- disc(rad, c(X$x[i], X$y[i]))
          region <- union.owin(region, d)
      }
      plot(region, add=TRUE)

 Regards
Adrian Baddeley