Bug report #15134

Virtual Layer - Selecting multipart features fails

Added by R. R. almost 8 years ago. Updated over 7 years ago.

Assignee:Hugo Mercier
Category:Data Provider
Affected QGIS version:2.14.3 Regression?:No
Operating System:Windows, GNU/Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23073


I've created a virtual layer to calculate the building coverage ratio of land parcels. Unfortunately, selecting features with two or more parts seems not to work properly in QGIS 2.14.3 (see screencast).

15134.mp4 - screencast (1.34 MB) R. R., 2016-06-25 12:15 PM

15134.zip - sample files (9.24 KB) R. R., 2016-06-25 12:19 PM

15134_new.mp4 (2.1 MB) R. R., 2016-11-21 10:27 AM

Associated revisions

Revision 28942361
Added by Hugo Mercier over 7 years ago

[virtual] disable FilterRect when no unique id is present. Should fix #15134


#1 Updated by R. R. almost 8 years ago

#2 Updated by R. R. almost 8 years ago

#3 Updated by gcarrillo - over 7 years ago

  • Operating System set to Windows, GNU/Linux
  • Priority changed from Normal to High
  • Assignee set to Hugo Mercier
  • Category set to Data Provider

I confirm this problem occurs not only with multi-part features but with single-part features as well.

See http://gis.stackexchange.com/a/218328/4972 for a reproducible example with single points (airports) with Natural Earth Shapefiles as Virtual Layer's source.

I've tested this on QGIS v2.14.8 (GNU/Linux), QGIS 2.16.3 (Windows 7), and a recent (from October, 2016) QGIS build v2.99 (GNU/Linux).

Sorry for setting priority to high, it's just that, in my opinion, this issue might make Virtual Layers unusable in a production environment.

#4 Updated by R. R. over 7 years ago

Hi gcarrillo,

selecting features seems to work properly after setting the unique identifier column (see 15134_new.mp4). Should I close this ticket?

#5 Updated by Regis Haubourg over 7 years ago

Confirmed here too with even nastier behaviour following that you use the select at id option, or that you cast geometry column to MultiPolygon.
Something is messing with feature id's somewhere.
Attribute table shows ERROR values for the multipolygon object.

#6 Updated by Hugo Mercier over 7 years ago

Hi, thanks for your feedback.
Work in progress : https://github.com/qgis/QGIS/pull/3794

#7 Updated by Hugo Mercier over 7 years ago

  • Status changed from Open to Closed

#8 Updated by R. R. over 7 years ago

Thx! Is this issue related to #15600?

Also available in: Atom PDF