Bug report #3111

filtering of shapefile with query builder not working when using 'excluding' query

Added by Mathieu Pellerin - nIRV almost 14 years ago. Updated almost 14 years ago.

Status:Closed
Priority:Low
Assignee:Jürgen Fischer
Category:Vectors
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:invalid
Crashes QGIS or corrupts data: Copied to github as #:13171

Description

Let's say you have 4 polygons in a shapefile

id name
0 polygon-a
1 polygon-b
2 polygon-c
3 polygon-d

If you filter the shapefile using this query:
id = 1 AND id = 2 AND id = 3

QGIS will properly display only the polygons with id 1, 2 and 3.

However, if you filter the shapefile using this query:
id != 0

QGIS will fail to eliminate polygon with id 0.

The problem started to occur 2 days ago.

History

#1 Updated by Mathieu Pellerin - nIRV almost 14 years ago

Sorry, first query should be:
id = 1 OR id = 2 OR id = 3

Need some sleep...

#2 Updated by Jürgen Fischer almost 14 years ago

Please include a shapefile and report the OGR version you are using.

#3 Updated by Mathieu Pellerin - nIRV almost 14 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

Wow, turns out the shapefile had - unknown to me until now - duplicates of a number of polygons, including the one I was trying to hide.

Sorry for the noise, closing this => invalid.

Also available in: Atom PDF