Skip to content

Commit

Permalink
[Processing] Fix typo in smoothing parameter name of gdal_grid algori…
Browse files Browse the repository at this point in the history
…thms

The correct spelling is 'smoothing' (two o's): https://github.com/OSGeo/gdal/search?q=smoothing
No match with single o: https://github.com/OSGeo/gdal/search?q=smothing
  • Loading branch information
rouault authored and nyalldawson committed Sep 26, 2022
1 parent ec96b49 commit ab7feb6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridInverseDistance.py
Expand Up @@ -177,7 +177,7 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):

params = 'invdist'
params += ':power={}'.format(self.parameterAsDouble(parameters, self.POWER, context))
params += ':smothing={}'.format(self.parameterAsDouble(parameters, self.SMOOTHING, context))
params += ':smoothing={}'.format(self.parameterAsDouble(parameters, self.SMOOTHING, context))
params += ':radius1={}'.format(self.parameterAsDouble(parameters, self.RADIUS_1, context))
params += ':radius2={}'.format(self.parameterAsDouble(parameters, self.RADIUS_2, context))
params += ':angle={}'.format(self.parameterAsDouble(parameters, self.ANGLE, context))
Expand Down
Expand Up @@ -164,7 +164,7 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):

params = 'invdistnn'
params += ':power={}'.format(self.parameterAsDouble(parameters, self.POWER, context))
params += ':smothing={}'.format(self.parameterAsDouble(parameters, self.SMOOTHING, context))
params += ':smoothing={}'.format(self.parameterAsDouble(parameters, self.SMOOTHING, context))
params += ':radius={}'.format(self.parameterAsDouble(parameters, self.RADIUS, context))
params += ':max_points={}'.format(self.parameterAsInt(parameters, self.MAX_POINTS, context))
params += ':min_points={}'.format(self.parameterAsInt(parameters, self.MIN_POINTS, context))
Expand Down
16 changes: 8 additions & 8 deletions python/plugins/processing/tests/GdalAlgorithmsRasterTest.py
Expand Up @@ -956,7 +956,7 @@ def testGridInverseDistance(self):
alg.getConsoleCommands({'INPUT': source,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_grid',
'-l points -a invdist:power=2.0:smothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 -ot Float32 -of JPEG ' +
'-l points -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 -ot Float32 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with NODATA value
Expand All @@ -965,7 +965,7 @@ def testGridInverseDistance(self):
'NODATA': 9999,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_grid',
'-l points -a invdist:power=2.0:smothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=9999.0 -ot Float32 -of JPEG ' +
'-l points -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=9999.0 -ot Float32 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with "0" NODATA value
Expand All @@ -974,7 +974,7 @@ def testGridInverseDistance(self):
'NODATA': 0,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_grid',
'-l points -a invdist:power=2.0:smothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 -ot Float32 -of JPEG ' +
'-l points -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 -ot Float32 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# additional parameters
Expand All @@ -983,7 +983,7 @@ def testGridInverseDistance(self):
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
'OUTPUT': outdir + '/check.tif'}, context, feedback),
['gdal_grid',
'-l points -a invdist:power=2.0:smothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 ' +
'-l points -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 ' +
'-ot Float32 -of GTiff -z_multiply 1.5 -outsize 1754 1394 ' +
source + ' ' +
outdir + '/check.tif'])
Expand All @@ -1001,7 +1001,7 @@ def testGridInverseDistanceNearestNeighbour(self):
alg.getConsoleCommands({'INPUT': source,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_grid',
'-l points -a invdistnn:power=2.0:smothing=0.0:radius=1.0:max_points=12:min_points=0:nodata=0.0 -ot Float32 -of JPEG ' +
'-l points -a invdistnn:power=2.0:smoothing=0.0:radius=1.0:max_points=12:min_points=0:nodata=0.0 -ot Float32 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with NODATA value
Expand All @@ -1010,7 +1010,7 @@ def testGridInverseDistanceNearestNeighbour(self):
'NODATA': 9999,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_grid',
'-l points -a invdistnn:power=2.0:smothing=0.0:radius=1.0:max_points=12:min_points=0:nodata=9999.0 -ot Float32 -of JPEG ' +
'-l points -a invdistnn:power=2.0:smoothing=0.0:radius=1.0:max_points=12:min_points=0:nodata=9999.0 -ot Float32 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with "0" NODATA value
Expand All @@ -1019,7 +1019,7 @@ def testGridInverseDistanceNearestNeighbour(self):
'NODATA': 0,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_grid',
'-l points -a invdistnn:power=2.0:smothing=0.0:radius=1.0:max_points=12:min_points=0:nodata=0.0 -ot Float32 -of JPEG ' +
'-l points -a invdistnn:power=2.0:smoothing=0.0:radius=1.0:max_points=12:min_points=0:nodata=0.0 -ot Float32 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# additional parameters
Expand All @@ -1028,7 +1028,7 @@ def testGridInverseDistanceNearestNeighbour(self):
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
'OUTPUT': outdir + '/check.tif'}, context, feedback),
['gdal_grid',
'-l points -a invdistnn:power=2.0:smothing=0.0:radius=1.0:max_points=12:min_points=0:nodata=0.0 ' +
'-l points -a invdistnn:power=2.0:smoothing=0.0:radius=1.0:max_points=12:min_points=0:nodata=0.0 ' +
'-ot Float32 -of GTiff -z_multiply 1.5 -outsize 1754 1394 ' +
source + ' ' +
outdir + '/check.tif'])
Expand Down

0 comments on commit ab7feb6

Please sign in to comment.