Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] restore TIN / IDW interpolation algorithms
  • Loading branch information
nirvn committed Apr 19, 2018
1 parent 39ad041 commit 9d7484c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions python/plugins/processing/algs/qgis/IdwInterpolation.py
Expand Up @@ -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]


Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions python/plugins/processing/algs/qgis/TinInterpolation.py
Expand Up @@ -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]


Expand Down Expand Up @@ -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
Expand Down
Expand Up @@ -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]


Expand Down

0 comments on commit 9d7484c

Please sign in to comment.