[R-sig-Geo] Multiple circular holes with owin function in spatastat

ASANTOS alexandresantosbr at yahoo.com.br
Tue Jul 24 18:13:41 CEST 2012


Dear sig-geoers,

       It's possible to making a multiple circular holes with owin() 
function in spatstat package if the circles are created in a loop 
function, for example:

##
##Circle x coordinates
x<-c(524237,524237,524237,524237,524237,524237,524237,524237,524242
,524242,524242,524247,524247,524247,524247,524247,524247,524247
,524247,524257,524257,524257,524257,524257,524257,524257)
##Circle x coordinates
y<-c(7978856,7978866,7978876,7978896,7978916,7978936,7978946,7978956,7978956,7978946
,7978936,7978956,7978946,7978936,7978916,7978896,7978876,7978866
,7978856,7978856,7978876,7978896,7978906,7978916,7978936,7978956)
##

CIR<-NULL
points(a1.past.syn[,1],a1.past.syn[,2])
   for (i in 1:length(x)){
   circle<-disc(radius=5,centre = c(x[i],y[i]))
   CIR<-rbind(CIR, c(circle))
}

Because I don't know, if I can use CIR's objet in the owin(poly = ... ) 
function, that uses list() for create this kind of object.

Thanks,

-- 
Alexandre dos Santos
Engenheiro Florestal, Dr.
Universidade Federal de Lavras
Departamento de Entomologia
Laboratório de Entomologia Florestal
Caixa Postal 3037
37200-000 - Lavras/MG
Fone: +55 (35) 9223-0304



More information about the R-sig-Geo mailing list