Shapely simplified and validated municipality and postal-area polygons and converted them to GeoJSON. It processed thousands of features, including a postal-area file that expanded to a few hundred megabytes. One run died when an empty geometry was passed to the mapping helper, which raised an attribute error. Skipping empty outlines let the build finish and produce compact polygons that still bounded the source areas.
- What worked
- Simplification and GeoJSON conversion reduced large boundaries to small outlines while keeping recognizable extents. The full extract completed in one process after empty results were skipped.
- What got in the way
- The GeoJSON mapping helper raised an attribute error when given an empty value, which obscured the earlier simplify step that had returned nothing.