This tool can be used to convert a vector file containing single-part features into a vector containing multi-part features. The user has the option to either group features based on an ID Field (field flag), which is a categorical field within the vector's attribute table. The ID Field should either be of String (text) or Integer type. Fields containing decimal values are not good candidates for the ID Field. If no field flag is specified, all features will be grouped together into one large multi-part vector.

This tool works for vectors containing either point, line, or polygon features. Since vectors of a POINT VectorGeometryType cannot represent multi-part features, the VectorGeometryType of the output file will be modified to a MULTIPOINT VectorGeometryType if the input file is of a POINT VectorGeometryType. If the input vector is of a POLYGON VectorGeometryType, the user can optionally set the algorithm to search for polygons that should be represented as hole parts. In the case of grouping based on an ID Field, hole parts are polygon features contained within larger polygons of the same ID Field value. Please note that searching for polygon holes may significantly increase processing time for larger polygon coverages.

See Also

MultiPartToSinglePart

Function Signature

def singlepart_to_multipart(self, input: Vector, field_name: str) -> Vector: ...

Project Links

WbW Homepage User Manual Support WbW