Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use raster Unique values symbolgogy for Integer rasters with a single value of 1. #51822

Closed
2 tasks done
cratcliff opened this issue Feb 13, 2023 · 1 comment · Fixed by #51975
Closed
2 tasks done
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Rasters Related to general raster layer handling (not specific data formats)

Comments

@cratcliff
Copy link

cratcliff commented Feb 13, 2023

What is the bug or the crash?

Raster Paletted/Unique values renderer and Singleband pseudocolor does not work when a single unique value of 1 is used with any integer data types.

Steps to reproduce the issue

  1. Load or create a single band geotif with data type of integer or unsigned integer and constant pixel value of 1.

image

  1. Apply symbology using Paletted/Unique values. Clicking Classify does nothing, and you have to add the value manually.

image

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.28.2-Firenze QGIS code revision b47e00b
Qt version 5.15.3
Python version 3.9.5
GDAL/OGR version 3.6.1
PROJ version 9.1.1
EPSG Registry database version v10.076 (2022-08-31)
GEOS version 3.11.1-CAPI-1.17.1
SQLite version 3.39.4
PDAL version 2.4.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
db_manager 0.1.20
processing 2.12.99
QGIS version 3.28.2-Firenze QGIS code revision [b47e00b](https://github.com/qgis/QGIS/commit/b47e00ba601) Qt version 5.15.3 Python version 3.9.5 GDAL/OGR version 3.6.1 PROJ version 9.1.1 EPSG Registry database version v10.076 (2022-08-31) GEOS version 3.11.1-CAPI-1.17.1 SQLite version 3.39.4 PDAL version 2.4.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
db_manager
0.1.20
processing
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

Problem also exists in QGIS 3.26.3.

Using python commands doesn't work either and QgsPalettedRasterRenderer.classDataFromRaster(raster_layer.dataProvider(), 1 ) returns an empty list.

@cratcliff cratcliff added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Feb 13, 2023
@elpaso elpaso added the Rasters Related to general raster layer handling (not specific data formats) label Feb 13, 2023
@elpaso elpaso self-assigned this Feb 22, 2023
@elpaso
Copy link
Contributor

elpaso commented Feb 22, 2023

it actually crashes on Linux/master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Rasters Related to general raster layer handling (not specific data formats)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants