Skip to content
Prev 5515 / 29559 Next

distance map from raster class

Milton writes:
distmap has a method for 'owin' objects, but not for 'im' objects. 
The quick solution is to convert your image to an owin object using as.owin() and then apply distmap.

In your example, type
     my.distmap <- distmap(as.owin(my.image))

If you want the opposite, use complement.owin

regards
Adrian Baddeley