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.46k stars 2.99k forks source link

Inconsistent behaviour for embedded color palette in raster datasets #46136

Open kannes opened 2 years ago

kannes commented 2 years ago

What is the bug or the crash?

When using a raster dataset that has an embedded color palette, QGIS will be default load and assign those colors, using the "Paletted/Unique Values" mode.

However there are two problems, they are closely related so I combined them in this issue: 1) The color ramp dropdown displays "Random colors" even though the embedded palette was chosen image

2) There is no intuitive way for the user to actively choose the embedded palette colors. The color ramp dropdown does not have an option to use the embedded colors. There is a way to do so but it is "hidden" under a "..." icon; "Load Classes from Layer" is available there next to options to load/saves styles from/to files. Technically that makes sense but from a user's viewpoint it seems weird and hard to discover. image image

I consider this a UX bug, hope that is ok. The option to use the embedded color palette "should" be in the color ramp dropdown.

Steps to reproduce the issue

  1. Have a raster dataset with embedded color palette, e. g. one from https://esa-worldcover.org/en/data-access
  2. Load it in QGIS
  3. It will be rendered with that color palette but the renderer says "Random colors" is the color ramp
  4. Change the ramp to a different one
  5. Try to change the color ramp to the embedded one

Versions

QGIS version | 3.23.0-Master QGIS code revision | 95bffad8b28

Supported QGIS version

New profile

Additional context

This is not a profile dependent thing.

gioman commented 2 years ago

Have a raster dataset with embedded color palette, e. g. one from https://esa-worldcover.org/en/data-access

@kannes I see only methods to download that require a login or just a bundle of all data (120gb). Can you link (google drive, dropbox, etc.) a more accessible sample? thanks.

kannes commented 2 years ago

The S3 access is possible without an account, it is really nice! But you are right, it's not obvious, you need to install a tool and I should have provided a sample. :)

I attached a file to this comment, the license is CC-BY 4.0 © ESA WorldCover project 2020 / Contains modified Copernicus Sentinel data (2020) processed by ESA WorldCover consortium’: ESA_WorldCover_10m_2020_v100_N00E006_Map.tif.gz

gioman commented 2 years ago

@kannes thanks!

roya0045 commented 2 years ago

I guess to optimal option would be to have an embedded raster symbol similar to what was done with vector layer, as this is not just a paletted render, and not a random palette either. That would make it recoverable? Or just something like 'native render'.

AlisterH commented 6 months ago

I guess to optimal option would be to have an embedded raster symbol similar to what was done with vector layer, as this is not just a paletted render, and not a random palette either. That would make it recoverable? Or just something like 'native render'.

Note I've filed a ticket for that, as it would help with terrible performance/project bloat issues: #53453