[Qgis-developer] What's the difference between provider.geometryType() and layer.geometryType()
Anita Graser
anitagraser at gmx.at
Sat Oct 19 07:46:21 PDT 2013
Hi Victor,
I've been porting one of my scripts to the new Processing. Everything
seems fine but I'm confused about one issue:
It seems like almost everything can be accessed via the layer now, e.g.
crs(), pendingFields(), etc. However, if I try to use layer.geometryType()
in the VectorWriter constructor, I get an error. It only works if I do:
writer = VectorWriter(output, None, fields, provider.geometryType(),
layer.crs() )
What's the reason for this unintuitive behavior?
Thanks and best wishes,
Anita
More information about the Qgis-developer
mailing list