Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 15, 2024
1 parent 04bb182 commit 0b19bd3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions felt/core/fsl_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1532,11 +1532,13 @@ def raster_layer_to_fsl(
if not fsl:
return None

if (layer.resamplingStage() == QgsRasterPipe.ResamplingStage.Provider
and (layer.dataProvider().zoomedInResamplingMethod() !=
QgsRasterDataProvider.ResamplingMethod.Nearest
or layer.dataProvider().zoomedOutResamplingMethod() !=
QgsRasterDataProvider.ResamplingMethod.Nearest)):
is_early_resampling = (layer.resamplingStage() ==
QgsRasterPipe.ResamplingStage.Provider)
if (is_early_resampling and
(layer.dataProvider().zoomedInResamplingMethod() !=
QgsRasterDataProvider.ResamplingMethod.Nearest or
layer.dataProvider().zoomedOutResamplingMethod() !=
QgsRasterDataProvider.ResamplingMethod.Nearest)):
fsl['config']['rasterResampling'] = "linear"
else:
fsl['config']['rasterResampling'] = "nearest"
Expand Down

0 comments on commit 0b19bd3

Please sign in to comment.