6

In QGIS 2.x, is there a simple way to determine if a polygons layer contains multipolygon geometries and if yes: which are these features?

9

The Topology Checker plugin has an option to check if a layer contains multipart geometries.

enter image description here

It is also possible to highlight multipart geometries.

5

Not tested but perhaps use something like this in the Python Console:

layer = qgis.utils.iface.activeLayer()
geom = QgsGeometry()
if layer.wkbType() == QGis.WKBMultiPolygon:
    for feature in layer.getFeatures(): 
        if geom.isMultipart():
            print feature.id()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.