Bug report #13987

Identify Feature not finding feature

Added by Harry Clarke almost 9 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Tools
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:22001

Description

Using Point data from a Postgresql table, Identify Feature reports "No feature at this position found", despite the cursor been placed in the middle of the symbol. This is regardless of whether the symbol is defined in map units (my preference) or millimiters.
However, using a different layer of point data in the same map (from a Postgresql table), Identify feature works as expected. I have been unable to work out what is the difference is between the two sets of data that would cause Identify Feature work in some cases and not others

Test-identify.qgs - Project file (32.1 KB) Harry Clarke, 2016-01-10 12:40 PM

test_indetify.sql - SQL to generate tables and view (5.32 KB) Harry Clarke, 2016-01-10 12:40 PM

test_indetify.sql (5.32 KB) Harry Clarke, 2016-01-13 12:30 PM

History

#1 Updated by Harry Clarke almost 9 years ago

I have identified one difference
Point data from a Table in Postgresql, imported via DB Manager - Identify feature does not work
Point data from a View in Postgresql, imported via Add PostGIS Layers - Identify feature does work

Note I use DB Manager wherever possible, as it is orders magnitude faster to add a Table, than using Add PostGIS Layers. Unfortunatly Views can only be included via the latter functionality.

#2 Updated by Saber Razmjooei almost 9 years ago

  • Status changed from Open to Feedback

Works fine for me in 2.12.1

#3 Updated by Harry Clarke almost 9 years ago

Does not work for me when the point data is in a Postgresql Table which was imported via DB Manager. The error is repeatable and occurs in different projects.
What other information would be helpful to try and track down this bug?

#4 Updated by Sebastian Dietrich almost 9 years ago

Could you attach a sample project containing a "good" and a "bad" layer? And if possible post the SQL to generate the table and view in PostGIS.

#5 Updated by Harry Clarke almost 9 years ago

Attached is a test project and accompanying SQL to generate the table and view
I have used table and views that already existed, and hence will probably contain lots of extra columns. Identify does not work with the table, but does with the view.

#6 Updated by Saber Razmjooei almost 9 years ago

  • Status changed from Feedback to Open

#7 Updated by Giovanni Manghi almost 9 years ago

  • Target version deleted (Version 2.14)
  • Status changed from Open to Feedback

Cannot confirm here on master with my own data, attached sql is not good to restore any data.

#8 Updated by Harry Clarke almost 9 years ago

  • Target version set to Version 2.14

This is frustrating. I do not know what you mean by "...attached sql is not good to restore any data". Please explain precisely what you want me to provide.

#9 Updated by Giovanni Manghi almost 9 years ago

  • Target version deleted (Version 2.14)

Harry Clarke wrote:

This is frustrating. I do not know what you mean by "...attached sql is not good to restore any data". Please explain precisely what you want me to provide.

trying to restore your tables using the sql you provided it gives and error. If it works with out data/projects it will be good to try with a sample of your data/projects. You did the right thing providing a dump, but restoring does not work (it says there is a relation missing), do just try again.

You should also try master.

Let tag this for 2.14 if there is a regression confirmed (that there is not at the moment, we need more tests).

#10 Updated by Harry Clarke almost 9 years ago

Apologies. The tables should be created before the view, and the view was referencing a table/view that it did not need, which is strange given that I had just done a copy from pgAdmin of the relevant tables & view.
Given the size of the tables and the confidentiality of the data, it is not possible a dump of all the data, but the X,Y co-ordinates typically have values of (512500, 123500) from which the_geom is calculated (SQL to generate is enclosed as an example).
ID for the table (that Identify does not work) has a typical value of "DSS0071800003HVE". Changing the ID from a character(16) field to a serial field (i.e. an integer) made no difference.

#11 Updated by Sebastian Dietrich almost 9 years ago

  • Category set to Map Tools
  • Status changed from Feedback to Open
  • Affected QGIS version changed from 2.12.0 to master

Thanks for the data and sorry for the delay.

I can confirm this issue exists in master (1474c0783f87cec32e64b67f1c36dd30ab03dc11).

#12 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#13 Updated by Harry Clarke over 6 years ago

  • Status changed from Open to Closed

This issue has been checked and seems to have been resolved in QGIS v3.2.1

#14 Updated by Giovanni Manghi over 6 years ago

  • Description updated (diff)
  • Resolution set to fixed/implemented

Also available in: Atom PDF