diff --git a/tests/src/python/test_qgsrasterlabeling.py b/tests/src/python/test_qgsrasterlabeling.py index 5fa5e53fd02c..f1b536ad6b56 100644 --- a/tests/src/python/test_qgsrasterlabeling.py +++ b/tests/src/python/test_qgsrasterlabeling.py @@ -178,6 +178,13 @@ def test_render_int(self): mapsettings.setOutputSize(QSize(400, 400)) mapsettings.setOutputDpi(96) mapsettings.setDestinationCrs(QgsCoordinateReferenceSystem("EPSG:3857")) + transform_context = mapsettings.transformContext() + transform_context.addCoordinateOperation( + raster_layer.crs(), + QgsCoordinateReferenceSystem("EPSG:3857"), + "+proj=pipeline +step +inv +proj=utm +zone=11 +ellps=clrk66 +step +proj=push +v_3 +step +proj=cart +ellps=clrk66 +step +proj=helmert +x=-10 +y=158 +z=187 +step +inv +proj=cart +ellps=WGS84 +step +proj=pop +v_3 +step +proj=webmerc +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84", + ) + mapsettings.setTransformContext(transform_context) mapsettings.setExtent( QgsRectangle(-13095009.8, 4014898.9, -13094808.4, 4015061.7) ) @@ -209,6 +216,13 @@ def test_render_rotated_map(self): mapsettings.setOutputDpi(96) mapsettings.setRotation(45) mapsettings.setDestinationCrs(QgsCoordinateReferenceSystem("EPSG:3857")) + transform_context = mapsettings.transformContext() + transform_context.addCoordinateOperation( + raster_layer.crs(), + QgsCoordinateReferenceSystem("EPSG:3857"), + "+proj=pipeline +step +inv +proj=utm +zone=11 +ellps=clrk66 +step +proj=push +v_3 +step +proj=cart +ellps=clrk66 +step +proj=helmert +x=-10 +y=158 +z=187 +step +inv +proj=cart +ellps=WGS84 +step +proj=pop +v_3 +step +proj=webmerc +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84", + ) + mapsettings.setTransformContext(transform_context) mapsettings.setExtent( QgsRectangle(-13095009.8, 4014898.9, -13094808.4, 4015061.7) ) @@ -240,6 +254,13 @@ def test_render_numeric_format(self): raster_layer.setLabelsEnabled(True) mapsettings = QgsMapSettings() + transform_context = mapsettings.transformContext() + transform_context.addCoordinateOperation( + raster_layer.crs(), + QgsCoordinateReferenceSystem("EPSG:3857"), + "+proj=pipeline +step +inv +proj=utm +zone=11 +ellps=clrk66 +step +proj=push +v_3 +step +proj=cart +ellps=clrk66 +step +proj=helmert +x=-10 +y=158 +z=187 +step +inv +proj=cart +ellps=WGS84 +step +proj=pop +v_3 +step +proj=webmerc +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84", + ) + mapsettings.setTransformContext(transform_context) mapsettings.setOutputSize(QSize(400, 400)) mapsettings.setOutputDpi(96) mapsettings.setDestinationCrs(QgsCoordinateReferenceSystem("EPSG:3857")) diff --git a/tests/testdata/control_images/raster_labeling/expected_labeling_int/expected_labeling_int.png b/tests/testdata/control_images/raster_labeling/expected_labeling_int/expected_labeling_int.png index ad5c1c512545..8751728075d5 100644 Binary files a/tests/testdata/control_images/raster_labeling/expected_labeling_int/expected_labeling_int.png and b/tests/testdata/control_images/raster_labeling/expected_labeling_int/expected_labeling_int.png differ diff --git a/tests/testdata/control_images/raster_labeling/expected_labeling_rotated/expected_labeling_rotated.png b/tests/testdata/control_images/raster_labeling/expected_labeling_rotated/expected_labeling_rotated.png index 8a9257658ad7..2ec1934cf272 100644 Binary files a/tests/testdata/control_images/raster_labeling/expected_labeling_rotated/expected_labeling_rotated.png and b/tests/testdata/control_images/raster_labeling/expected_labeling_rotated/expected_labeling_rotated.png differ diff --git a/tests/testdata/control_images/raster_labeling/expected_numeric_format/expected_numeric_format.png b/tests/testdata/control_images/raster_labeling/expected_numeric_format/expected_numeric_format.png index f36ea122e414..14c1992a3d8c 100644 Binary files a/tests/testdata/control_images/raster_labeling/expected_numeric_format/expected_numeric_format.png and b/tests/testdata/control_images/raster_labeling/expected_numeric_format/expected_numeric_format.png differ