Bug report #9793
raster cumulative count cut gives wrong values
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||18334|
See the attached raster, it is byte type with just 10 different integer values.
When using qgis to create a color ramp using the CCC (2% and 98%) the
values seems wrong for two reasons:
*) the values presented are 0.996094 and 254.004 : if 0 is the min and
255 is max then that values do not seem that have been cut at 2% on
*) shouldn't the CCC use the raster min/max values, in this case 1 and
10, to compute the cut? otherwise the ramp will be not very useful, in
this case almost all black or white.
#2 Updated by Etienne Tourigny over 6 years ago
- Status changed from Open to Closed
fixed in master 3e4a915dd239313f71d26d72b72b5d9a160d22f6.
I also added a small fix, by rounding down/up the min/max values to nearest integer. So in this case the min/max are 1 and 9 instead of 1.0 and 8.2.
Plese reopen if it's not ok with you.