qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.59k stars 3.01k forks source link

Global map shading ignores resample settings when map CRS = layer CRS #53532

Open AlisterH opened 1 year ago

AlisterH commented 1 year ago

What is the bug or the crash?

Global map shading respects layers' resampling settings, but only if the layer is being reprojected.

See example screenshots - the layer CRS is EPSG:2105

Global map shading enabled with resampling = cubic and map CRS=EPSG:2105 - the edges should be smoothed but aren't. image Global map shading disabled with resampling = nearest neighbour and map CRS=EPSG:2105 - looks as expected. image Global map shading enabled with resampling = cubic and map CRS=EPSG:2193 - smoothed as expected image Global map shading enabled with resampling = bilinear and map CRS=EPSG:2193 - looks as expected image

Steps to reproduce the issue

Set project CRS to match the CRS of your DEM. Enable Global Map Shading Enable bilinear or cubic resampling. See that the global map shading ignores the resampling setting Disable the global map shading and see that the layer styling is resampled.

Versions

Tested in 3.30.3 and 702e370846 nightly installed just now.

QGIS version
3.30.3-'s-Hertogenbosch
QGIS code revision
2411cec1
Qt version
5.15.3
Python version
3.9.5
GDAL/OGR version
3.7.0
Compiled against PROJ
9.2.0
Running against PROJ
9.2.1
EPSG Registry database version
v10.088 (2023-05-13)
GEOS version
3.11.2-CAPI-1.17.2
SQLite version
3.41.1
PDAL version
2.5.3
PostgreSQL client version
unknown
SpatiaLite version
5.0.1
QWT version
6.1.6
QScintilla2 version
2.13.1
OS version
Windows 10 Version 2009

Active Python plugins
annotationManager
0.5
annotation_labels
1.0.1
AnotherDXF2Shape
1.2.7
changeDataSource
3.1
civilplan
1.0
coveragebuilder
version 0.5.0
Equal_area_slope_QGIS_Plugin
0.1
file_management
0.1
GeoCoding
2.19
geometry_paster
0.2
geoprocAlgos
3.30
group_transparency
0.2
joinmultiplelines
Version 0.4.1
LayerBoard
1.0.1
layout_panel-main
0.3
MemoryLayerSaver
5.0.0
merge_selected_features
0.1
nominatim
1.4.5
pathfinder
version 0.4.2
plugin_reloader
0.9.3
precisioncursor4qgis-main
0.2E
QCopycanvas
0.7
qgis_resource_sharing
1.0.0
QlrBrowser
3.0.0
quick_map_services
0.19.33
reveal_address_plugin
1.2
segment_reshape_plugin
0.1.4
StyleLoadSave
1.0
switch_active_layer
0.1
valuetool
3.0.15
workbench
0.0.4
db_manager
0.1.20
grassprovider
2.12.99
MetaSearch
0.3.6
processing
2.12.99

Supported QGIS version

New profile

Additional context

No response

nirvn commented 1 year ago

@AlisterH , enable [x] early resampling:

image

Without that, resampling settings are ignored with reprojected rasters.

AlisterH commented 1 year ago

You mean non-reprojected rasters.

That's pretty weird:

  1. when the layer styling doesn't ignore it, and
  2. because there is no reason the user would expect it.

Is there even any reason why someone would want early resampling disabled?

AlisterH commented 1 year ago

I don't know what's going on here, but at the moment early resampling seems to have no effect on Global Map Shadding, but it is having the opposite effect for layer styling, i.e. when I enable early resampling the layer is rendered as if nearest neighbour resampling is selected, even if Bilinear or cubic is selected...

monticola2 commented 1 year ago

Seems similar to this issue: https://github.com/qgis/QGIS/issues/40746