Bug report #2405
ftools does not always work with Spatialite
|Affected QGIS version:||Regression?:|
|Operating System:||Windows||Easy fix?:|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||12465|
Some ftools do not work with Spatialite layers. For example (using a LINESTRING layer):
1. Buffer - produces an empty shapefile. No error messages are issued.
2. Export to new projection. The Input Spatial Reference System is not reported correctly in the dialog, but it does seem to correctly perform the reprojection.
3. Simplify geometries fails with attached error (see attached screen dump - CTRL+C did not copy text from Pyton error consol)
#2 Updated by mesajs - over 10 years ago
Did a bit more testing. Tried a variety of layers (point, linestring, polygon), as both Spatialite and the same data in Shapefiles.
Buffer never works as Spatialite, but works with shapefiles.
Simplify geometries sometimes does work OK, so it is data dependent. It fails even if the data is in a shapefile, so not a Spatialite issue.
Attaching a spatialite file that causes Simplify geometries to fail.
#3 Updated by mesajs - over 10 years ago
Identified a problem with Delaunay triangulation. The assumption in the code (doGeometry.py, def delaunay_triangulation) that the index and the featureId are the same thing does not appear to be valid, at least with spatialite tables (and possibly any source if a query has been applied to filter the layer?).
Quick hack to the code to build a dictionary relating the two, and it works, both with and without an applied query. See attachment.
#5 Updated by cfarmer - over 9 years ago
Patch was not applied because this issue was fixed independently as part of a separate bug fix. Can you confirm this has been fixed (it has for me). Ticket may be ready to be closed, as several of the issues above belong to tools which have been significantly changed recently. Will test again soon.