[processing] restore TIN / IDW interpolation algorithms

This commit is contained in:
nirvn 2018-04-19 16:39:41 +07:00 committed by Mathieu Pellerin
parent 7d43e7b876
commit a463858bf3
3 changed files with 14 additions and 14 deletions

View File

@ -76,10 +76,10 @@ class ParameterInterpolationData(QgsProcessingParameterDefinition):
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 @@ class IdwInterpolation(QgisAlgorithm):
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

View File

@ -80,10 +80,10 @@ class ParameterInterpolationData(QgsProcessingParameterDefinition):
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 @@ class TinInterpolation(QgisAlgorithm):
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

View File

@ -152,10 +152,10 @@ class InterpolationDataWidget(BASE, WIDGET):
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]