Skip to content
Prev 3281 / 29559 Next

enumerate grid clusters/patches with size of contiguous cluster

Hi Roger and others,

Thanks again for this helpful script.  It made me see some potential to 
use spdep package for another related problem that I was previously 
using CGAL (C++) alpha shapes for.

Is there a way to output a list of nearest neighbour pairs in an xy 
coordinate list (or binary grid for that matter I guess).  I would like 
to convert a binary grid of lines (1 cell thick) to a constituent line 
segment list of the form (startx, starty, end x end y), which I then 
polygonize using RODBC/postGIS, as we discussed in a previous thread.

Thanks in advance!

Murray
Roger Bivand wrote: