Hi,

I got an issue with SIP python bindings...
I'm looking to loop over QgsVectorLayer features to convert geometries to mesh 
primitives (cells) ...

I had a first problem with the non-const (unexpected crash about SIP methods)
for part in feature.geometry().parts():
that I solved using the const one
 for p in f.geometry().constParts():

But now I'm facing a similar crash when trying to identify the 
symbol/category/legendKey of each feature
(the aim is to add the legendKey as a cell attribute to link color/LUT between 
the mesh and vectorlayer)
I do it this way:
layer.renderer().symbolForFeature(feature, context)

But ends up with a :

Crash ID: cb1c4f2b11cbd392a38c522a5ed1e194e060e4a0


Stack Trace


QgsExpression::evaluate :
QgsCategorizedSymbolRenderer::valueForFeature :
QgsCategorizedSymbolRenderer::originalSymbolForFeature :
PyInit__core :
PyMethodDef_RawFastCallKeywords :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :

I opened an Issue here (not sure this is relevant):
Unexpected crash using: QgsFeatureRenderer.symbolForFeature() * Issue #68 * 
qgis/pyqgis (github.com)<https://github.com/qgis/pyqgis/issues/68>


Thanks a lot
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to