Skip to content

Instantly share code, notes, and snippets.

View dmxsan's full-sized avatar
:electron:
Do the Thing

Dimas Maulana Ichsan dmxsan

:electron:
Do the Thing
View GitHub Profile
@dmxsan
dmxsan / find_multipart.py
Created August 13, 2023 13:19 — forked from timlinux/find_multipart.py
A QGIS Python snippet to select multipart features in the active layer
# Find all multipart features in the active layer
layer = iface.activeLayer()
# Clear the selection first
layer.removeSelection()
# Iterate through features and select the multipart ones
for feature in layer.getFeatures():
geom = feature.geometry()
if geom.isMultipart():