[R-sig-Geo] spatstat::dirichlet - distinct points get merged

Bjarke Christensen Bjarke.Christensen at sydbank.dk
Thu Nov 12 13:58:54 CET 2009


Hi,

I am using spatstat to make a dirichlet tesselation of a set pf point
patterns. From my understanding, the number of tiles should equal the
number of points - but this is not my result.

I find that a small share of my points, often two or three pr. thousand
points, seem to get merged or removed from the dataset when running
dirichlet (from the spatstat package). For example: I run dirichlet on a
point pattern with 1992 points, but the dirichlet tesselation only contains
1987 tiles. When I convert the tesselation to a SpatialPolygons and do
point overlay, some of the tiles - not necessarily at the edges or anything
like that - contain two points.

My data are in UTM and units are in meters, so the window is a few hundred
thousand meters on each axis, but the closest points are only a few meters
apart. (I removed duplicate points using unique.data.frame on the
coordinates before constructing the ppp object.). The polygons containing
two points tend to have the points relatively close together, so I was
wondering if dirichlet() perhaps did any sort of rounding of the
coordinates? However, the issue is not unique to my data as the following
sample code shows.

Here is some sample code - I can also post sample data if necessary.
> set.seed(10)
> pkt <- runifpoint(10000)
> dcl <- dirichlet(pkt)
> dcl$n
[1] 9998

Thanks in advance for any comments!
Bjarke Christensen



More information about the R-sig-Geo mailing list