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

Alexandre VILLERS alexandre.villers at cebc.cnrs.fr
Mon Jun 29 16:09:55 CEST 2009


Good afternoon,

I would like to create a new window for a point pattern in order to get 
a tess object (dirichlet tessellation) from that same point pattern.
For the moment, here is an example of what I do:

PPP<-  rpoispp(100) #generate a point pattern
wind1<-density(PPP, sigma=0.1) #smoothed object of class im
wind2<-wind1 #copy the object
wind2$v<-ifelse(wind2$v<150,  NA, wind1$v) #replace with NAs the value 
of pixel I don't want to keep (those whose intensity is < 150)
plot(wind2)
M<-as.owin(wind2) #convert the im object to a window
PPPd<-ppp(PPP$x,PPP$y, window=M) #the new point pattern with the new window
plot(dirichlet(PPPd)) #the result which did not cinvince me !

The problem is that the window generated by as.owin (on a im object) is 
a binary mask and I guess a polygonal window would be more appropriate 
if a tesselation is then computed.
Did I miss something ? Is there a way of converting the binary window 
into a polygonal window in spatstat (even if I went through the 
documentation) ? With package sp (which I don't know well).

Any help, even a rude "read the manual at page XX" would be appreciated...

Best regards



Alex


-- 
Alexandre Villers
PhD Student
Team "Biodiversity"
Centre d'Etudes Biologiques de Chizé-CNRS UPR1934
79360 Beauvoir sur Niort

Phone +33 (0)5 49 09 96 13
Fax   +33 (0)5 49 09 65 26




__________ Information from ESET Mail Security, version of virus signature database 4196 (20090629) __________

The message was checked by ESET Mail Security.
http://www.eset.com



More information about the R-sig-Geo mailing list