How can I convert a Multi Polygon
GPKG to single Polygon
s using ogr2ogr
? (I'm working in a Jupyter Hub environment without access to QGIS.)
1 Answer
ogr2ogr
has an -explodecollections
flag. Different name – same result.
ogr2ogr -explodecollections singlepart.gpkg multipart.gpkg
-
2That is even documented gdal.org/programs/ogr2ogr.html "Produce one feature for each geometry in any kind of geometry collection in the source file, applied after any -sql option." Commented Jun 9, 2022 at 14:38
-