Skip to content
Permalink
Browse files

Raster reprojector: do not use full resolution hint when provider res…

…ampling is enabled

Credits @nirvn
  • Loading branch information
rouault authored and nyalldawson committed Jun 12, 2020
1 parent 904a337 commit aaaf0f7dc428d5cdf9829d0e86e4cb7e0b750ed6
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/core/raster/qgsrasterprojector.cpp
@@ -119,7 +119,11 @@ ProjectorData::ProjectorData( const QgsRectangle &extent, int width, int height,
QgsRasterDataProvider *provider = dynamic_cast<QgsRasterDataProvider *>( input->sourceInput() );
if ( provider )
{
if ( provider->capabilities() & QgsRasterDataProvider::Size )
// If provider-side resampling is enabled, we will get a much better looking
// result by not requesting at the maximum resolution and then doing nearest
// resampling here. A real fix would be to do resampling during reprojection
// however.
if ( !provider->isProviderResamplingEnabled() && ( provider->capabilities() & QgsRasterDataProvider::Size ) )
{
mMaxSrcXRes = provider->extent().width() / provider->xSize();
mMaxSrcYRes = provider->extent().height() / provider->ySize();

0 comments on commit aaaf0f7

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