Multipart to singleparts
The code below uses the Toolbox SDK, which you can install with pip install toolbox-sdk.
Additional Python examples: using SDK, using Requests. If you prefer other programming language or need full API reference, check out Toolbox OpenAPI as well.
Docs
This tool takes a vector file with multipart geometries and generates a new one in which all geometries contain a single part. Features with multipart geometries are divided into as many different features as parts the geometry contains, and the same attributes are used for each of them.
This is useful when you need to work with individual geometry parts separately, or when you need to ensure that all features have single-part geometries for compatibility with certain processing algorithms or data formats.
Input:
Vector file - any vector file that may contain multipart geometries (such as MultiPolygon, MultiLineString, or MultiPoint).
Output:
A new vector GeoJSON file where each feature contains only a single-part geometry. The output will have the same attribute fields as the input, but potentially more features if the input contained multipart geometries.
Example of a multipart polygon feature before processing¶
The same feature after conversion to singleparts - each part becomes a separate feature with identical attributes¶
Try the tool in action
Click on the Demo button above the tool form. The fields are filled in with demo values.
Click on the Run button.