Skip to content

Instantly share code, notes, and snippets.

View dimasmaulana99's full-sized avatar
🏠
Working from home

Dimas Maulana Ichsan dimasmaulana99

🏠
Working from home
View GitHub Profile
@dimasmaulana99
dimasmaulana99 / 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():