Shapefiles can mix simple
MULTIPOLYGONs in the same data source. Spatial databases like PostGIS and SpatiaLite are strict, and will not put a
POLYGON in a
MULTIPOLYGON geometry column.
I've gotten used to using
ST_Multi to fix this issue. But now I am trying to use GeoPandas to do some file processing, including converting from shapefile to GeoPackage (with a bunch of stuff in the middle), and I am running into this error:
ValueError: Record's geometry type does not match collection schema's geometry type: 'MultiPolygon' != 'Polygon'
Is there a GeoPandas equivalent to
ST_Multi that I can use to fix the geometry before saving to the GeoPackage or SpatiaLite format?