Bug report #19838

Cannot select correct features in Virtual Layer

Added by Joseph Liam over 1 year ago. Updated about 1 year ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Virtual Layers
Affected QGIS version:2.18.22 Regression?:No
Operating System:Windows 7 Easy fix?:No
Pull Request or Patch supplied:No Resolution:no timely feedback
Crashes QGIS or corrupts data:No Copied to github as #:27662

Description

I created a virtual layer which contains a copy of features from another layer (be it point, line or polygon) using the expression:

SELECT * FROM "some_layer"

Now when I use the Select Features tool and try to select either one or a group of features, it would select other features which I did not highlight (as shown in the image provided).

But the selection doesn't seem to be random. When I try to select the same features each time, other features which lie somewhere else are instead selected. I tried changing the projection CRS but the issue remained.

image11.png (25 KB) Joseph Liam, 2018-09-13 12:47 PM


Related issues

Related to QGIS Application - Bug report #14232: select features in a spatialite view leads to wrong_results Closed 2016-02-04

History

#2 Updated by Gerhard Spieles over 1 year ago

Same issue in Spatialite Views #14232

#3 Updated by Andrea Giudiceandrea over 1 year ago

Did you try with QGIS 3.3.0-master?

#4 Updated by Harrissou Santanna over 1 year ago

  • Status changed from Open to Feedback

Can you try the query with naming the fields you want to add to the virtual layer ? cf https://docs.qgis.org/testing/en/docs/user_manual/managing_data_source/create_layers.html#supported-query-language

#5 Updated by Jürgen Fischer over 1 year ago

  • Related to Bug report #14232: select features in a spatialite view leads to wrong_results added

#6 Updated by Joseph Liam over 1 year ago

Harrissou Santanna wrote:

Can you try the query with naming the fields you want to add to the virtual layer ? cf https://docs.qgis.org/testing/en/docs/user_manual/managing_data_source/create_layers.html#supported-query-language

Tried quering with naming fields in the expression (e.g. SELECT geometry, fieldName FROM "some_layer"), same result when trying to select features.

#7 Updated by Joseph Liam over 1 year ago

Andrea Giudiceandrea wrote:

Did you try with QGIS 3.3.0-master?

It seems to work on QGIS 3.2.0 at least, can't test master at the moment. I was hoping a fix for the LTR version. This is used in a plugin for QGIS 2.18 and was hoping for a fix until I have the time to port over to QGIS 3 :)

#8 Updated by Harrissou Santanna over 1 year ago

Is this still valid in 3.4.2?

#9 Updated by Jürgen Fischer about 1 year ago

Please test with QGIS 3.4 - QGIS 2.18 reached it's end of life.

#10 Updated by Giovanni Manghi about 1 year ago

  • Resolution set to no timely feedback
  • Status changed from Feedback to Closed

Closing for lack of feedback.

Also available in: Atom PDF