mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[processing] restore TIN / IDW interpolation algorithms
This commit is contained in:
parent
7d43e7b876
commit
a463858bf3
@ -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
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user