I have a GeoPandas dataframe that looks like the following
geometry raster_val
0 POLYGON ((1.85626 49.12003, 1.85626 49.11171, ... 28.530001
1 POLYGON ((1.87290 49.12003, 1.87290 49.11171, ... 28.930000
2 POLYGON ((1.88123 49.12003, 1.88123 49.11171, ... 28.670000
3 POLYGON ((1.89788 49.12003, 1.89788 49.11171, ... 28.510000
4 POLYGON ((1.90620 49.12003, 1.90620 49.11171, ... 29.969999
that I can show
f,ax=plt.subplots(figsize=(8,8))
gdf.plot(column='raster_val', scheme='quantiles', legend=True, ax=ax)
I would like to cluster all the adjacent polygons with a given values and create macropolygons
based on such aggregration. Let say I want to create macropolygons that have raster_val > 33