It is possible to dissolve features in GeoPandas based on the attribute field. However, I would like to know how to dissolve features in GeoPandas using at least two attribute fields. Is it possible to do that?
1 Answer
Maybe I am not understanding the context of the original question but I got here via a Google search. The linked GitHub thread in the OP question comments seems over-engineerd. It seems to me that this can actually be done quite easily:
attrs = ["attr0", "attr1", "attr2"]
gdf_dissolved = gdf.dissolve(by=attrs, as_index=False)
as_index=False
stops the grouping fields from being used as the index in gdf_dissolved
.