I have a Shapefile with overlapping features.
Is there an easy way to merge them with geopandas?
I found a way with shapely, but I would like to do it with geopandas directly.
geopandasoverlapping-features
I have a Shapefile with overlapping features.
Is there an easy way to merge them with geopandas?
I found a way with shapely, but I would like to do it with geopandas directly.
Best Answer
The GeoDataFrame
1) You can use the itertools module
a) If you want to merge the intersections of the overlapping polygons
Union
b) If you want to merge the intersected polygons change
intersection
byunion
(all the polygons overlap in my example)2) You can use GeoPandas Overlay
a)
The resulting GeoDataframe
GeoPandas add the intersection geometries to the existing geometries, therefore
Union
b) use
gpd.overlay(g1, g1, how='union')