distance between patch edges

Angus Carr apcarr at FLASH.LakeheadU.CA
Tue Jul 6 14:14:43 EDT 1999


You could do a repetitive filter that runs on a layer containing patch
id's.

1) Get the patch id layer (PID)
2) grab the patch of interest into a new layer (INT)
3) Run a filter or a buffer to grow INT by one pixel (copy over INT)
4) Use INT as a mask to list patches in PID within INT, using r.stats
       (PLIST)
5) Eliminate previously found patches from PLIST -  New patches at that
       distance.
6) Repeat 3-5 until a maximal buffer distance has been reached.

This approach will take a while, but it will work. I would advise doing
all of this through C code, rather than using the existing tools, but it
could all be done with some thought and the existing tools.



Good Luck,
Angus Carr. On Tue, 6 Jul
1999, Roy Sanderson wrote:

> Dear All
> 
> I've got a raster map with a number of different patches (habitat blocks)
> and need to calculate the shortest distance from the edge of each patch to
> the edge of all other patches.  Using r.volume (in combination with other
> commands) is OK to calculate centroid distances, but not edge distances.
> r.le.dist works only for one nearest patch (M4 option) or a specific group
> (M9), not all patches.  Any suggestions?
> 
> TIA
> Roy
> 
> ----------------------------------------------------------------------------
> Roy Sanderson
> Centre for Land Use and Water Resources Research
> Porter Building
> University of Newcastle
> Newcastle upon Tyne
> NE1 7RU
> United Kingdom
> 
> Tel: +44 191 222 7789
> Fax: +44 191 222 6563
> r.a.sanderson at newcastle.ac.uk
> URL: http://www.cluwrr.ncl.ac.uk
> ----------------------------------------------------------------------------
> 



More information about the grass-user mailing list