Bug report #11111
Some features not displayed in spatialite layer
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | - | ||
Affected QGIS version: | 2.4.0 | Regression?: | No |
Operating System: | Debian GNU/Linux amd64 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 19441 |
Description
I have spatialite database with two layers that contain close to 2 million rows each (1.83 mil and 1.93 mil). When I add the layers, some features are not displayed. I can still select them with query by primary key and they show up in the attribute table, but never on map.
However if I go to database manager and run a select * from layer
query and import that, all features show fine.
When I enable showing count of features, the first layer only counts about 1.75 mil and draws about that fraction while the other counts full 1.93 mil, but only displays rather small fraction.
If I try running a select * from layer limit 1700000
instead, the set of features that gets excluded mostly matches the set of features not drawn when I included the whole layer, so order in which sqlite returns the rows might have something to do with it.
The data set is proprietary so I can't share it, but I know python and can do some debugging.
History
#1 Updated by Jan Hudec over 10 years ago
Hm, now I tried dropping and recreating the whole database and it seems to display correctly now.
It might be that the spatial indices got corrupted. The data is generated and spatialite does not support dropping and recreating things well.
#2 Updated by Jan Hudec over 10 years ago
- Status changed from Open to Closed
I am now sure this was not fault of QGIS but a deficiency of spatialite, so I am retracting it.