Skip to content

Commit

Permalink
TilesXYZ.py - setTransformContext before rendering
Browse files Browse the repository at this point in the history
Set transform context in QgsMapSettings before rendering tiles in order to respect all the desired CRS transformations configured in QGIS project settings.
  • Loading branch information
holesond authored and nyalldawson committed Nov 18, 2022
1 parent ef47413 commit d516c2f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/plugins/processing/algs/qgis/TilesXYZ.py
Expand Up @@ -265,6 +265,7 @@ def generate(self, writer, parameters, context, feedback):
self.settingsDictionary = {str(i): QgsMapSettings() for i in range(self.maxThreads)}
for thread in self.settingsDictionary:
self.settingsDictionary[thread].setOutputImageFormat(QImage.Format_ARGB32_Premultiplied)
self.settingsDictionary[thread].setTransformContext(context.transformContext())
self.settingsDictionary[thread].setDestinationCrs(dest_crs)
self.settingsDictionary[thread].setLayers(self.layers)
self.settingsDictionary[thread].setOutputDpi(dpi)
Expand Down

0 comments on commit d516c2f

Please sign in to comment.