Skip to content
Permalink
Browse files

[processing] Fix create constant raster layer modifies pixel size

Fixes #18446
  • Loading branch information
nyalldawson committed Jun 5, 2018
1 parent d9336c2 commit 8c689b2d3625d92341f9fb0c8e4e30af842ad23a
@@ -87,8 +87,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, 1.0])
cols = max([math.ceil(extent.width() / pixelSize) + 1, 1.0])
rows = max([math.ceil(extent.height() / pixelSize), 1.0])
cols = max([math.ceil(extent.width() / pixelSize), 1.0])

writer = QgsRasterFileWriter(outputFile)
writer.setOutputProviderKey('gdal')
@@ -1652,7 +1652,7 @@ tests:
NUMBER: 3.0
results:
OUTPUT:
hash: e453e9e36ce314d5197963ac27872a0cc3dfe43764ed586a334c66f0
hash: 56172fe81f40efba9fadcaeccdbab247e99c8725990a94d9609769f6
type: rasterhash

- algorithm: native:lineintersections

0 comments on commit 8c689b2

Please sign in to comment.
You can’t perform that action at this time.