Bug report #2405

ftools does not always work with Spatialite

Added by mesajs - almost 15 years ago. Updated over 7 years ago.

Status:Closed
Priority:Low
Assignee:cfarmer -
Category:Processing/QGIS
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

Description

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)

tracks_shp.zip - Data that causes Simplify geometries to fail (as shapefile - spatialite too large) (6.68 KB) mesajs -, 2010-01-31 11:33 PM

delaunay.py Magnifier - Patch for Delaunay triangulation (1.84 KB) mesajs -, 2010-06-15 03:23 AM

History

#1 Updated by Giovanni Manghi almost 15 years ago

Hi,

work everything fine with the spatialite demo dataset under windows/linux 32bit. Can you post a sample of the data are giving you this problems?

#2 Updated by mesajs - almost 15 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 14 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.

#4 Updated by Paolo Cavallini over 13 years ago

Why is the patch not been applied? Are the other behaviours confirmed with 1.6?

#5 Updated by cfarmer - over 13 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.

Carson

#6 Updated by Maxim Dubinin over 13 years ago

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

buffering spatialite layer - works
Export to new projection - this instrument is no longer in ftools
simplify - works

WinXP, f42443c9 (SVN r15701)

#7 Updated by Giovanni Manghi over 7 years ago

The "ftools" category is being removed from the tracker, changing the category of this ticket to "Processing/QGIS" to not leave the category orphaned.

Also available in: Atom PDF