I'm trying to implement QgsGeometry.smooth() in my plugin as according to the API specifications.
Here is my code:
def lineSmooth(self, line):
''' Takes a line geometry and applies smooth
'''
iterations = int(self.dlg.smoothIterations.value())
offset = float(self.dlg.smoothOffset.value())
minDist = float(self.dlg.smoothMinDist.value())
maxAngle = float(self.dlg.smoothMaxAngle.value())
return line.smooth(iterations, offset, minDist, maxAngle)
I am getting this error:
TypeError: QgsGeometry.smooth(int, float): too many arguments
When I print the parameter values I'm sending to the method:
(1, 0.25, -1.0, 180.0)
Now, I'm pretty new to Python and programming in general, and this is my first QGIS plugin, so I might be doing something silly.