Bug report #11938
|Affected QGIS version:
|Pull Request or Patch supplied:
|Crashes QGIS or corrupts data:
|Copied to github as #:
The calculation of $length on the attached file returns weird results:
when calculated as virtual field is ok, whereas when updating an existing field a negative result is given. I assume this is related to topological errors in the line, but nevertheless the diff between the two methods is unexpected.
#1 Updated by Giovanni Manghi about 9 years ago
- Affected QGIS version changed from 2.6.1 to master
The geometry errors do seem to be the cause of the issue, remove them and it will not change anything.
Computing (and updating) the length in any double field created by QGIS will return right values. On the other hand the existing field in the attached vector has a length that QGIS do not allow (when you create a column). Maybe is the inability of QGIS to handle fields with such lengths.