[Qgis-developer] Wrong $length

Nyall Dawson nyall.dawson at gmail.com
Wed Dec 24 11:18:01 PST 2014

On 25 Dec 2014 12:37 am, "Paolo Cavallini" <cavallini at faunalia.it> wrote:
> Hi all.
> 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.
> Furthermore, "Update all" does not seem to work on a column where
> sorting is applied (by clicking on column head).

I can't test right now, but this sounds like possibly the column isn't
large enough to hold the length values, and they are overflowing into
negative values. Could this be the case?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20141225/e7ad05bd/attachment.html>

More information about the Qgis-developer mailing list