TransWikia.com

Selecting only features with multiple parts in QGIS 3.14

Geographic Information Systems Asked by celeryfarmer on December 4, 2020

I have a multipart polygon layer that resides on a PostGIS server. The layer is a parcel map, with each parcel having a single unique PIN. Most of the features are single parts, but some are two or more parts for various historical reasons. There are close to 40,000 features. If I check geometries for multipart geometries with only a single part, it returns all of my single part features. For small numbers of parcels I can use this tool to show these errors in the attribute table, invert the selection, and I have the parcels I am looking for. However, QGIS chokes when I try doing this with the full layer, and I really want to avoid having to do this in little bites when I’m sure there is a better way.

I want to select all the parcels that have more than one part. If I look at the Identify Results panel, the (derived) group shows the number of parts in that feature. This is the attribute I am looking for. How is this calculated, and how can I use this derived value as my criteria for a selection, or is there another way?

One Answer

Go to the select by expression tool and use

num_geometries( $geometry) > 1

Then click on Select Features (lower right) and all the multi part geometries will be selected.

enter image description here

Correct answer by Ian Turton on December 4, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP