[R] Spatstat: xy binary data into mask type to use in owin(mask=)

Javier PB j.perez-barberia at macaulay.ac.uk
Mon Oct 19 15:06:53 CEST 2009


Dear users,

I am trying to export polygons from Arcmap into Spatstat to run some
simulations using functions available in Spatstat package.

One particular area to be exported is formed by a number of polygons
defining the external boundaries of the area (as a groups of islands) and a
number of polygons inside the previous ones,  as “holes” not to be
considered as part of the area.

I have managed to export one of these areas using owin(poly=list()),
including in the list the number of external boundaries and holes, but the
number of polygons that constitute each area is large and I was wondering if
this could be easily done using owin(mask=my_area), using only one single
matrix file "my_area" with TRUE, FALSE values defining the whole area. 

Here is where I got stuck. The file I have created in ArcMap contains three
columns: x and y coordinates, and the values at points x[i], y[j] (1 if the
area is TRUE and 0 is the area is FALSE).

How can I covert this xy file into a mask type "my_area" that I can read
using owin(mask=my_area)?

Many thanks in advance

Javier     

-- 
View this message in context: http://www.nabble.com/Spatstat%3A-xy-binary-data-into-mask-type-to-use-in-owin%28mask%3D%29-tp25958088p25958088.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list