I had a raster sent to me which had different values on the other person's QGIS, he's working with 2.18 and I'm working with 3.0.

he had to set a threshold based on his index of values but couldn't do that because of the distorted values.

I have no idea what caused this since his QGIS reported the true value only for each individual cell when queried and not for the entire raster.
has anyone come across this? is there a fix so that he can see the true values in his version?

His values in Qgis 2.18

My Values


the values are streched to minmax in contrast enhancment, the problem is he's seeing different values.

  • Do you for sure have the same image? Compare the checksums. Did you both press the Apply button after changing the Min/max values settings options? Do you get same or different values with the Raster layer statistics tool? What if you run gdalinfo -stats? FInd if the image has a sidecar file .aux.xml and if yes, delete it and have another try. – user30184 Jun 10 '18 at 16:10
  • We have the same layer, he sent it to me. – Dror Bogin Jun 10 '18 at 16:14
  • You have a checklist. If the image is the same but min/max are detected differently it can be a bug or a user error. – user30184 Jun 10 '18 at 17:05
  • the question here is the bug solvable. we want to use a common index between the both of us. – Dror Bogin Jun 10 '18 at 17:50
  • We do not know yet if it is a bug or if one of you has set wrong min and max values by accident. Please do the checks (layer stats, gdalinfo, the apply button, aux.xml) and report the results. – user30184 Jun 10 '18 at 18:46

What you look at is a legend of the rendering styles which are applied to the layer, a map between the value of data and color that presents that value in a rendered map. If you change the rendering styles the legend is updated as well. Obviously you and your colleague have used different settings for computing the min/max values used for contrast enhancement.

enter image description here

For having a look at real min/max values you can use the Layer-Properties tool with the Min/max radio button selected or even better by using the special tool from Processing toolbox-Raster analysis-Raster layer statistics.

  • i'll update the question, so i'm clearer, it was streched to minmax in contrast enhancment – Dror Bogin Jun 10 '18 at 16:01
  • @DrorBogin Although default settings of Contrast enhancement is Stretch to MinMax in both QGIS 2.18 and 3.0, Min / max values settings are different. QGIS 2.18 is set to Cumulative count cut while QGIS 3.0 is Min/Max. Please read user30184's answer again, make sure you follow especially "the Min/max radio button selected", and see what happens. – Kazuhito Jun 12 '18 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.