qgis – Discover Multipart Features in a QGIS Layer

multipartqgisqgis-1

I am trying to identify multipart features using QGIS version is 1.8.0.

I've tried:

  1. look at the attributes table
  2. select a random feature and check in the canvas if there are
    multiple geometries selected
  3. repeat until found one or all features have been examined

What I would like to check is something like a Boolean value in the Layer properties!

Best Answer

I'm on QGIS 2.4; not sure if this will work in 1.8!

Start an edit session on the layer and add a new field called multi - an integer, single-digit.

For the expression, enter:

CASE WHEN  geomToWKT( $geometry ) LIKE '%MULTI%' THEN 1 ELSE 0 END

This will give you a 1 for each row when it's a multi-part line or polygon.

Related Question