Skip to content
Permalink
Browse files

Use correct coordinate transform context in Raster Calculator algorithm

  • Loading branch information
nyalldawson committed Jul 29, 2020
1 parent 0a556a8 commit 68c7cfb65facdea7af7f0b92aeb99fc98d81a023
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/plugins/processing/algs/qgis/RasterCalculator.py
@@ -118,7 +118,7 @@ def processAlgorithm(self, parameters, context, feedback):
if not bbox.isNull():
bboxCrs = self.parameterAsExtentCrs(parameters, self.EXTENT, context)
if bboxCrs != crs:
transform = QgsCoordinateTransform(bboxCrs, crs, context.project())
transform = QgsCoordinateTransform(bboxCrs, crs, context.transformContext())
bbox = transform.transformBoundingBox(bbox)

if bbox.isNull() and layers:
@@ -131,7 +131,7 @@ def processAlgorithm(self, parameters, context, feedback):
def _cellsize(layer):
ext = layer.extent()
if layer.crs() != crs:
transform = QgsCoordinateTransform(layer.crs(), crs, context.project())
transform = QgsCoordinateTransform(layer.crs(), crs, context.transformContext())
ext = transform.transformBoundingBox(ext)
return (ext.xMaximum() - ext.xMinimum()) / layer.width()

0 comments on commit 68c7cfb

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