[R-sig-Geo] distance map from raster class

Adrian Baddeley adrian at maths.uwa.edu.au
Thu Apr 16 13:11:10 CEST 2009


Sorry, I misspoke, ... in spatstat the correct way to convert a 0/1 
valued image to a window is to use 'solutionset'. Example:
         my.window <- solutionset(my.image == 1)
         my.distmap <- distmap(my.window)
The first line computes the region of 'ONEs' --- all pixels which have 
the pixel value 1 in my.image.

Adrian Baddeley



More information about the R-sig-Geo mailing list