I would like to merge polygons (parcels) which are inside the white road (which is a hole) -- see the picture.
The way I'm doing this is certainly a bad way because later, in my script, I have this error:
AttributeError: 'GeoSeries' object has no attribute '_geom'
pa_fu = parcelles.unary_union voirie = commune.difference(pa_fu) # commune is a big polygon which contains all the geometries public = pd.DataFrame() public['geometry'] = voirie public['statut'] = ['public'] * public.size prive = pd.DataFrame() prive['geometry'] = pa_fu prive['statut'] = ['prive'] * prive.size decoupage = GeoDataFrame(pd.concat([public, prive])) decoupage.crs=commune.crs # on fixe le système de projection identique à commune cases_decoupage = overlay(cases, decoupage, how="intersection")
How can I merge these parcels and create a GeoDataFrame containing merged parcels and the white hole as a polygon?