Opened 14 years ago

Closed 13 years ago

#2405 closed bug (fixed)

ftools does not always work with Spatialite

Reported by: mesajs Owned by: cfarmer
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: fTools Version: Trunk
Keywords: ftools spatialite Cc: esseffe, cfarmer
Must Fix for Release: No Platform: Windows
Platform Version: Vista 64 Awaiting user input: no

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)

Attachments (2)

tracks_shp.zip (6.7 KB ) - added by mesajs 14 years ago.
Data that causes Simplify geometries to fail (as shapefile - spatialite too large)
delaunay.py (1.8 KB ) - added by mesajs 14 years ago.
Patch for Delaunay triangulation

Download all attachments as: .zip

Change History (10)

comment:1 by jef, 14 years ago

Owner: borysiasty removed

comment:2 by lutra, 14 years ago

Cc: esseffe added
Owner: set to cfarmer

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?

comment:3 by mesajs, 14 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.

by mesajs, 14 years ago

Attachment: tracks_shp.zip added

Data that causes Simplify geometries to fail (as shapefile - spatialite too large)

by mesajs, 14 years ago

Attachment: delaunay.py added

Patch for Delaunay triangulation

comment:4 by mesajs, 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.

comment:5 by pcav, 13 years ago

Cc: cfarmer added

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

comment:6 by cfarmer, 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

comment:7 by borysiasty, 13 years ago

Component: Python plugins and bindingsfTools

comment:8 by gislab, 13 years ago

Resolution: fixed
Status: newclosed

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

WinXP, r15700

Note: See TracTickets for help on using tickets.