The goal is to simplify the geometries of a shapefile containing multipolygons. However, when I use Shapely's simplify in geopandas, the result contains gaps between the polygons. I was hoping that preserve_topology would avoid this? How can I avoid or fix the issue?

gdf_simplified = gdf.copy()
gdf_simplified["geometry"] = gdf.geometry.simplify(tolerance=TOLERANCE,preserve_topology=True)

my geoDataFrame is in in {'init': 'epsg:4326'}and I use a tolerance of 360/43200 which corresponds to 30" degrees (appr. 1 km at the equator).

enter image description here

The old polygons are displayed using the black line. The new resulting polygons are depicted using colors.

For now, I was able to revert to MapShaper and get simplified shapes without the gaps. However, I would prefer a python based approach.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.