I would like to implement a variable as a buffer. However, once I define the variable, it does not get updated.
For example:
The variable has to act like a buffer.. At the moment, I have the variable implemented in the def but I think this is wrong.
def buffer(feature):
puffer = 'leer'
for i in range(0,50):
if puffer == 'leer':
feature.setAttribute('value', value2)
puffer = 'value2'
else:
feature.setAttribute('value', value3)
For this example, I get always the Result from feature.setAttribute('value', value2).
I have also tried to create a class withdef __init__(self) and Input and close.
But I don't get a Result.The result should be written in the attribute table of a shapefile
Can anyone help me?