here is my first question in this forum:On the python console in QGIS what ist the difference between the following two code snippets (activeLayer is a polygon layer):
1)
iface.activeLayer().selectedFeatures()[0].geometry().type()>>> 32)
f = iface.activeLayer().selectedFeatures()[0]f.geometry().type()>>> 2In case 1) the result is '3', in case 2) the result is '2', and moreover in QGIS 2.12 using 'asPolygon()' instead of 'type()' case 2) gives as list of qPoints as expected while in case 1) QGIS says goodbye with a 'Runtime Error! ... R6025 - pure virtual function call' (in QGIS 2.8 results in an empty list).
Naive as I am, I expected the same results...
Thanks in advance, Jochen
أكثر...
1)
iface.activeLayer().selectedFeatures()[0].geometry().type()>>> 32)
f = iface.activeLayer().selectedFeatures()[0]f.geometry().type()>>> 2In case 1) the result is '3', in case 2) the result is '2', and moreover in QGIS 2.12 using 'asPolygon()' instead of 'type()' case 2) gives as list of qPoints as expected while in case 1) QGIS says goodbye with a 'Runtime Error! ... R6025 - pure virtual function call' (in QGIS 2.8 results in an empty list).
Naive as I am, I expected the same results...
Thanks in advance, Jochen
أكثر...