Hello all,
I've got a strange problem with a python function in my QGIS 2.2.0 plugin:
This first function works perfectly:
/def points_linestring (pointgeoms)://
// return QgsGeometry.fromPolyline([point.asPoint() for point in
pointgeoms])/
pointgeoms contains points.
The function transforms these in a linestring.
BUT, if I want a multipolyline, and if I try :
/def points_linestring (pointgeoms)://
// return QgsGeometry.fromMultiPolyline([point.asPoint() for point in
pointgeoms])/
(I've juste added "Multi"),
Qgis returns :
"/home/vincent/.qgis2/python/plugins/bdtravaux/convert_geoms.py", line
70, in points_linestring
return QgsGeometry.fromMultiPolyline(polyligne.asPolyline())
TypeError: QgsGeometry.fromMultiPolyline(unknown-type): argument 1 has
unexpected type 'list'
Does somebody know why this function works with fromPolyline() and not
fromMultiPolyline()?
I found nothing about this in the doc and in google searchs.
Thanks for advance.
Vincent
---------------------------
Vincent Damoy - Responsable SIG
Conservatoire d'espaces naturels du Nord et du Pas-de-Calais
152 bd de Paris - 62190 Lillers
Tél : 03.21.54.75.00 - Fax : 03.21.54.56.07
/*Pour adhérer au Conservatoire :*
www.cen-npdc.org/nous-rejoindre/adherent.html/
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer