Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting features feature in spatial views and virtual layers leads to wrong results #23523

Closed
qgib opened this issue Sep 21, 2016 · 18 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Regression Something which used to work, but doesn't anymore Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Sep 21, 2016

Author Name: Gerhard Spieles (Gerhard Spieles)
Original Redmine Issue: 15600
Affected QGIS version: 3.5(master)
Redmine category:vectors
Assignee: Hugo Mercier


Select features in spatialite views higlights wrong objects



Related issue(s): #22229 (relates), #23632 (relates), #26804 (relates)
Redmine related issue(s): 14232, 15709, 18973


@qgib
Copy link
Contributor Author

qgib commented Sep 21, 2016

Author Name: Reinhard Reiterer (Reinhard Reiterer)


See also: #23073 (Virtual Layer - Selecting multipart features fails)

Perhaps these issues are related, since virtual layers are based on SpatiaLite.

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • regression was configured as 0
  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Oct 1, 2017

Author Name: Giovanni Manghi (@gioman)


Worked as expected for SL views (virtual layer untested as they were not available) until 2.8.*


  • regression was changed from 0 to 1
  • priority_id was changed from Normal to High
  • version was changed from 2.14.5 to 2.18.13

@qgib
Copy link
Contributor Author

qgib commented Oct 1, 2017

Author Name: Giovanni Manghi (@gioman)


  • subject was changed from Select feature in spatial views leads to wrong results to Selecting features feature in spatial views and virtual layers leads to wrong results

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2017

Author Name: Vincent Dionne (Vincent Dionne)


The same problem is present in 2.18.13 when adding a spatialite layer through DB MANAGER -SQL Query.

Easy to replicate: DB Manager => SQLITE => SQL window => Select * from your_layer => add layer.

Feature selection will be wrong.

@qgib
Copy link
Contributor Author

qgib commented Oct 10, 2017

Author Name: Jürgen Fischer (@jef-n)


@qgib
Copy link
Contributor Author

qgib commented Jan 27, 2018

Author Name: Jürgen Fischer (@jef-n)


@qgib
Copy link
Contributor Author

qgib commented Feb 26, 2018

Author Name: Gerhard Spieles (Gerhard Spieles)


Issue is still present in 3.1.0-3 (see Mail Paolo Cavallini, QGIS tickets)

@qgib
Copy link
Contributor Author

qgib commented Mar 3, 2018

Author Name: Giovanni Manghi (@gioman)


  • version was changed from 2.18.13 to 3.1(master)
  • operating_system was changed from win to

@qgib
Copy link
Contributor Author

qgib commented Apr 25, 2018

Author Name: Leon van der Meulen (@leonmvd)


Problem still persists in 3 as well with PostGIS layers. Ordinary file based layers are ok though

@qgib
Copy link
Contributor Author

qgib commented Jun 4, 2018

Author Name: Dominique Lyszczarz (@domlysz)


Confirmed with a Geopackage spatial view. Note it also affect manual label positioning with xy position stored in auxiliary layer : trying to move a label with the dedicated tool performs the shift for another feature's label.

@qgib
Copy link
Contributor Author

qgib commented Oct 24, 2018

Author Name: Hugo Mercier (@mhugo)


@qgib
Copy link
Contributor Author

qgib commented Oct 24, 2018

Author Name: Hugo Mercier (@mhugo)


I see several issues in the provided project:

  • virtual layers: selection works fine, but the identification tool identifies all the object
  • spatialite views: selection selects the wrong feature, identification tool seems ok

  • assigned_to_id was configured as Hugo Mercier

@qgib
Copy link
Contributor Author

qgib commented Dec 28, 2018

Author Name: Paolo Cavallini (@pcav)


Could you please check again on current release and update the affected version if still valid?
Thanks.

@qgib
Copy link
Contributor Author

qgib commented Dec 28, 2018

Author Name: Giovanni Manghi (@gioman)


Paolo Cavallini wrote:

Could you please check again on current release and update the affected version if still valid?
Thanks.

Please change status to "feedback" when needed.


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jan 1, 2019

Author Name: Gerhard Spieles (Gerhard Spieles)


Hello,
tested issue with 3.5master, Rel 56.
To exclude faults, i have created a complete new project in 3.5 with a newly created spatialite database and layers via QGIS. Testproject and database are attached (zip).

Virtual Layers seems to be ok!.

Spatialite views leads to the same wrong results in selecting objects.

The issue seems for me to depend in the interpretation/handling of the "ROWID" in QGIS.

In the sample data, I created to views. One with the "ROWID" from the geometrielayer(Parent), one without.
The layer (view) with the "ROWID" shows:
-undefined selection behaviour for objects
-in objectcount = 0,
-open the the attribute table, 100 filtered Rows are shown. Really, the layer has 256 rows.
-When you go to the layer in the layers panel, right click, filter and define a filter "ROWID < 1000000", the objectcount shows 256 rows and the attrubute table shows all the 256 rows. Selecton behaviour is further undefined.

The layer (view) without "ROWID" shows:
-all objects are selected, even only one oject was clicked.
-in objectcount 0
-in attribute table only one filtered row. Setting a filter via layers panel like "ROWID < 1000000" brings no change.


  • version was changed from 3.1(master) to 3.5(master)
  • 14042 was configured as testviewspatialite_qgis3_5_56.zip

@qgib
Copy link
Contributor Author

qgib commented Jan 1, 2019

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Feedback to Open

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Vectors Related to general vector layer handling (not specific data formats) Regression Something which used to work, but doesn't anymore labels May 25, 2019
@qgib qgib added this to the Version 2.14 milestone May 25, 2019
@nyalldawson nyalldawson modified the milestones: Version 2.14, 3.4.9 May 25, 2019
@nyalldawson nyalldawson removed this from the 3.4.9 milestone Jun 23, 2019
@gioman
Copy link
Contributor

gioman commented Jan 4, 2021

Select/identify on virtual layers is ok (I think it has been fixed), while the issue with SL/GPKG views is duplicate of

#36291

@gioman gioman closed this as completed Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Regression Something which used to work, but doesn't anymore Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

3 participants