Skip to content

Commit 754ccef

Browse files
authored
fixed failure to insert only one point
Previously, if pointsNumber was 1, it wouldn't insert a new point in the middle.
1 parent 56400b1 commit 754ccef

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

python/plugins/processing/algs/qgis/DensifyGeometries.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,7 @@ def densifyGeometry(self, geometry, pointsNumber, isPolygon):
112112

113113
def densify(self, polyline, pointsNumber):
114114
output = []
115-
if pointsNumber != 1:
116-
multiplier = 1.0 / float(pointsNumber + 1)
117-
else:
118-
multiplier = 1
115+
multiplier = 1.0 / float(pointsNumber + 1)
119116
for i in xrange(len(polyline) - 1):
120117
p1 = polyline[i]
121118
p2 = polyline[i + 1]

0 commit comments

Comments
 (0)