Bug report #16755
Virtual fields are stored as datatype integer
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Virtual Fields | ||
Affected QGIS version: | 2.18.9 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 24654 |
Description
Steps to reproduce:
- Create a new project with a new point layer, leaving the id field only.
- Create virtual fields of type real, name lon and lat, with content $x and $y
- Add some arbitrary points, save and leave edit mode
- Check the attribute table: fiels look as expected
- Save As to a new shapefile, and add it too the canvas
- Check the attribute table: lon and lat fields are truncated to integer
- Check the properties: lon and lat fields are of type qlonglong (opposed to step 2)
Saving and reopening the project does not change anything, nor saving to CSV.
The MMQGIS plugin exports the attribute table correctly to CSV.
History
#1 Updated by Matthias Kuhn over 7 years ago
Couldn't reproduce this with current master, saving to shapefiles.
Can you append a demo shapefile and project?
#2 Updated by Giovanni Manghi over 7 years ago
- Status changed from Open to Feedback
#3 Updated by Andre Joost over 7 years ago
Seems to be fixed in version 2.18.10.
Please close as I don't have the privileges to do so.
#4 Updated by Giovanni Manghi over 7 years ago
- Resolution set to fixed/implemented
- Status changed from Feedback to Closed