mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
Allows extraction of matching parts from a collection, returning the corresponding collection subclass. mixed_collection = QgsGeometryCollection() mixed_collection.addGeometry(... mix of geometry types ...) multi_line_string = mixed_collection.extractPartsByType(Qgis.WkbType.LineString) In this case multi_line_string will be a QgsMultiLineString object, containing just the line string parts from mixed_collection