Bug report #10263
Freeze using "Select By Location" (or the spatial query tool) for complex polygon and points
|Category:||C++ plugins/Spatial Query|
|Affected QGIS version:||3.5(master)||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||18695|
Using QGIS 2.2 (tested in current nightly build of 2.3). 32bit version (replicated issue in 64bit version).
QGIS goes slow, then crashes when doing a "select by location" on points inside a polygon when using a very complex polygon. This is an issue with flooding data in the way it is provided by the Scottish Environment Protection Agency (single polygon converted from a raster - very complex - see attached).
I had thought this problem had been solved in the new release, but we have the same issue as laid out before.
The data in the zip file attached seems to cause the problem - it is one of the pieces of flood data and some OSM data (I can't include the original dataset because it is a secure dataset to do with vulnerable people). Both files are in British National Grid 27700.
When the "Select by Location" analysis is run, the window remains open and hangs, it doesn't crash, but it has been left overnight processing and has not completed. When you try and cancel the operation, QGIS crashes entirely.
#2 Updated by Giovanni Manghi over 6 years ago
- Subject changed from Crash using Select By Location for complex polygon and points to Freeze using "Select By Location" (or the spatial query tool) for complex polygon and points
- Category changed from Vectors to 44
- Crashes QGIS or corrupts data changed from No to Yes
- Operating System deleted (
- OS version deleted (
yes, it seems that using large/complex polygons (like your one that is the result of a poligonization from raster) the tools are largely inefficient. Anyway there are alternatives. In the processing toolbox you can use v.select (with the overlap operator) and the operation takes a few seconds. Also in PostGIS the operation/query takes a few seconds.
#7 Updated by Loïc BARTOLETTI almost 2 years ago
- Affected QGIS version changed from 2.18.4 to 3.5(master)
- Description updated (diff)
Confirmed on master.
I think this is a good case for very complex (and invalid) geometries. By processing the data, we can reduce the time, but not as much as on postgis.