Bug report #9500

Wrong list of "result entities ID" after a spatial query

Added by Jean-Michel Follin over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:C++ Plugins
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:No Copied to github as #:18091

Description

When i make a query with the spatial query plugin (intersection between 2 layers), the selected features correspond to the good result but the list within the "result entities ID" panel do not (there is ID of not intersected entities and not all intersected entities are listed..) And the "create à layer from selection" function doesn't work either (it returns the same entities that the listed ones)..

pb_qgis.zip - archive file with data, qgis project and screenshots (331 KB) Jean-Michel Follin, 2014-02-07 01:32 AM

pb_qgis_suite.zip - input vectors as shapefiles (49.4 KB) Jean-Michel Follin, 2014-02-17 12:44 AM

int.zip (19.9 KB) Giovanni Manghi, 2014-02-19 10:55 AM

History

#1 Updated by Paolo Cavallini over 6 years ago

  • Status changed from Open to Feedback

Please add a more descriptive title

#2 Updated by Jean-Michel Follin over 6 years ago

Paolo Cavallini wrote:

Please add a more descriptive title

i want to update the title with something like "wrong list of "result entities ID" after a spatial query" but it seems to be not possible..

#3 Updated by Paolo Cavallini over 6 years ago

  • Subject changed from Spatial Query to Wrong list of "result entities ID" after a spatial query

#4 Updated by Salvatore Larosa over 6 years ago

  • Category changed from Vectors to C++ Plugins

works fine for me either 2.0.1 or master version.

Please can you provide more info about the problem ?
maybe adding a small sample data helps to reproduce the issue.

#5 Updated by Jean-Michel Follin over 6 years ago

Salvatore Larosa wrote:

works fine for me either 2.0.1 or master version.

Please can you provide more info about the problem ?
maybe adding a small sample data helps to reproduce the issue.

the problem appears only when data are stored in postgis. I join an archive where you will find :
- sql script for postgis database (polygons representing parcells and poygon representing a buffer)
- qgis project file
- 3 screenshots : capture-1 showing difference between selected entities in attribute table and ID listed in spatial query panel
capture-2 showing a message error appearing when i want to save the selection
and capture-3 showing the resulting layer.

#6 Updated by Giovanni Manghi over 6 years ago

Jean-Michel Follin wrote:

Salvatore Larosa wrote:

works fine for me either 2.0.1 or master version.

Please can you provide more info about the problem ?
maybe adding a small sample data helps to reproduce the issue.

the problem appears only when data are stored in postgis. I join an archive where you will find :
- sql script for postgis database (polygons representing parcells and poygon representing a buffer)
- qgis project file
- 3 screenshots : capture-1 showing difference between selected entities in attribute table and ID listed in spatial query panel
capture-2 showing a message error appearing when i want to save the selection
and capture-3 showing the resulting layer.

I cannot cleanly import your sql file into my PostGIS installations (on both linux and windows), can you provide de input vectors as shapefiles? thanks.

#7 Updated by Jean-Michel Follin over 6 years ago

For me the importation works fine (there is a create database command).
I join an archive with shapefiles (and a screenshot for import process) : I use QGIS 2.0.1 for Windows.
Thanks

#8 Updated by Giovanni Manghi over 6 years ago

  • Resolution set to worksforme
  • File int.zip added
  • Status changed from Feedback to Closed

The ID in the list is different bacause probably it is an internal id for the feature, that is different in shapes and postgis.

Beside this the number of selected features is identical (20) and also the features selected are the same (see attached files).

The function "create à layer from selection" also works.

Tested on QGIS master.

Also available in: Atom PDF