[R-sig-Geo] SPATSTAT: converting owin(mask) to owin (polygon) PART II

Adrian.Baddeley at csiro.au Adrian.Baddeley at csiro.au
Wed Jul 1 08:03:33 CEST 2009


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



________________________________
From: Alexandre VILLERS [alexandre.villers at cebc.cnrs.fr]
Sent: Tuesday, 30 June 2009 10:10 PM
To: Baddeley, Adrian (CMIS, Floreat)
Cc: r-sig-geo at stat.math.ethz.ch; r.turner at auckland.ac.nz
Subject: SPATSTAT: converting owin(mask) to owin (polygon) PART II

Thank you Adrian for your message (and the shortcut ! I haven't been through) but the add of axes=F didn't change anything to me (R 2.9.0 and spatstat_1.15-4).
So I'm still wondering if there is an existing implemented function in R that could convert a binary mask to a polygon (which would be more "handy" for me).

So here is the goal of the work. If anyone has an idea of how this can be done with an R package...

I have a dataset on Golden Eagle breeding in the Alps. Along with data on the breeding success of almost all territories each year, I have the location of those territories' nests (a point pattern). Since the population has increased (from 80 to 142 breeding pairs) and since I have no accurate idea of home range sizes, I would have been interested in getting an approximate territory size by a Dirichlet tesselation (one of the reason why I used spatstat)
.
But, I cannot simply draw an arbitrary line around the study area (my observation window) in order to "cut" the tesselation. Since the population has increased, the shape of such polygon would fit with the last years data but won't do it at the beginning of the survey. So I wanted, for each year, to determine a treshold for the intensity of the point pattern (with biologically relevant sigma values), retrieve all the datas below that treshold, create an observation window with the rest of it and calculate the tesselation on the point pattern.
Then, use this tesselation along with data on habitat (vegetation, temperatures, snow covers, etc.) under those polygons in order to understand the settlement pattern and its consequences on breeding pairs.



More information about the R-sig-Geo mailing list