Merge pull request #3372 from anitagraser/patch-1

[processing] fixed failure to insert only one point in Densify geometries alg
This commit is contained in:
Alexander Bruy 2016-08-12 11:04:47 +03:00 committed by GitHub
commit 915afcf8fa

View File

@ -112,10 +112,7 @@ class DensifyGeometries(GeoAlgorithm):
def densify(self, polyline, pointsNumber):
output = []
if pointsNumber != 1:
multiplier = 1.0 / float(pointsNumber + 1)
else:
multiplier = 1
multiplier = 1.0 / float(pointsNumber + 1)
for i in xrange(len(polyline) - 1):
p1 = polyline[i]
p2 = polyline[i + 1]