wonder-sk / point-cloud-experiments

Just some prototyping for QGIS point clouds implementation
1 stars 0 forks source link

Attribute by Ramp renderer: nothing shown if min=max #68

Closed wonder-sk closed 3 years ago

wonder-sk commented 3 years ago

If the minimum and maximum value is the same, then no classes are generated in the "attribute by ramp" renderer and as a result nothing gets rendered in map canvas. This is confusing for the user - it would be better to generate a single class so that at least something gets rendered.

NEDJIMAbelgacem commented 3 years ago

Hi @wonder-sk , I think it will be better if we don't put the attributes that has the equal min & max values in the UI in the first place. What do you think?

nyalldawson commented 3 years ago

@NEDJIMAbelgacem I think that's potentially limiting -- if we have situations where the stats are missing (or incorrect) then the user would never get a choice to pick that attribute and manually set the min/max values

The fix is going to sit somewhere in QgsColorRampShader::classifyColorRamp

wonder-sk commented 3 years ago

Agreed with Nyall

NEDJIMAbelgacem commented 3 years ago

https://github.com/qgis/QGIS/pull/41078

NEDJIMAbelgacem commented 3 years ago

I went with the lazy way instead of messing with QgsColorRampShader :')