Bug report #11938
|Affected QGIS version:||master||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 #:||20146|
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 over 6 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.