mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
fixed bad variable references
This commit is contained in:
parent
abf2398880
commit
94d3bdd01a
@ -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,14 +15,14 @@ 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)
|
||||
@ -30,7 +30,7 @@ def create_points(feat):
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user