[GRASS-user] Group basins base on their location

Hi,
I was able to delineate basins using r.watershed-r.stream.extract-r.stream.basins for the entire globe at 90m resolution (MERIT-Hydro).
At this point, I would like to create “computational units” which include several basins that are close by.

To this:
I select the largest basins and create independent computational unit.
Now I remain with all the small basins, with their unique ID, (see below) that I would like to group by base on their location - a sort of unsupervised k-mean base on lat-long.

Is there any command that does this?

(r.clump works only for contiguous basins so is not ideal for isolated ones).

Thank you
Giuseppe

image.png

···

Giuseppe Amatulli, Ph.D.

Research scientist at
School of Forestry & Environmental Studies
Center for Research Computing
Yale University
New Haven, CT, USA
06511

Teaching: http://spatial-ecology.net
Work: https://environment.yale.edu/profile/giuseppe-amatulli/