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?

2 Answers 2

10

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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