Bug report #19838
Cannot select correct features in Virtual Layer
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.
Related issues
History
#1 Updated by Joseph Liam about 6 years ago
A related question had been asked on GIS Stack Exchange: https://gis.stackexchange.com/questions/261615/selection-feature-acting-weird-on-queried-layer-in-qgis
#2 Updated by Gerhard Spieles about 6 years ago
Same issue in Spatialite Views #14232
#3 Updated by Andrea Giudiceandrea about 6 years ago
Did you try with QGIS 3.3.0-master?
#4 Updated by Harrissou Santanna about 6 years 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 about 6 years ago
- Related to Bug report #14232: select features in a spatialite view leads to wrong_results added
#6 Updated by Joseph Liam about 6 years 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 about 6 years 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 almost 6 years ago
Is this still valid in 3.4.2?
#9 Updated by Jürgen Fischer almost 6 years ago
Please test with QGIS 3.4 - QGIS 2.18 reached it's end of life.
#10 Updated by Giovanni Manghi over 5 years ago
- Resolution set to no timely feedback
- Status changed from Feedback to Closed
Closing for lack of feedback.