Bug report #16114

Poor error handling when passing "simplify geometries" default output file

Added by Mike Bannister almost 8 years ago. Updated over 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Processing/QGIS
Affected QGIS version:2.18.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:24026

Description

"Simplify geometries" fails with an unhelpful error message when no filename is specified for the output parameter. The dialog box has a default value of [Create temporary layer] in the output parameter, as shown in simple_geo1.jpg. I read this to mean that qgis will create a temporary layer if I don't enter a filename. Upon clicking Run the error message in simple_geo_error_msg.jpg is shown. Checking the log as suggested shows a python dump as shown in simple_geo_py_dump.jpg. If a filename is typed in the tool works great.

If the tool is supposed to create a temporary layer as I'm assuming, something is clearly broken. If the tool requires an output file, there should be a better error message. I also tested "densify geometries" and it had the same issue.

Tested on Windows 7 with 2.18.2 (64 bit)

simple_geo_error_msg.JPG (44 KB) Mike Bannister, 2017-01-26 06:16 AM

simple_geo1.JPG (50.6 KB) Mike Bannister, 2017-01-26 06:16 AM

simple_geo_py_dump.JPG (42.6 KB) Mike Bannister, 2017-01-26 06:16 AM

qgis_test_data.zip - Test datasets (155 KB) Mike Bannister, 2017-04-27 07:09 AM

Associated revisions

Revision 9f9e7114
Added by Alexander Bruy over 7 years ago

[processing] handle 2.5 geometries in the Simplify geometry algorithm
(fix #16114)

History

#1 Updated by Mike Bannister almost 8 years ago

I haven't contributed to QGIS before but am familiar with python and would be interested in helping.

#2 Updated by Mike Bannister almost 8 years ago

Files didn't attach before.

#3 Updated by Alexander Bruy over 7 years ago

  • Status changed from Open to Feedback
  • OS version deleted (2.18)
  • Operating System deleted (Windows7)
  • Category set to Processing/QGIS

Please provide sample dataset.

#4 Updated by Mike Bannister over 7 years ago

Two sample datasets are attached: test_works and test_doesnt_work.

When running "simplify geometries" and not using an output filename on test_works (i.e., leaving the default of [Create temporary layer]) everything works and a temporary layer is created. This dataset was digitized in qgis.

Performing the same process on test_doesnt_work throws an error message. If a filename is typed into the output filename field in the dialog box instead of using the default everything works. This layer was initially converted from GPX to shp using qgis, and then processed using fiona (python shapefile package).

I initially discovered this issue simplifying contours that had been clipped in arcgis (original source unknown). I tested the above process using various datasets that had been created in arc. Some worked, some didn't. I'm not sure why.

#5 Updated by Alexander Bruy over 7 years ago

  • Status changed from Feedback to Closed

#6 Updated by Alexander Bruy over 7 years ago

  • Resolution set to fixed/implemented

Error happens because you data has unsupported geometry type, with Z coordinate.

Also available in: Atom PDF