Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to change the symbol used in a layer via Python. I've been able to tunnel through a vector layer to the symbol layer, but I don't know how to change the symbol it's using. I'd like to update it using a filename.

Here's what I have so far:

qgis.console.clearConsole()
layer = qgis.utils.iface.activeLayer()

r = layer.rendererV2()
sym = r.symbols()[0]

symLayer = sym.symbolLayer(0)

symLayer seems like it should have what I'm looking for, but I haven't found it yet.

Is this even possible?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.