I have read the question and comments on:
Splitting shapefile into separate files for each feature using QGIS/GDAL/SAGA? that can be seen here: Splitting shapefile into separate files for each feature using QGIS/GDAL/SAGA?
However, in my case I don't have unique values for each polygon but instead I have grouping variables.
A sample dummy data is that I have a vector layer with field "forestClass" and in this field my polygons have the following codes: 134,134,134,879,908,675,675,908,879,923,675,675.
I would need to get a polygon layer for each forest class, thus resulting in:
- Polygon layer 1 with forestclass 134 and 3 polygons
- Polygon layer 2 with forestclass 879 and 2 polygons
- Polygon layer 3 with forestclass 908 and 2 polygons
- Polygon layer 4 with forestclass 675 and 4 polygons
- Polygon layer 5 with forestclass 923 and 1 polygons
Is there any ready solution for this in QGIS or dependencies? and If not, is there someone that could guide me how to do this?
After I get the subgroup vector layers I need to perform buffer/select by location and save intersect polygons to new layers. For this task I am using processing/graphical-modeler and I have solved almost everything but the splitting into subgroups is my pain now.
I have this situation with hundred of polygons and it would not be efficient to do this on a regular basis manually.