[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,7 +76,7 @@ class ParameterInterpolationData(QgsProcessingParameterDefinition):
def dataToString(data): def dataToString(data):
s = '' s = ''
for c in data: for c in data:
s += '{}, {}, {:d}, {:d};'.format(c[0], s += '{}::~:: {}::~:: {:d}::~:: {:d};'.format(c[0],
c[1], c[1],
c[2], c[2],
c[3]) c[3])
@ -144,7 +144,7 @@ class IdwInterpolation(QgisAlgorithm):
layerData = [] layerData = []
layers = [] layers = []
for row in interpolationData.split(';'): for row in interpolationData.split(';'):
v = row.split(',') v = row.split('::~::')
data = QgsInterpolator.LayerData() data = QgsInterpolator.LayerData()
# need to keep a reference until interpolation is complete # need to keep a reference until interpolation is complete

View File

@ -80,7 +80,7 @@ class ParameterInterpolationData(QgsProcessingParameterDefinition):
def dataToString(data): def dataToString(data):
s = '' s = ''
for c in data: for c in data:
s += '{}, {}, {:d}, {:d};'.format(c[0], s += '{}::~:: {}::~:: {:d}::~:: {:d};'.format(c[0],
c[1], c[1],
c[2], c[2],
c[3]) c[3])
@ -160,7 +160,7 @@ class TinInterpolation(QgisAlgorithm):
layers = [] layers = []
crs = QgsCoordinateReferenceSystem() crs = QgsCoordinateReferenceSystem()
for row in interpolationData.split(';'): for row in interpolationData.split(';'):
v = row.split(',') v = row.split('::~::')
data = QgsInterpolator.LayerData() data = QgsInterpolator.LayerData()
# need to keep a reference until interpolation is complete # need to keep a reference until interpolation is complete

View File

@ -152,7 +152,7 @@ class InterpolationDataWidget(BASE, WIDGET):
else: else:
inputType = QgsInterpolator.SourceBreakLines inputType = QgsInterpolator.SourceBreakLines
layers += '{},{:d},{:d},{:d};'.format(layer.source(), layers += '{}::~::{:d}::~::{:d}::~::{:d};'.format(layer.source(),
interpolationSource, interpolationSource,
fieldIndex, fieldIndex,
inputType) inputType)