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 Oct 21, 2022
1 parent 638a800 commit fb7b52b
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,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 @@ -943,7 +943,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 @@ -952,7 +952,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 @@ -961,7 +961,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 @@ -979,7 +979,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 @@ -988,7 +988,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 @@ -997,7 +997,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 @@ -1006,7 +1006,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 fb7b52b

Please sign in to comment.