Bug report #16380
qgis.core.QgsGeometry has odd behaviour on pyqgis
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||no timely feedback|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||24290|
I use qgis-dev version on windows 7:
2.99.0-Master - 8b9e492
Using pyqgis, I get the following error when a try to create a multipolyline geometry from a list of list of QgsPoint :
test = qgis.core.QgsGeometry.fromMultiPolyline(multipoly)
TypeError: fromMultiPolyline(object): argument 1 has unexpected type 'list'
Also, when I do :
polygon = parentfet.geometry().asMultiPolygon()
qgis is dumping (the same code works on qgis 2.18)
Something is wrong with the pyqgis geometry class....
#2 Updated by Loïc BARTOLETTI about 4 years ago
Can you retry with newest version of QGIS 3?
test = QgsGeometry.fromMultiPolylineXY([[QgsPointXY(0, 0), QgsPointXY(1, 1), QgsPointXY(2, 2), QgsPointXY(0,0)], [QgsPointXY(10,0), QgsPointXY(11,1), QgsPointXY(12,2), QgsPointXY(10,0)]])
<QgsGeometry: MultiLineString ((0 0, 1 1, 2 2, 0 0),(10 0, 11 1, 12 2, 10 0))>
#4 Updated by Jürgen Fischer almost 4 years ago
- Resolution set to no timely feedback
- Status changed from Feedback to Closed
Bulk closing 82 tickets in feedback state for more than 90 days affecting an old version. Feel free to reopen if it still applies to a current version and you have more information that clarify the issue.