[QGIS-Developer] [Qgis-user] Question About QgsGeometry Static Functions
Nyall Dawson
nyall.dawson at gmail.com
Wed Dec 5 15:06:32 PST 2018
On Wed, 5 Dec 2018 at 02:52, C Hamilton <adenaculture at gmail.com> wrote:
>
> QgsGeometry has the following static functions
>
> QgsGeometry.fromPolylineXY( list of QgsPointXY)
> QgsGeometry.fromMultiPolylineXY( list of QgsPointXY lists)
>
> If I am working with QgsPoint rather than QgsPointXY there is
>
> QgsGeometry.fromPolyline( list of QgsPoint)
>
> However there is not a similar multi polyline function. Why not?
Because there's been no demand for this, until now. But in general all
those fromPolylineXY etc methods should be avoided wherever possible.
They are very slow (lots of list allocations) and don't handle Z/M
dimensions.
You're better to work directly with the QGIS geometry subclasses like
QgsLineString, QgsMultiLineString instead.
Nyall
>
> QgsGeometry.fromMultiPolyline( list of QgsPoint list)
>
> What is the proper way to implement this?
>
> Thanks!!!!
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
More information about the QGIS-Developer
mailing list