The $length function returns the Cartesian value when called from the aggregate function #55657
Open
2 tasks done
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Expressions
Related to the QGIS expression engine or specific expression functions
Field Calculator
What is the bug or the crash?
problem description:
I have a linear layer (testOne) and a table (tableOne) without geometry,
I start the field calc from the table and write the following expression to update the len attribute:
the result (126671.709 m) is different from what I would expect (126721.310 m), as it returns the Cartesian value of
$length
and not the ellipsoid one, in fact if I used$length
in the testOne vector I would get the desired value.data:
https://mega.nz/file/pFQnkYxJ#3zNJR0rzH-a4opip3rgkbJoLrRUlNu7-vwXeiUra_Hs
email:
https://lists.osgeo.org/pipermail/qgis-it-user/2023-December/010471.html
Steps to reproduce the issue
Versions
OSGeo4W 64b
Tested on QGIS 3.28.13 LTR Florence and on QGIS 3.34.1 Prizren by OSGeo4W - win 10 PRO 64b
Versione di QGIS
3.28.13-Firenze
Revisione codice QGIS
3b4db4f
Versione Qt
5.15.3
Versione Python
3.9.5
Versione GDAL/OGR
3.8.1
Versione PROJ
9.3.1
Versione database del Registro EPSG
v10.098 (2023-11-24)
Versione GEOS
3.12.1-CAPI-1.18.1
Versione SQLite
3.41.1
Versione PDAL
2.6.0
Versione client PostgreSQL
unknown
Versione SpatiaLite
5.1.0
Versione QWT
6.1.6
Versione QScintilla2
2.13.4
Versione SO
Windows 10 Version 2009
Supported QGIS version
New profile
Additional context
the project is set up correctly with ellipsoid, i.e. we know that: 'The length calculated by this function respects both the current project's ellipsoid setting and the distance unit settings'
I attach data and example project.
https://mega.nz/file/pFQnkYxJ#3zNJR0rzH-a4opip3rgkbJoLrRUlNu7-vwXeiUra_Hs
The text was updated successfully, but these errors were encountered: