[R-sig-Geo] Dilation and Window Definition in Spatstat

Adrian Baddeley adrian.baddeley at uwa.edu.au
Fri Nov 1 02:13:34 CET 2013


In spatstat 1.34-0 there appears to be a bug in union.owin which also affects dilation.owin.

A fix will be distributed shortly.

Until this is fixed, the fastest way to do what you want is to convert the window
 to a pixel mask (using as.mask) before applying the dilation.

Adrian Baddeley 

Prof Adrian Baddeley FAA
University of Western Australia  /and/ CSIRO Mathematics, Informatics & Statistics
Mail: <cet.uwa.edu.au>             Skype: adrian.baddeley
________________________________________

On 11/01/13 04:40, Ted Rosenbaum wrote:
> I am using spatstat version 1.34-0 and the pop command is not correctly
> recognizing the interior of a window after I use the dilation command on a
> polygon (i.e., non rectanglular window).
>
> I have window that is a convex hull of the lower 48 states.  I have a set
> of points that are county centroids.  When I make a point pattern (pop)
> using that window, I get expected results (all points, except for some that
> are on a boundary are in the window).  In order to expand the window to
> include those points, I dilate the window with the convex hull by a small
> amount.  After the dilation, I make a point pattern and am informed that
> only one point remains in the window.  Since, as far as I understand it, a
> dilation should only expand the set of points in the window, this should
> not happen.
>
> I apologize for not providing replicable code, but I was having trouble
> creating a polygon to replicate the issue.  If someone needs code to help
> troubleshoot, I can email you some files with code offline.



More information about the R-sig-Geo mailing list