Skip to content
Permalink
Browse files

[processing] restore TIN / IDW interpolation algorithms

  • Loading branch information
nirvn committed Apr 19, 2018
1 parent 39ad041 commit 9d7484cd4f1126912b251bd7c1e59aa76ccd2217
@@ -76,10 +76,10 @@ def parseValue(value):
def dataToString(data):
s = ''
for c in data:
s += '{}, {}, {:d}, {:d};'.format(c[0],
c[1],
c[2],
c[3])
s += '{}::~:: {}::~:: {:d}::~:: {:d};'.format(c[0],
c[1],
c[2],
c[3])
return s[:-1]


@@ -144,7 +144,7 @@ def processAlgorithm(self, parameters, context, feedback):
layerData = []
layers = []
for row in interpolationData.split(';'):
v = row.split(',')
v = row.split('::~::')
data = QgsInterpolator.LayerData()

# need to keep a reference until interpolation is complete
@@ -80,10 +80,10 @@ def parseValue(value):
def dataToString(data):
s = ''
for c in data:
s += '{}, {}, {:d}, {:d};'.format(c[0],
c[1],
c[2],
c[3])
s += '{}::~:: {}::~:: {:d}::~:: {:d};'.format(c[0],
c[1],
c[2],
c[3])
return s[:-1]


@@ -160,7 +160,7 @@ def processAlgorithm(self, parameters, context, feedback):
layers = []
crs = QgsCoordinateReferenceSystem()
for row in interpolationData.split(';'):
v = row.split(',')
v = row.split('::~::')
data = QgsInterpolator.LayerData()

# need to keep a reference until interpolation is complete
@@ -152,10 +152,10 @@ def value(self):
else:
inputType = QgsInterpolator.SourceBreakLines

layers += '{},{:d},{:d},{:d};'.format(layer.source(),
interpolationSource,
fieldIndex,
inputType)
layers += '{}::~::{:d}::~::{:d}::~::{:d};'.format(layer.source(),
interpolationSource,
fieldIndex,
inputType)
return layers[:-1]


0 comments on commit 9d7484c

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