Skip to content
Permalink
Browse files

fixed bad variable references

  • Loading branch information
spencerrecneps committed Aug 16, 2015
1 parent abf2398 commit 94d3bdd01ac29b7c1495286e55a37495f3fa4aeb
Showing with 7 additions and 7 deletions.
  1. +7 −7 python/plugins/processing/algs/qgis/scripts/Create_points_along_lines.py
@@ -3,7 +3,7 @@
##Distance=number 1
##Startpoint=number 0
##Endpoint=number 0
##Points along lines=output vector
##output=output vector

from PyQt4.QtCore import QVariant
from qgis.core import QGis, QgsFeature, QgsField
@@ -15,22 +15,22 @@ def create_points(feat):
length = geom.length()
currentdistance = 0

if endpoint > 0:
length = endpoint
if Endpoint > 0:
length = Endpoint

out = QgsFeature()

while startpoint + currentdistance <= length:
point = geom.interpolate(startpoint + currentdistance)
currentdistance = currentdistance + distance
while Startpoint + currentdistance <= length:
point = geom.interpolate(Startpoint + currentdistance)
currentdistance = currentdistance + Distance
out.setGeometry(point)
attrs = feat.attributes()
attrs.append(currentdistance)
out.setAttributes(attrs)
writer.addFeature(out)


layer = processing.getObject(lines)
layer = processing.getObject(Lines)
fields = layer.dataProvider().fields()
fields.append(QgsField('Distance', QVariant.Double))
writer = VectorWriter(output, None, fields, QGis.WKBPoint,

0 comments on commit 94d3bdd

Please sign in to comment.
You can’t perform that action at this time.