[R-sig-Geo] about union.owin method in spatstat and self-intersection
massimo ventrucci
massistef at libero.it
Tue Mar 25 20:25:40 CET 2008
Hello,
I have a couple of question regarding object owin in spatstat package.
I am going to simulating a spatial point process over a collection of contiguous regions (e.g. regions with some common borders). Firstly I am going to simulate a poisson process conditionally to a fixed number of events (runifpoint) but later I could need to simulate process that deviate from CSR; my basic aim is getting the number of points in each regions.
I read that in spatstat it is not possible creating owin objects where polygons share borders. I wonder if it could be reasonable creating several owin objects (one for each region) and simulating a spatial point pattern over the union of them. If so, I guess there will be no problem about the homogeneous case but my first point is about the inhomogeneous one:
might be possible simulate an inhomogeneous poisson point process in such as union.owin window?
The second and final question regards a problem about self-intersection. When I try to create an owin objects lot of my region (in this case the number 6) meet the following problem:
w6 <- owin(poly = emr.poly[[6]])
Polygon is self-intersecting
Error in owin(poly = emr.poly[[6]]) :
Polygon data contain self-intersection
Bear in mind that I do not have any shape file of my collection of regions, just x-y coordinates obtained by exporting the map from winbugs by using "export Splus".
Thus for many regions I can not obtain an owin object because of self-intersection, and as a result I can not obtain the union of owin objects I am interested in. I have to say I am not interested in a fine specification of borders, so I wonder if there is an easy way to eliminate point coordinates responsible for self-intersection. Do you have any suggestion please?
Thank you very much in advance
Massimo
More information about the R-sig-Geo
mailing list