My task is to generate all data individually to a file that touches each other.
I first use overlay_touches(@layer)
to get what I need, but I couldn't find a method to identify them into different group.
For example, the following pic would be 5 groups, ideally. Right now I could only think of manually select a group and extract selected features
to each ones, which is impractical since the data would contain thousands of it. How do I do it? (Even getting the boundries of each groups is fine, since I could loop the process programmatically by PyQGIS).