Bug report #12894
Processing: memory layers saved using QGIS tools have all attributes converted to string
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Victor Olaya | ||
Category: | Processing/QGIS | ||
Affected QGIS version: | 2.8.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 #: | 20984 |
Description
When using processing plugin (up to date) on PostGIS layer.
When I use an algorithm and generate a memory layer for result : every attribute become string type
Associated revisions
[processing] fixed attribute types in memory layers
fixes #12894
History
#1 Updated by Giovanni Manghi over 9 years ago
- Category set to 94
- Status changed from Open to Feedback
please specify the tool that caused the issue.
#2 Updated by Giovanni Manghi over 9 years ago
- Category changed from 94 to Processing/Core
#3 Updated by Nicolas Rochard over 9 years ago
- File polygon_centroid.png added
- File after_polygon_centroid.png added
- File after_save_selected.png added
- File save_selection_as.png added
- File after_dissolve.png added
- File dissolve.png added
- File before_dissolve.png added
All in Processing
See screenshots tested with dissolve, polygon centroid and save selected feature as script.
Giovanni Manghi wrote:
please specify the tool that caused the issue.
#4 Updated by Giovanni Manghi over 9 years ago
- Subject changed from Memory layer corrupt type field to Processing: memory layers saved using QGIS tools have all attributes converted to string
- Assignee set to Victor Olaya
- Status changed from Feedback to Open
- Category changed from Processing/Core to Processing/QGIS
#5 Updated by Paolo Cavallini over 9 years ago
Maybe this is related? Applying the Processing buffer on a memory layer returns an error:
2015-06-08T08:25:25 2 Uncaught error while executing algorithm Traceback (most recent call last): File "/home/paolo/python/plugins/processing/core/GeoAlgorithm.py", line 225, in execute self.processAlgorithm(progress) File "/home/paolo/python/plugins/processing/algs/qgis/FixedDistanceBuffer.py", line 72, in processAlgorithm dissolve, segments) File "/home/paolo/plugins/processing/algs/qgis/Buffer.py", line 45, in buffering total = 100.0 / float(len(features)) ZeroDivisionError: float division by zero
#6 Updated by Victor Olaya over 9 years ago
- Status changed from Open to Closed
Fixed in changeset 38a247f26cc4e0d23ae01cc48b2590a41968ad5a.
#7 Updated by Victor Olaya over 9 years ago
Paolo's error is casused by trying to running the buffer with an empty layer. I will fix that separately, to handle that case more gracefully instead of breaking and showing an error trace
#8 Updated by Nicolas Rochard over 9 years ago
Thanks for your work, I will test it in my master version asap.
Victor Olaya wrote:
Fixed in changeset 38a247f26cc4e0d23ae01cc48b2590a41968ad5a.