On Sun, 17 Oct 2021 at 08:27, Andrea Giudiceandrea
<[email protected]> wrote:
>
> Hi Devs,
> I noticed that the expression functions length(), perimeter() and area()
> use the QgsGeometry length() and area() functions to calculate the
> Cartesian length of lines and perimeter and area of polygons.
>
> The Identify Features map tool uses instead the QgsAbstractGeometry
> class length() and perimeter() functions for the Cartesian length of
> lines and the perimeter of polygons and the QgsGeometry area() function
> for the Cartesian area.
>
> This leads to inconsistent results when the geometries contain
> CircularStrings or CurvePolygons.
> In this case the QgsAbstractGeometry class functions are more accurate
> then the QgsGeometry ones.
>
> Is there any reason or contraindication why not to use the
> QgsAbstractGeometry class functions also for the expression functions
> length(), perimeter() and area() and for the Identify Features map tool
> measurement of polygons area?

It's really just a historical artefact, for outdated reasons. We
should definitely change the QgsGeometry methods to use the
QgsAbstractGeometry ones. Aside from the accuracy of curved vs
segmentized representations it's likely that the native calculations
will be much faster then the QGIS representation -> GEOS
representation -> GEOS calculation trip.

Nyall


>
> Best regards.
>
> Andrea Giudiceandrea
> _______________________________________________
> QGIS-Developer mailing list
> [email protected]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to