mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-04 00:30:59 -05:00
and add new QgsGeometry::fromPolyline which uses QgsPoint We want to encourage people not to use the QgsPointXY method, as it drops Z/M values. So it's moved across to a different name to make way for a new QgsGeometry::fromPolyline which uses a QgsPoint list instead of QgsPointXY, thus keeping Z/M values intact. Similarly, QgsPolyline now is a list of QgsPoint (keeping z/m values) and the old 2d QgsPolyline type was renamed to QgsPolylineXY. Making the QgsPoint method the "preferred" method and making linestrings just as easy to create from z/m dimensioned points as 2d points is important to push people to write code which does not discard these important dimensions. As a bonus, the QgsPoint methods are more efficient anyway, since they don't require creation of a temporary list.