Skip to content

Commit

Permalink
Update CreateConstantRaster.py
Browse files Browse the repository at this point in the history
Backport of #32828.
  • Loading branch information
havatv authored and nyalldawson committed Nov 14, 2019
1 parent d350f44 commit 2321b7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/qgis/CreateConstantRaster.py
Expand Up @@ -88,8 +88,8 @@ def processAlgorithm(self, parameters, context, feedback):
outputFile = self.parameterAsOutputLayer(parameters, self.OUTPUT, context)
outputFormat = QgsRasterFileWriter.driverForExtension(os.path.splitext(outputFile)[1])

rows = max([math.ceil(extent.height() / pixelSize), 1.0])
cols = max([math.ceil(extent.width() / pixelSize), 1.0])
rows = int(max([math.ceil(extent.height() / pixelSize), 1.0]))
cols = int(max([math.ceil(extent.width() / pixelSize), 1.0]))

writer = QgsRasterFileWriter(outputFile)
writer.setOutputProviderKey('gdal')
Expand Down

0 comments on commit 2321b7d

Please sign in to comment.