Bug report #15508

[Processing] Check validity of geometries fails in master

Added by Casper Børgesen about 4 years ago. Updated about 4 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Victor Olaya
Category:Processing/QGIS
Affected QGIS version:master_2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23432

Description

I am trying to validate a few geometry layers using Processing/QGIS geoalgorithms/Vector geometry tools/Check validity and it immediately fails each time I try with the following message.

-2147483645 See log for more details

The processing log contains the following:

Uncaught error while executing algorithm
Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\\processing\\core\\GeoAlgorithm.py", line 203, in execute
self.processAlgorithm(progress)
File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\\processing\\algs\\qgis\\CheckValidity.py", line 93, in
processAlgorithm
self.doCheck(progress)
File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\\processing\\algs\\qgis\\CheckValidity.py", line 109, in doCheck
layer.crs())
File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\\processing\\core\\outputs.py", line 326, in getVectorWriter
crs, options)
File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\\processing\\tools\\vector.py", line 556, in __init__
uri = GEOM_TYPE_MAP[geometryType] + "?uuid=" + unicode(uuid.uuid4())
KeyError: -2147483645

It doesn't matter if I select either QGIS or GEOS as method in the parameters. Of course this also affects the QGIS menu/Vector/Geometry Tools/Check Validity.

TELEMASTEFUNDAMENT.dbf (61.6 KB) Casper Børgesen, 2016-09-01 02:15 AM

TELEMASTEFUNDAMENT.prj (407 Bytes) Casper Børgesen, 2016-09-01 02:15 AM

TELEMASTEFUNDAMENT.shp (110 KB) Casper Børgesen, 2016-09-01 02:15 AM

TELEMASTEFUNDAMENT.shx (3.62 KB) Casper Børgesen, 2016-09-01 02:15 AM


Related issues

Related to QGIS Application - Bug report #15563: QGIS do not preserve z coordinate when copy/paste multipa... Closed 2016-09-13

Associated revisions

Revision a4bdfb76
Added by Alexander Bruy about 4 years ago

[processing] support more geometry types in memory layers (fix #15508)

History

#1 Updated by Casper Børgesen about 4 years ago

I forgot to mention, that it works fine in QGIS 2.16.1.

#2 Updated by Alexander Bruy about 4 years ago

  • OS version deleted (7 x64)
  • Operating System deleted (windows)

Your shapefile contains 2.5D. QGIS master now by default saves Processing outputs into memory layes, which does not support 2.5D geometries.

As workaround you can save algorithm results to file.

#3 Updated by Victor Olaya about 4 years ago

if this is fine in 2.16...can we close the issue? Looks like a limitation in QGIS < 2.16 with memory layers, as Alex says, so there is nothing we can do to fix that

#4 Updated by Casper Børgesen about 4 years ago

Victor Olaya wrote:

if this is fine in 2.16...can we close the issue? Looks like a limitation in QGIS < 2.16 with memory layers, as Alex says, so there is nothing we can do to fix that

Well I think if you are going to close this ticket, shouldn't the user be made aware of why they get this error message? I mean something like "The input data 2.5D geometry and processing can only save to file and not memory layer. Please select an output file." or similar?

At least until memory layers are capable of handling 2.5D geometries.

#5 Updated by Casper Børgesen about 4 years ago

Alexander Bruy wrote:

As workaround you can save algorithm results to file.

I tried not setting a file for valid output (and uncheck the "open output file after running algorithm"), and two shape files for invalid and error output. I get two error messages with the same large negative number for each.

If I set a file for each of the three outputs it seems to work.

So I guess that the "open output file after running algorithm" doesn't suppress the creation of a memory layer. I would expect it to completely skip the memory layer, if the user doesn't want to open it afterwards, since it is the same as putting the results directly into the waste bin.

#6 Updated by Alexander Bruy about 4 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF